Missing something...
I've been learning/working in Java for about a month now. I've got an application finished and it works fine on my desktop (Windows 2000 using NetBeans IDE). But I'm having problems getting it to work on the server (Solaris). I'm sure it's something simple that I'm overlooking but I just can't find it!
The app consists of 5 class files, all in a package named 'ewlr'. I've placed them on the server in the /local/apps/java/PMJ/ewlr path. The app uses the log4j-1.2.jar file (logging stuff), classes12.zip (Oracle stuff), and two other jar files (web services stuff) from a third-party. I've placed all of those plus two properties files into the /local/apps/java/PMJ path. The app gets run by a shell script:
--
#!/bin/csh
#
# RUN_PATH needs to be set to cwd.
#
set RUN_PATH=/local/apps/java/PMJ
set JAVA_HOME=/usr/jdk/instances/jdk1.5.0
setenv CLASSPATH $RUN_PATH/log4j-1.2.jar:$RUN_PATH/classes12.zip:$RUN_PATH/WebService.jar:$RUN_PATH/webservice
client.jar:$RUN_PATH/ewlr:$RUN_PATH
cd $RUN_PATH
$JAVA_HOME/bin/java ewlr.Main $RUN_PATH/
--
When I run the app, I get 'Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger'. The error happens on this line:
private static Logger logger = Logger.getLogger(Main.class.getName());
So why can't it find the Logger class? I've explicitly included the jar file that contains that class in the classpath via the shell script. What am I overlooking/missing? Like I said, it works fine on my desktop (though I don't run it via a script).
Thanx in advance to any tips/hints you can provide! And sorry this ended up being so long...
Dave
Message was edited by:
DaveKub
Message was edited by:
DaveKub

