cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Shell Script Question.... [java related]

Former Member
0 Kudos

Hey guys! This is my first post, as im new here :S

I have a simple problem for a big program.

We have a .sh to install it, but when I run the .sh in terminal like i should, It says the class is not found. I believe it has to do with the syntax, as the person who made it is not a linux pro. I don't know MUCH about shell scripts, but I'm pretty sure I know where the error lies.

Our Script:

java -classpath ./:./jars/tools.jar:./jars/nexus.jar impsoft.nexus.installer.Install

chmod a+x run.sh compile.sh

The Error:

Exception in thread "main" java.lang.NoClassDefFoundError: impsoft/nexus/installer/Install

What I think the problem is:

./jars/nexus.jar impsoft.nexus.installer.Install

Thank you for ALL of your help!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Justin,

Have you tried running the lines from the command line?

The second thing you may want to try is changing the relative directory for the jar file from a relative one to a fixed directory. From the error, it appears that the install program is running but it is not able to locate a library mentioned in the program (which is probably the jar file listed in the classpath).

Hope that helps.

J. Haynes

Denver