How to fill ini file for creating exe for Java app with libs (WinRun4J)

允我心安 提交于 2019-12-25 12:00:41

问题


"MyApp" folder has now the following structure:

- MyApp     
  - lib
    - MyLib.jar
  - MyApp.jar

MyApp.jar has a manifest with Class-Path: lib/MyLib.jar

I want to add MyApp.exe file to "MyApp" folder. So I put all files required to create exe via WinRun4J to "MyApp" folder. Then I run bat file as described here. That gives me exe file with a proper icon but all I see when I run it is a splash screen. Where am i wrong? My ini file content:

main.class=my.main.class
classpath.1=lib/MyLib.jar
splash.image=SplashScreen.gif

回答1:


You will have to include your main jar as well:

main.class=my.main.class
classpath.1=MyApp.jar
classpath.2=lib/MyLib.jar
splash.image=SplashScreen.gif

or to simply include all jars:

main.class=my.main.class
classpath.1=*.jar
classpath.2=lib/*.jar
splash.image=SplashScreen.gif


来源:https://stackoverflow.com/questions/15428347/how-to-fill-ini-file-for-creating-exe-for-java-app-with-libs-winrun4j

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!