我尝试使用Jwrapper从使用JDeveloper创建的jar文件创建exe。构建目录中的ezDBA- windows32-offline无法正常工作。它只显示了徽标然后挂了。
任何人都可以告诉我有什么问题吗?
运行JWrapper的批处理文件: cd C:\ JWrapper “C:\ Program Files(x86)\ Java \ jre6 \ bin \ java”-Xmx512m -jar jwrapper-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.jar
从JDeveloper生成的应用程序包含两个可以通过ezDBA.jar运行的文件
ezDBA.java:
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_Frame.java:
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();
}
}
答案 0 :(得分:0)
运行应用时,您是否在日志中看到任何内容:
http://www.jwrapper.com/guide-where-your-app-is-installed-and-logs.html
运行顺序为:
包装-... GenericUpdater -... YourVirtualAppName -...
如果您根据该订单查看最新的订单(或者只是最近创建的那个订单),您可以查看结果以查看是否记录了任何错误?
答案 1 :(得分:0)
假设您有正确的标签将您的应用程序JAR添加到JWrapper构建中,我会说您可能在JWrapper XML中使用了包ezDBA大写但不在源代码中吗?
所以JWrapper试图启动ezDBA.ezDBA,但你应该配置它来启动ezdba.ezDBA吗?