SHELL and Windows environment variables..

DanKDanK Member Posts: 34
Hi,

I was looking to use the SHELL function to start a Java program using:

SHELL('java','C:\Test1');

I was hoping that I could just rely on the JAVA_HOME path variable being used to find the location of java.exe. I'm getting an error like 'The operating system cannot find the file java'.

I've assumed environment variables are being ignored by windows.. or have I done something wrong?

Thanks,

Dan

Comments

  • LothusLothus Member Posts: 1
    Hi Dank,

    There is a function called 'ENVIRON' that returns the environ variable path. See the C/SIDE Reference Guide, i think it will help you with this function.

    SHELL(ENVIRON('JAVA_HOME'),'C:\Test1');

    Bye,

    Javi
  • DanKDanK Member Posts: 34
    Thanks Lothus.. thats exactly what I need :D
Sign In or Register to comment.