aspose file tools
The moose likes Java in General and the fly likes JAVA_HOME variable in batch file is not working properly Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "JAVA_HOME variable in batch file is not working properly" Watch "JAVA_HOME variable in batch file is not working properly" New topic
Author

JAVA_HOME variable in batch file is not working properly

Kaarthick Ramamoorthy
Greenhorn

Joined: Jun 27, 2006
Posts: 3
Hi all,

I have installed two versions of java in my machine, say c:\jdk1.5 and
c:\program files\jdk1.4.


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.



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,
Kaarthick.R
Srikanth Basa
Ranch Hand

Joined: Jun 06, 2005
Posts: 241
Try C:\PROGRA~1\JDK1.4
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3011
    
    9
Don't post the same question in multiple forums.


Joanne
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAVA_HOME variable in batch file is not working properly
 
Similar Threads
JAVA_HOME variable is not working properly in bat file
run java code through bat file
Help with dos batch script
JAVA_HOME variable is not working correctrly in batch file.
Setting CLASSPATH via batch file