我想为我的java项目创建一个可执行文件,我记得以前我是通过Jbuilder或netbean来做的,但我不知道应该如何在JDeveloper中制作可执行文件(EXE文件)
请给我建议,请描述清楚......
编辑: 这是简单的桌面应用程序。它不是 Web 应用程序......
编辑2: 我删除了用于检查参数的部分并运行我遇到此问题的程序: 我该怎么办?
Executing: C:\JDeveloper\mywork\SourceManagmentTools\Client\deploy\SMT.exe
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: oracle/jdeveloper/layout/VerticalFlowLayout
at Main.GUI.SmMainFrame.<init>(SmMainFrame.java:134)
at Main.GUI.SmRun.<init>(SmRun.java:25)
at Main.GUI.SmRun$1.run(SmRun.java:82)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: oracle.jdeveloper.layout.VerticalFlowLayout
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 17 more
最佳答案
您考虑过Launch4j ?
关于您的配置问题,Launch4J documetation说:
运行时的其他 JVM 选项
When you create a wrapper or launcher all configuration details are compiled into the executable and cannot be changed without recreating it or hacking with a resource editor. Launch4j 2.1.2 introduces a new feature that allows to pass additional JVM options at runtime from an .l4j.ini file. Now you can specify the options in the configuration file, ini file or in both, but you cannot override them. The ini file's name must correspond to the executable's (myapp.exe : myapp.l4j.ini). The arguments should be separated with spaces or new lines, environment variable expansion is supported, for example:
# Launch4j runtime config
-Dswing.aatext=true
-Dsomevar="%SOMEVAR%"
-Xms16m
关于java - 如何使用 JDeveloper 使我的 java 应用程序可执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5696603/