Why cron uses old version java in my VPS (centos 5)??
I have a VPS server working on Centos 5.
I have a Java program and I can run it successfully by ssh.
However when I try to schedule this Java program by cron, it gives an error which typically occurs when an older Java version is used.
How I can configure cron to use the correct Java library? Or is there anything that I am missing?
The exception is like this
Exception in thread "main" java.lang.ClassFormatError: M (unrecognized class file version)
To find the correct files to include in your cron PATH issue this command:
as a user or root which accesses the correct version of Java.
Thanks, the problem is fixed
Thanks a lot, Steve. It works now.
Previously I tried to modify the PATH parameter defined in /etc/crontab, I wonder why it did not work.
Anyway, defining it in .sh file worked, thanks.
|All times are GMT -5. The time now is 07:08 PM.|