Could not find or load main class
Hi everyone,
I am trying to execute an sh file but I get the error:
Could not find or load main class test.test
The content of the sh file is:
#! /bin/sh
properties=....properties
config=....xml
classdir=..dir..
servletlib=....
java -Xmx1000m -Xss1024k -cp test.jar:$servletlib test.test $properties $config $classdir
As the sh file is in the same directory as the test.jar, I even tried .. -cp ./test.jar .... but, it still did not work.
If its important I'm using Win7 and Git bash in order to execute the file.
Could anyone please guide me?
Regards
Re: Could not find or load main class
The command I would use to execute a jar file called MyJar.jar file would be:
$ java -jar MyJar.jar
('$' is my prompt, not part of the command.)
Re: Could not find or load main class
Thanks for the response.
I agree with you but, this is the way I'm forced to use this shell script in order to execute a tool that I need for testing.
The way of execution is as I mentioned and I can not change it.
Could you guide me?
Regards