Friday, 15 July 2011

java class main error for crontab -



java class main error for crontab -

when seek run exe jar file in unix:

$ java -jar /tnpm_pm_test.jar

it runs without errors when seek add together in crontab

*/15 * * * * /usr/bin/java java -jar /home/user1/tnpm/tnpm_pm_test.jar &> /dev/null

i'm getting error below:

exception in thread "main" java.lang.noclassdeffounderror: version caused by: java.lang.classnotfoundexception: version @ java.net.urlclassloader$1.run(urlclassloader.java:217) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:205) @ java.lang.classloader.loadclass(classloader.java:323) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:294) @ java.lang.classloader.loadclass(classloader.java:268) not find main class: version. programme exit.

i'm not sure exaclty difference between running independently , using crontab. knows?

whereis java = java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java java = /usr/bin/java

you have administrator set output /dev/null. set file in home directory , add together entry crontab delete file occasionally.

java

No comments:

Post a Comment