-
Notifications
You must be signed in to change notification settings - Fork 136
When using Winrun4J the main class is not found #295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Oh i just figured a can work around this by adding |
Hi @commi! |
I do, But using winrun4j it says:
In any case we do use wrapJar=false, because we had errors reading resources from the JAR at runtime with Launch4j. |
edit: no it doesn't, the resources weren't coped because of some exception, prob nothing to do with JavaPackager |
Hi @commi! I've managed to reproduce your issue and your patch works fine. I'm not sure why this stops working 🤷♂️. You can use a customized template for the INI file as another workd around: just copy your modified version of the main.class=WinRun4JLauncher
log.level=error
ini.override=true
classpath.1=libs\*.jar
classpath.2=*.jar
#set ($classpathCounter=3)
#foreach ($cp in $info.classpaths)
classpath.${classpathCounter}=$!{cp}
#set ($classpathCounter=$classpathCounter+1)
#end
#if ($info.bundleJre)
vm.location=${info.jreDirectoryName}\\${info.winConfig.vmLocation}
#end
#if (!$info.bundleJre && $info.jreMinVersion)
vm.version.min=${info.jreMinVersion}
#end
#if ($info.useResourcesAsWorkingDir)
working.directory=.
#end
#set ($vmArgsCounter=1)
#foreach ($vmArg in $info.vmArgs)
vmarg.${vmArgsCounter}=$!{vmArg}
#set ($vmArgsCounter=$vmArgsCounter+1)
#end
[ErrorMessages]
java.not.found=A suitable version of Java could not be found on your system. Please contact ${info.organizationName}.
java.failed=Java failed to startup successfully. Please contact ${info.organizationName}.
|
Thank you that's very flexible! I'll use it for now. As for |
Hi @commi! I've just added this line to classpath.2=${info.jarFile.name}.jar Instead of loading all the JARS in your app folder, just load your app's runnable JAR. I hope this fix this issue! |
Close this issue due this fix was released in JP 1.7.2. |
I'm submitting a…
Short description of the issue/suggestion:
When using winrun4j (or why) then the EXE does not start for me. Launch4J works.
What is the current behavior?
Lauch aborts with ClassNotFoundException.
When I edit the ini and add
classpath.2=libs\*.jar classpath.2=*.jar
it works .
Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?
Output of the exe:
Working $name.ini:
Please tell us about your environment:
The text was updated successfully, but these errors were encountered: