2

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.

1 Answer 1

8

The parts of the classpath need to be separated by colons (:) on UNIX, not by semicolon (both in -cp and in LIBS).

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.