Hi All,
I'm new to Java and am still confused by many things.
Let me first state the problem that I want to solve: I have an application that is made to work as a bunch of web pages generated locally according to user's input and using Javascript. The missing element is access to SQL (MS SQL Server 7.0, in my case). After a lot of browsing, I concluded that, with Firefox as browser, my only way to access the DB locally (without a running web server) would be through a Java applet.
I got inspiration from the web, created an applet, installed the latest JDK, and failed to run. The error message looks like this:
Java Plug-in 1.6.0_26
Using JRE version 1.6.0_26-b03 Java HotSpot(TM) Client VM
User home directory = C:\Users\Timisoara
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
java.lang.UnsupportedClassVersionError: HelloWorld : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknow n Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(U nknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Un known Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.UnsupportedClassVersionError: HelloWorld : Unsupported major.minor version 51.0
I kept searching the web, concluded that I'm trying to see a 1.7 binary code with a 1.6 able browser, and looked for alternatives.
In my search, I stumbled over this "Hello World" applet. And now comes the puzzling part: if I try to run the example from their web site, it works. If I download the .class and .html files provided, and run them locally (same browser), I end up with the same error message.
What's the explanation? How can I go over this error?
Thanks,
SxN