如何将applet转换为可执行的jar文件? [英] How to convert applet into an executable jar file?

查看:97
本文介绍了如何将applet转换为可执行的jar文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于我的问题,我需要一些帮助,w/c是使用java applet的排序算法.我想将其转换为可执行的jar文件.因为它仅在eclipse中运行,所以我不仅在eclipse中还无法在其他应用程序中运行.我该怎么办?关于我的问题有什么想法吗?您能帮我吗...谢谢!

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!

推荐答案

使用内置的eclipse导出方法并将该类导出到可执行jar中,尽管您可以简单地从通过在对象标签示例中指定类,浏览器

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,

<object

    code="GeneralDemo_2.class"

    type="application/x-java-applet"

    archive="jdatepicker.jar"

    height="300" width="450" 

>
</object>


我们尝试使用您给定的代码,但遇到问题.它不起作用.您能帮我发现问题吗?我需要您的答复.谢谢!
----------------------------------

有什么问题吗?

很简单,将applet类替换为上述代码段中的类+如果您使用其他api只是用逗号将它们替换为上述的jar.
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.


//这是我们遇到的错误

//Here is the error we encountered

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


这篇关于如何将applet转换为可执行的jar文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆