Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

com.sun.java.swing vs javax.swing

843805Mar 8 2007 — edited Mar 9 2007
All -

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 6 2007
Added on Mar 8 2007
2 comments
356 views