Swing in IE (4.o and above)

When executing a swing applet in IE 5.0, i'm getting an error, load: class cannot be instantiated. Does any one face this problem ?
Please help me
[160 byte] By [GaneshKJ] at [2007-11-15 19:10:25]
# 1 Re: Swing in IE (4.o and above)
It is because browser was unable to find the base class for the applet 'JApplet'.

U will have to include the path of 'swingall.jar' file (which contains all the swing classes) in the CLASSPATH variable.

Just in case u don't know how to set CLASSPATH ...
Assuming the path to swingall.jar is 'C:\swing-1.0.1\swingall.jar'

FOR WINDOWS 9x

1. Insert the following line at the end of your 'AUTOEXEC.BAT' ...

set CLASSPATH=%CLASSPATH%;C:\swing-1.0.1\swingall.jar

2. Then restart your computer. After this it should work with IE.
NOTE: Just setting the CLASSPATH variable in DOS Window will not work. Even after making changes to 'AUTOEXEC.BAT', u must restart the computer.

FOR WINDOWS-NT
1. Right click 'My Computer' icon and start the 'Properties'
2. Go to Environment tab...
3. Set/Modify the CLASSPATH variable to include the path 'C:\swing-1.0.1\swingall.jar'

NOTE: U don't have to restart the computer after this, but u will have to close all the Command prompts as they will not reflect the changes.

I have used this technique for IE4.0 I think it will work for IE5.0 also.
unicman at 2007-11-10 3:02:08 >
# 2 Re: Swing in IE (4.o and above)
Hi unicman,

I'm working with jdk1.2. I've searched for the file swingall.jar. It was not there. Here it's present in another file called rt.jar. I've got another hint saying that seperate plugin has to be downloaded.

Regards,
Ganesh
GaneshKJ at 2007-11-10 3:03:00 >
# 3 Re: Swing in IE (4.o and above)
For JDK1.2 u will have to download JDK1.2 plug-in I also agree with that. Otherwise u can't use swing components.

But if u would have been using JDK1.1 and JFC, u could have used swing components in IE4.0 also.

I'm sorry. I didn't know u r using JDK1.2.
I guessed u would be using JDK1.1.5 (or more) as it is supported by IE4.0 and the only problem u have is in using Swing components.
unicman at 2007-11-10 3:04:10 >
# 4 Re: Swing in IE (4.o and above)
Thanx Unicman,

I done the downloading of java plug in and found the soln also. One more thing we need to do is the usage of HTMLConvertor. This is because the applet tag won't be supported by the SunJVM and we need to use the Object tag. For more information please look at the documentation.

Thanx alot for the respond
GaneshKJ at 2007-11-10 3:05:06 >
# 5 Re: Swing in IE (4.o and above)
Hi,
Any browser will give you problems with swing components in the applet. (Not only IE). The reason is, swing is not inbuilt in the browser. In otherwords, swing components are not part of the Java classes that the broswer carries with itself. So, other than the plugin, another way to do that is, extract all the swing related classes (including their parent classes) in a separate jar file. Specify that jar fine in APPLET tag and specify the codebase if necessary..That will also work..
amaresh at 2007-11-10 3:06:05 >