daitt
asked on
Swing applet deployment
I wrote an applet using Swing. When I deployed the applet, it seemed that I have to put all the swing class into the jar file. If I missed something, the excetion should be like this:
java.lang.Error: can't load javax.swing.plaf.metal.Met alLookAndF eel
at java.lang.Throwable.<init> (Compiled Code)
at java.lang.Error.<init>(Com piled Code)
at javax.swing.UIManager.init ializeDefa ultLAF(Com piled Code)
at javax.swing.UIManager.init ialize(Com piled Code)
at javax.swing.UIManager.mayb eInitializ e(Compiled Code)
at javax.swing.UIManager.getU I(Compiled Code)
at javax.swing.JPanel.updateU I(Compiled Code)
at javax.swing.JPanel.<init>( Compiled Code)
at javax.swing.JPanel.<init>( Compiled Code)
at javax.swing.JRootPane.crea teGlassPan e(Compiled Code)
at javax.swing.JRootPane.<ini t>(Compile d Code)
at javax.swing.JApplet.create RootPane(C ompiled Code)
at javax.swing.JApplet.<init> (Compiled Code)
(Running with NetscapeNavigator 5.7. When running with IE5: class can not instantiated).
How can I pre-install swing on the client machine so that the jar file for the applet doesn't need to be too big? Do I need to install the packages manually for each client machine, or just put some kind of plugin on the web?
This question is applied for Netscape Navigator and Internet Explorer.
Thank you.
java.lang.Error: can't load javax.swing.plaf.metal.Met
at java.lang.Throwable.<init>
at java.lang.Error.<init>(Com
at javax.swing.UIManager.init
at javax.swing.UIManager.init
at javax.swing.UIManager.mayb
at javax.swing.UIManager.getU
at javax.swing.JPanel.updateU
at javax.swing.JPanel.<init>(
at javax.swing.JPanel.<init>(
at javax.swing.JRootPane.crea
at javax.swing.JRootPane.<ini
at javax.swing.JApplet.create
at javax.swing.JApplet.<init>
(Running with NetscapeNavigator 5.7. When running with IE5: class can not instantiated).
How can I pre-install swing on the client machine so that the jar file for the applet doesn't need to be too big? Do I need to install the packages manually for each client machine, or just put some kind of plugin on the web?
This question is applied for Netscape Navigator and Internet Explorer.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for your great helps. slok's answer is the basic solution, clients must go download and install the plugin themselves. my_moon's code allows my webpage to download and install the plugin automatically if it's not been installed (I'll use this code).
Who should I give the points to?
Who should I give the points to?
just some correction here :
the code that I posted will help the user download the plugin as well
if it detects that the user did not install the plugin.
the only reason why I ask you to download and install the plugin first
is so that you will not be prompted to download the plugin.
Rather, you will have the environment setup and ready to debug your
applet.
However, my_moon also include the HTML code for MSIE which I did not.
the code that I posted will help the user download the plugin as well
if it detects that the user did not install the plugin.
the only reason why I ask you to download and install the plugin first
is so that you will not be prompted to download the plugin.
Rather, you will have the environment setup and ready to debug your
applet.
However, my_moon also include the HTML code for MSIE which I did not.
ASKER
Sorry i didn't get the solutions exactly.
I got this error with MSIE code:
Cancel Java(TM) Plug-gin installation due to user's request or downloading errors.
Java applets or JavaBeans components in this HTML page will not be displayed properly in Internet Explorer. To restart the installation, please refresh the HTML page in Internet Explorer
Anyway I think I don't need the advantage for IE. I'll give slok the points.
Thanks for you two.
I got this error with MSIE code:
Cancel Java(TM) Plug-gin installation due to user's request or downloading errors.
Java applets or JavaBeans components in this HTML page will not be displayed properly in Internet Explorer. To restart the installation, please refresh the HTML page in Internet Explorer
Anyway I think I don't need the advantage for IE. I'll give slok the points.
Thanks for you two.
ASKER
For more information about java 1.2.2 plugin for the intranet:
http://java.sun.com/products/plugin/1.2/docs/intranet.html
http://java.sun.com/products/plugin/1.2/docs/intranet.html
<OBJECT classid="clsid:8AD9C840-04
width="900" height="600" align="baseline"
codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">
<PARAM NAME="code" VALUE="Applet.class">
<PARAM NAME="type" VALUE="application/x-java-
<PARAM NAME="model" VALUE="models/HyaluronicAc
<PARAM NAME="scriptable" VALUE="true">
<COMMENT>
<EMBED type="application/x-java-a
height="600" align="baseline" code="Applet.class"
model="models/HyaluronicAc
pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html">
<NOEMBED>
</COMMENT>
No JDK 1.2 support for APPLET!!
</NOEMBED></EMBED>
</OBJECT>
Change Applet.class with your applet name.