Reputation: 1486
I have a problem changing a windows batch file into a unix shell script to execute the same java code on my linux machine.
My shell script looks like that:
#!/bin/bash
libdir=../lib
bindir=.
LIBS=$libdir/lib_1.jar;$libdir/lib_2.jar;$libdir/lib_3.jar;$libdir/lib_4.jar
java -cp $bindir;$LIBS com.sample.SampleServer
For me it looks correct but I am getting the following error message:
Failed to load Main-Class manifest attribute from /home/user/development/lib/lib_2.jar
Thanks in advance for your help.
Upvotes: 2
Views: 8655
Reputation: 262474
The parts of the classpath need to be separated by colons (:) on UNIX, not by semicolon (both in -cp and in LIBS).
Upvotes: 8