A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
JAVA_HOME variable in batch file is not working properly
Joined: Jun 27, 2006
Feb 02, 2007 04:20:00
I have installed two versions of
in my machine, say c:\jdk1.5 and
I would like to invoke appropriate java interpreter by setting
JAVA_HOME variable. For that I have written a batch file, but it
doesn't work correctly.
@ECHO ON ECHO %JAVA_HOME% SET JAVA = %JAVA_HOME% %JAVA%\bin\java A
A is the Java class file.
If I set JAVA_HOME=c:\jdk1.5, the above code works fine.
If I set JAVA_HOME=c:\program files\jdk1.4, produces error.
I think the problem is the space between program and files.
Help me to resolve this problem.
Thanks in advance,
Joined: Jun 06, 2005
Feb 02, 2007 04:34:00
Joined: Aug 05, 2005
Feb 02, 2007 04:39:00
Don't post the
in multiple forums.
I agree. Here's the link:
subject: JAVA_HOME variable in batch file is not working properly
Help with dos batch script
run java code through bat file
Setting CLASSPATH via batch file
JAVA_HOME variable is not working correctrly in batch file.
JAVA_HOME variable is not working properly in bat file
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013