Hello
I have the following batch file in NT
C:
cd C:\Neti\JavaProgs\062806\FlieWatch
java -cp %CD%;%CD%\lib\j2ee.jar;%CD%\lib\mail.jar;%CD%\lib\log4j-1.2.13.jar;%CD%\lib\commons-logging-1.1.jar; FileAlert DEV
pause
The application now needs to be moved to solaris environment. So I changed the batch file to shell script as follows
for name in /home/ln52701/FileWatcher/lib/*.jar ; do
CP=$CP:$name
done
CP=$CP:/home/ln52701/FileWatcher/lib/FA.jar
java -cp $CP FileAlert DEV 2>/home/ln52701/FileWatcher/lib/log.err 1>/home/ln52701/FileWatcher/lib/log.out
When I run the script I am getting the following error
Exception in
thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Category
~
~
I beleive the script file is not recognizing the jars properly...
I tried to compile the source files individually
$ javac -classpath /home/ln52701/FileWatcher/source/lib/log4j-1.2.13.jar ApplicationProperties.java
ApplicationProperties.java:10: cannot resolve symbol
symbol : class Logger
location: package log4j
import org.apache.log4j.Logger;
^
ApplicationProperties.java:22: cannot resolve symbol
symbol : class Logger
location: class ApplicationProperties
private static Logger log;
^
2 errors
$
Am I giving wrong path or where its going wrong....
Thanks In advance for help
Sridhar