我有一个使用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="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="FW" path="1" type="4"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="FW"/> </runtimeClasspathEntry> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/FW/build/jars/cards.jar" path="3" type="2"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/FW/build/jars/icones.jar" path="3" type="2"/> "/>
</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>
我希望能够使用桌面启动图标启动游戏。我怎么能这样做?
答案 0 :(得分:1)
在Eclipse菜单栏中,转到File,选择Export ...并将其导出为Runnable Jar。