Reputation: 2206
In Netbeans 8.1, After I Clean and Build my Java app (Desktop Application), I got my app.jar in dist folder. Then i want to take those app.jar to become app.exe using Launch4j
The problem is, in my app, I use this library java telegram . If I double clicked directly to app.jar, everything is OK, my app can send message to telegram. But why, when it becomes .exe, I got
Exception in thread "Thread-3" java.lang.NoClassDefFoundError: com/pengrad/telegrambot/request/BaseRequest
Please advise.
Upvotes: 0
Views: 910
Reputation: 2206
Thanks for @Maciej
In Launch4j you have a Classpath tab - check Custom classpath, provide full qualified class name in Main class field and add a java-telegram library as an entry into Classpath list. It should be a relative path to that lib
Upvotes: 1