JWrapper build not running correctly.

After building and running the application file a load screen appears for a couple of seconds then disappears. After that, my program does not run.

I have tried setting up my project folder exactly like the example project from the jwrapper website. I am able to build and run the application from that example.

Not entirely sure if I have the XML correct or if I’m not creating my jar correctly.

Folder I copy jre into and run jwrapper (including jar and xml and everything else required):

http://www.4shared.com/zip/qOA-V1lnba/jwraptest.html

I go to this directory, type “java.exe -Xmx512m -jar jwrapper-00031607960.jar gameapp\jwrapper.xml” and it appears to build fine.

This is how I compiled:

javac -sourcepath $SRC -d $BIN Game.java Draw.java Frame.java

This is how I compiled jar (command line in bin dir):

jar -cvmf manifest.txt game.jar game

manifest was: "Main-Class: game.Game
"

Jar runs fine on its own. There is no error, I just can’t run the application from the build. It has a loading screen on the first run, but nothing after that. It pops up in processes but that’s about it.

should i really download linux jre mandatorily?

Hahahaha what?

I am looking at packr now. No clue what’s going on with jwrapper.

Hopefully I can get past my own incompetence with packr.

Forget it… :slight_smile:

Good to know.

Tell me, you specified 32 bit jre for both win tags?

For jwrapper? Yeah I did:

Just to be sure, here it is what you meant?


<Windows32JRE>JRE-1.7/win32/jre1.7.0_05</Windows32JRE>

<Windows64JRE>JRE-1.7/win32/jre1.7.0_05</Windows64JRE>

yep

Do you have any experience with packr?

I am kind of having the same problem with it ;D

I get this error during build:

SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”
SLF4J: Defaulting to no operation (NOP) logger implementation

But it goes on with the build and seems to complete fine. That error/warning doesn’t seem too important ???

The app generated doesn’t run at all.

The jar runs fine. I have a question: do you just run the jar, and it runs the .exe for the JVM? Or am I doing something wrong…

the .json file…


{
    "platform": "windows",
    "jdk": "C:/dev/OpenJDK/openjdk-1.7.0-u60-unofficial-windows-i586-image.zip",
    "executable": "game-exe",
    "appjar": "C:/dev/gameapp/bin/game.jar",
    "mainclass": "game/Game",
    "vmargs": [
    	"-Xmx1G"
    ],
    "minimizejre": "soft",
    "outdir": "out-win"
}

Everything else is exactly the same as in OP

I didn’t hear about that. I think I have ;D

I badly slept this night and gonna freaking out with specifying jre’s location.
I thought it’s enough to specify JAVA_HOME and JRE_HOME ::slight_smile:
and I can work with win jre …

jar runs fine. Building exe in process

Oh thanks so much! Are you using jwrapper or packr?

I use jwrapper but exe shows splash once then nothing…

Indeed…exactly my problem :confused:

It’s the warning of ‘Simple Logging Facade for Java’. Nothing special.

Hopefully someone who has experienced this issue before sees this post :confused:

I tried them all. JSmooth is the only Windows native launcher that works properly for me. Launcher4j launches a java.exe process, which is most of the reason to be using a native launcher. Even JSmooth doesn’t work as a service and I don’t think works when wrapping a JRE. Also it generates a terrible icon, but I just change that using Resoruce Hacker. Commands to fix the icon:


ResHacker.exe -delete build/Clippy.exe, build/Clippy.exe, ICONGROUP, A, 1033
ResHacker.exe -delete build/Clippy.exe, build/Clippy.exe, ICONGROUP, A2, 1033
ResHacker.exe -add build/Clippy.exe, build/Clippy.exe, build/icon.ico, ICONGROUP, MAINICON, 0

So what options do I have when I want to wrap a JRE?

If I wanted to make a game in java, and release it so it has the best chance of running on someones system without the user worrying about having the correct jre installed?

You can use Launch4j if you are ok with the process running as “java.exe”. I tried some other projects, but they were old and no longer maintained (JSmooth included). You can use packr or write your own launcher using packr as an example. packr is a good solution if you are bundling a JRE. It doesn’t do system JRE/JDK search at all, so isn’t an option if not bundling a JRE. packr is quite minimal and can be a bit frustrating if misconfigured, since it doesn’t have an option for a log file. What I did was build the native launcher from the VS project after setting it to be a console app so I can see the damned logging. Ultimately I wrote my own launcher for Spine, based on packr’s code.

Interesting. Well it sounds like packr should work for me. But I’m having this problem where the exe wont even run, so I have no clue how to debug???

I can’t even get the TestApp to build and run correctly. Were you able to do so? I have no idea what I’m doing wrong. I’ve tried rebuilding in 5 different ways since I woke up. (Talking about packr)

TestApp? You just need to run packr as the docs show.