NoClassDefFoundError on UNIX, but not on PC

C

clay

Morning,

Created a program with Eclipse which pulls in data, formats it, and
sends to a web service. Having no trouble getting everything to run on
the PC side.

Trouble comes up when moving to UNIX. Seems that any way I run the
program I get the error: Exception in thread "main"
java.NoClassDefFoundError: com/supplychain/DemandForecast, whether I
execute from inside the directory with no classpath, using the
classpath, or using the script below.

The script file I am using to run the program sets up the file path and
the classpath as follows:

#!/bin/ksh
export PROG_HOME=/opt/c20/batch/lib
java -cp
..:$PROG_HOME/c20.jar:$PROG_HOME:$PROG_HOME/rt.jar:$PROG_HOME/classes12.zip:$PROG_HOME/log4j-1.2.9.jar:$PROG_HOME/soap.jar:$PROG_HOME/mail.jar:$PROG_HOME/activation.jar:$PROG_HOME/wsif.jar:$PROG_HOME/wsif-j2c.jar:$PROG_HOME/wsdl4j.jar:$PROG_HOME/qname.jar:$PROG_HOME/xerces.jar:$PROG_HOME/commons-logging-api.jar:$PROG_HOME/xalan.jar:$PROG_HOME/j2ee.jar:$PROG_HOME/wsatlib.jar:$PROG_HOME
com.supplychain.DemandForecast $1

I have checked the jar file and the Manifest contains the correct
location of main and I have included all of the libraries that were
included by eclipse.
Any help you can provide would be most appreciated.

Thanks.
 
L

Lee Fesperman

clay said:
Morning,

Created a program with Eclipse which pulls in data, formats it, and
sends to a web service. Having no trouble getting everything to run on
the PC side.

Trouble comes up when moving to UNIX. Seems that any way I run the
program I get the error: Exception in thread "main"
java.NoClassDefFoundError: com/supplychain/DemandForecast, whether I
execute from inside the directory with no classpath, using the
classpath, or using the script below.

The script file I am using to run the program sets up the file path and
the classpath as follows:

#!/bin/ksh
export PROG_HOME=/opt/c20/batch/lib
java -cp
.:$PROG_HOME/c20.jar:$PROG_HOME:$PROG_HOME/rt.jar:$PROG_HOME/classes12.zip:$PROG_HOME/log4j-1.2.9.jar:$PROG_HOME/soap.jar:$PROG_HOME/mail.jar:$PROG_HOME/activa
com.supplychain.DemandForecast $1

I have checked the jar file and the Manifest contains the correct
location of main and I have included all of the libraries that were
included by eclipse.
Any help you can provide would be most appreciated.

You didn't list the actual directory structure for the class file, but I would guess
that the problem is that UNIX file systems are case-sensitive for file/directory names.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top