0

I am facing a issue while executing a java program using a batch file.

My batch file looks like -

java -cp .;/lib/commons-codec-1.9.jar;/lib/commons-logging-1.1.3.jar;/lib/junit-4.11.jar;/lib/log4j-1.2.17.jar;/lib/poi-3.11-20141221.jar;/lib/poi-examples-3.11-20141221.jar;/lib/poi-excelant-3.11-20141221.jar;/lib/poi-ooxml-3.11-20141221.jar;/lib/poi-ooxml-schemas-3.11-20141221.jar;/lib/poi-scratchpad-3.11-20141221.jar;/lib/xmlbeans-2.5.0.jar; com.migrate.MigrUtil

The lib folder is in the same directory as of the batch file. But its not been able to detect the jar file. Its works fine when I mention the absolute path to the jars file e.g c:\test\lib\commons-codec-1.9.jar

Any help on this guys?

1 Answer 1

6

Your problems is that you specify /lib/... instead of lib/.... As a result, the system looks to the root of your filesystem for the jars.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.