Click here to Skip to main content
15,896,269 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need some help regarding in my problem w/c is the sorting algorithms using java applet. I want to convert it to an executable jar file. Because it only runs in eclipse,I'm having trouble in regards to run in other application not only in eclipse.What should I do? Any idea pertaining to my problem? Will you help me please...Thank you!
Posted
Updated 5-Feb-10 14:02pm
v4

use eclipse built in export method and export the class to executable jar although you can simply run the applet from a browser by specifying the class in the object tag example,

XML
<object
    code="GeneralDemo_2.class"
    type="application/x-java-applet"
    archive="jdatepicker.jar"
    height="300" width="450" 
>
</object>
 
Share this answer
 
We try to use your given code but we encounter a problem. It doesn't works.Could you help me in detecting the problem?I need your answer immediately.Thanks!
----------------------------------

What is the problem?

Its simple, put the applet class in place of the class in the above snippet + if your using other api's just comma separate them in place of the jar mentioned above.
 
Share this answer
 
v2
//Here is the error we encountered

XML
java.net.MalformedURLException: unknown protocol: c
    at java.net.URL.<init>(Unknown Source)
    at java.net.URL.<init>(Unknown Source)
    at sun.plugin.util.GrayBoxPainter.setProgressFilter(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.setupGrayBoxPainter(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.access$500(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
exception: name.
java.lang.IllegalArgumentException: name
    at sun.plugin2.applet.Applet2ClassLoader.addJar(Unknown Source)
    at sun.plugin2.applet.Applet2Manager.loadJarFiles(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Exception: java.lang.IllegalArgumentException: name


-----------------------------

1. when you run the code in eclipse does it work?
2. show me the tag your using
 
Share this answer
 
v2
XML
<object
    code="SortStarter.class"
    type="application/x-java-applet"
    archive="C:\Documents and Settings\MicroboxServer\Desktop\sorting algorithms\sorting algorithms.jar"
    height="300" width="450" 
>
</object>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900