java - 如何使用 JDeveloper 使我的 java 应用程序可执行

标签 java jdeveloper

我想为我的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

您可以考虑的其他替代方案是 JSmooth , WinRun4J .

关于java - 如何使用 JDeveloper 使我的 java 应用程序可执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5696603/

相关文章:

java - 如何从 XML 文件中删除 XML 标签而不对标签名称进行硬编码

java - Swift 快速排序算法

java - 如何查找MAF应用程序版本?

java - ADF JDeveloper 11g 中的“inputFile”组件问题

java - Jdev 在迁移时崩溃

java - 在 Spring Web 服务器中创建线程以运行超时任务

Java 相当于 Kotlin 中的 arrayof()/listof()/setof()/mapof()

java - Base64 java 字符串,后缀为 .在 C# 中解码

mysql - Oracle ADF - Tomcat 6.x - MySql 5.5 - java.lang.AbstractMethodError

java - 我在运行时创建的 Swing 组件未显示在 JPanel 中