Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help JAVA Jar stuff

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I've written an Java application which I am trying to use as an applet across our office network. The problem is i've never used Java to write applets before so i've run into a few problems.

The original applet was coded in 1.4, using a lot of Swing stuff, so my understanding is that I have to include a swing.jar file alongside the applet and create an archive reference to it in the applet tag. I have also created a jar file to contain all the class files for my application.

This doesn't seem to work. I always get a class not found exception in my brower (IE, Windows XP) when loading the applet page. The class file DOES exist in the jar file, which is in the same directory as the .html file.

On another computer (IE, Windows 95) I get ClassFormatException.. which I assume is due to compiling the application with a jdk1.4 javac. On another computer (IE, Windows XP), I get a prompt to load a plugin at microsoft.com (although that page doesn't seem to exist anymore).

I think i'm encountering more than one problem here. I have noticed that the example plugin applets at java.sun.com/products/plugin/1.4/demos/applets.html also do not run in my IE browser (with a class not found error), although with Netscape I get a prompt to download the plugins.... so is this a browser problem?

Do I need to compile to application with a jdk1.1 javac in order to use it for a browser applet? If I want to do this, how do I get it to also compile the Swing stuff?

thanks,
pat.
 
You do not need to include the swing classes in your jar. The problem is that Microsoft implemented their own plug-in for java. Unfortunatley, it doesn't work all that well and is really out of date. What you need to do is go to the sun web site and download the new plug-in for java 1.4. This plug-in will include all of the classes (including the swong classes) that you will need.

-gc "I don't look busy because I did it right the first time."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top