JWrapper构建java应用程序
我尝试使用Jwrapper从用JDeveloper创建的jar文件创建exe。ezDBA-生成目录中的windows32脱机不工作。它只显示了标志,然后挂了起来
谁能告诉我怎么了
要运行JWrapper的批处理文件: cd C:\JWrapper “C:\ProgramFiles(x86)\Java\jre6\bin\Java”-Xmx512m-jarjwrapper-00031607960。jar ezDBA\jwrapper ezDBA。xml
根据示例修改的JWrapper xml文件:
<?xml version="1.0"?>
-<JWrapper>
<!-- The name of the app bundle -->
<BundleName>ezDBA</BundleName>
<!-- The specification for one app within the bundle -->
-<App>
<Name>ezDBA</Name>
<LogoPNG>ezDBA/logo.png</LogoPNG>
<MainClass>ezDBA.ezDBA</MainClass>
<Param>one</Param>
<Param>two</Param>
</App>
<SupportedLanguages>en</SupportedLanguages>
<!-- App is a per-user app, it won't elevate and install for all users and the shared config folder will be per-user -->
<!-- Splash and Logo -->
<SplashPNG>ezDBA/splash.png</SplashPNG>
<BundleLogoPNG>ezDBA/logo.png</BundleLogoPNG>
<!-- JVM options (e.g. extra memory) -->
-<JvmOptions>
<JvmOption>-Xmx556m</JvmOption>
</JvmOptions>
<!-- The JREs JWrapper should use for Windows, Linux32, Linux64... -->
<Windows32JRE>JRE-1.7/win32/jre1.7.0_05</Windows32JRE>
<Windows64JRE>JRE-1.7/win32/jre1.7.0_05</Windows64JRE>
<Linux32JRE>JRE-1.7/linux/jre1.7.0_13</Linux32JRE>
<Linux64JRE>JRE-1.7/linuxx64/jre1.7.0_13</Linux64JRE>
<Mac64JRE>JRE-1.7/macos64/jre1.7.0_45.jre</Mac64JRE>
ezDBA/ezDBA。罐子
由JDeveloper生成的应用程序,带有两个文件,在ezDBA中运行正常。罐子
ezDBA。爪哇:
import java.awt.Dimension;
import java.awt.Rectangle;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class ezDBA_Frame extends JFrame {
private JLabel jLabel1 = new JLabel();
public ezDBA_Frame() {
try {
jbInit();
} catch (Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.getContentPane().setLayout( null );
this.setSize( new Dimension(400, 300) );
jLabel1.setText("This Is A Jwrapper Test");
jLabel1.setBounds(new Rectangle(115, 90, 135, 30));
this.getContentPane().add(jLabel1, null);
}
}
和ezDBA_框架。爪哇:
package ezdba;
import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.UIManager;
public class ezDBA {
public ezDBA() {
JFrame frame = new ezDBA_Frame();
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = frame.getSize();
if (frameSize.height > screenSize.height) {
frameSize.height = screenSize.height;
}
if (frameSize.width > screenSize.width) {
frameSize.width = screenSize.width;
}
frame.setLocation( ( screenSize.width - frameSize.width ) / 2, ( screenSize.height - frameSize.height ) / 2 );
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
frame.setVisible(true);
}
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
e.printStackTrace();
}
new ezDBA();
}
}
# 1 楼答案
运行应用程序时,您是否在日志中看到任何内容:
http://www.jwrapper.com/guide-where-your-app-is-installed-and-logs.html
运行顺序为:
包装纸-。。。 通用更新程序-。。。 YourVirtualAppName-
如果您查看基于该顺序的最新版本(或仅查看最近创建的版本),您可以查看末尾,查看它是否记录了任何错误
# 2 楼答案
假设您有正确的标记将应用程序JAR添加到JWrapper构建中,我想说也许您在JWrapper XML中使用了ezDBA包,但在源代码中没有
所以JWrapper正在尝试启动ezDBA。但是您应该将其配置为启动ezDBA。ezDBA