locked
setting up environment variables RRS feed

  • Question

  • Hi,

     

    I am trying to set the environment variables in windows vista premium using a DOS batch file "env.bat" as follows.

     

    set JAVA_HOME = c:\sun\sdk\jdk
    set J2EE_HOME = C:\Sun\SDK
    set JAVAEE_HOME = C:\Sun\SDK
    set ANT_HOME = C:\ant-1.7.0
    set HIBERNATE_HOME = c:\hibernate-3.2
    set HSQLDB_HOME = c:\hsqldb
    set PATH = %PATH%;%JAVA_HOME%\bin;%J2EE_HOME%\bin;%ANT_HOME%\bin;%HIBERNATE_HOME%\bin;%HSQLDB_HOME%\bin

    set CLASSPATH = %CLASSPATH%;.;%JAVA_HOME%\lib\dt.jar;%J2EE_HOME%\lib\j2ee.jar;%J2EE_HOME%\lib\javaee.jar

     

    but when I executed the batch file the above mentioned variables are not set. and on executing the echo %JAVA_HOME% it displays %JAVA_HOME%

     

    I don't know what's wrong here....

     

    Also, if I executed the above commands individually on a command prompt they work as expected.

     

    any help will be much appreciated....

     

    thank you.

     

    Friday, December 28, 2007 2:53 AM

Answers

  • Hi Peter00005,

     

    Thank you for the post.

     

    Please understand that in this forum, we mainly discuss Windows Vista setup issues. As this issue is closely related to scripting, I recommend discussing it in our MSDN newsgroups. They are the best resource to answer scripting issues. Thank you for your understanding.

     

    MSDN newsgroups

    http://msdn.microsoft.com/newsgroups/default.asp

     

    If you have other issue regarding Windows Vista, please feel free to post new threads.

     

    Have a nice day.

     

    Best regards,

    Tim Quan

    Microsoft Online Community Support

     

    Monday, December 31, 2007 2:44 AM
    Moderator