启动没有eclipse的java桌面应用程序

时间:2015-10-04 19:40:46

标签: java eclipse applet

我有一个使用IDE eclipse用java编写的游戏程序。该程序部署在服务器上,可以由浏览器中的applet启动。我也可以在日食中启动游戏。我有一个像这样的applet.launch文件来做这个伎俩:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.javaApplet">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/FW/java/src/game/client/be/fw/game/client/GameApplet.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<intAttribute key="org.eclipse.jdt.launching.APPLET_HEIGHT" value="200"/>
<stringAttribute key="org.eclipse.jdt.launching.APPLET_NAME" value=""/>
<mapAttribute key="org.eclipse.jdt.launching.APPLET_PARAMETERS">
<mapEntry key="language" value="FRANCAIS"/>
</mapAttribute>
<intAttribute key="org.eclipse.jdt.launching.APPLET_WIDTH" value="200"/>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; javaProject=&quot;FW&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;FW&quot;/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/FW/build/jars/cards.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/FW/build/jars/icones.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="be.fw.game.client.WhistApplet"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="FW"/>
</launchConfiguration>

我希望能够使用桌面启动图标启动游戏。我怎么能这样做?

1 个答案:

答案 0 :(得分:1)

在Eclipse菜单栏中,转到File,选择Export ...并将其导出为Runnable Jar。