Search code examples
winrun4j

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


"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

Solution

  • 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