com.sun.java.swing vs javax.swing
843805Mar 8 2007 — edited Mar 9 2007All -
I have a Java web application which is supported for Windows 2000 and NT developed using JDK 1.2 (It has Swing components using the package com.sun.java.swing).
Now Users are required to use SUN JRE 1.5.
My Application uses a Swing JApplet. There are some supporting JAR (Swingall.jar) files installed on the client to enable the Swing components. It works fine on Windows 2K, but it breaks on Windows XP. More specifically, it throws an Exception:
java.lang.NoClassDefFoundError: com/sun/java/swing/Japplet
When the same application invoked using MSJVM in the Browser it works fine. Is MSJVM uses Java Version 1.2 or the previous one?
Does anybody have any thoughts as to why it works for Windows 2K but won't load the JApplet for Windows XP with SUN JRE 1.5?
Please advise regarding do i need to change my application code to use javax.Swing package rather than com.sun.java.swing? The reason is Sun introduced javax.swing package after wards com.sun.java.swing is not used at all by Developers.
Thanks