How to fill ini file for creating exe for Java app

2019-08-20 02:19发布

"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

标签: winrun4j
1条回答
乱世女痞
2楼-- · 2019-08-20 03:03

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
查看更多
登录 后发表回答