Getting `UnsupportedClassVersionError : Bad Version number in .class file` in Sun os 5.10 version

32 views Asked by At

I am using Sun os 5.10 version unix server and executing a bash script which is calling a java class. When I run that script manually the java class executes successfully . But when I execute the same script using crontab job I am getting the below error

Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file

I had compiled the java class with all Java versions starting from 1.8 to 1.4 but still i get that error.. the unix server has Java 1.6 version

0

There are 0 answers