I have serious problem with this small java program that could not run on opensuse 13.1; therefore, I’m looking for help resolve it. I downloaded this: linux x64 135.6mb jdk-8u20-linux-x64.rpm on opensuse 13.1. I wrote this little program from a tutorial book:
/*
This is just to try this sample java program
Call this program Example.java
*/
call Example {
public static void main(String args]) {
double gallons; // holds the number of gallons
double liters; // holds conversion to liters
I used chmod for permission to execute the program
Compile the program: javac Example.java
Run the program: java Example
The result was series of errors:
Exception in thread “main” java.lang.UnsupportedClassVersionError: Example:Unsupported major.minor version 52.0
at java.lang.Classloader.defineClass1(Native Method)
and more 14 lines of errors that's needless to write them here.
Please could you check this program and point out where I did something wrong. Thanks
Thanks for the correction; this was typo error, instead of class Example, I wrote call Example. The problem has not been resolved. Even with class Example, the program still produces errors. Please I still need help to resolve this problem. Thanks.