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!

Hey There,

I think the problem might be in the classpath definition on the command line:

java -classpath ./:./jars/tools.jar:./jars/nexus.jar

Since all the paths start with "./" you'd have to be in the directory with the jars subdirectory when you run the install.sh script.

That's my first inclination. Let me know if that's off-base and I'll try to help you out some more. If possible, and it won't be a security problem for you, can you also past the output from

set
pwd
ls

while you're logged in. That might help me see the problem.

Best Wishes :)

, Mike

I'm sorry,

I hit return before I meant to. Also, try checking (with the "set" command), what your java classpath is set to in your environment. You should add that as $classpath or $CLASSPATH or $CATALINA_HOME, etc at the end of the colon (:) separated classpath that you call on the command line. Since it's explicit, you may be unintentionally not including some basic jar files that you need to run the installer.

Thanks :)

, Mike

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.