File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Problem with classpath in Batchfile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem with classpath in Batchfile" Watch "Problem with classpath in Batchfile" New topic
Author

Problem with classpath in Batchfile

Rahul Ba
Ranch Hand

Joined: Oct 01, 2008
Posts: 205

Below is the snippet of Batch file

set CLASSPATH=% CLASSPATH%;D:\BatchApps\RDev\RTesting\GRTesting_Config.properties.;D:\BatchApps\RDev\RTesting\log4j.properties

c:\progra~1\java\jre6\bin\java -Xms512M -Xmx512M -jar D:\BatchApps\RDev\GRTesting\GRTesting.jar
GRTesting.jar is executable jar. So, when I run this batch file, I am getting properties file not found exception that is java.util.ResourceBundle.throwMissingResourceException

Anybody has an Idea?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39478
    
  28
"=% CLASSPATH%" etc.
Shouldn't that read
"=%CLASSPATH%"
without a space?
Rahul Ba
Ranch Hand

Joined: Oct 01, 2008
Posts: 205
ya..sorry for typo mistake..In the batch file ...I do not have space anywhere.Any further suggestions?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39478
    
  28
Please read this. Shall I presume the . after Config.properties is a typo, too? Or have you missed a ;
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18708
    
    8

All of that talk of classpaths is irrelevant. You have written "java ... -jar ..." which doesn't use the classpath.
 
 
subject: Problem with classpath in Batchfile