B4J Question file .jar do not run

powerino

Active Member
Licensed User
Hi everyone, why am I able to create an "executable" .jar file in release mode obfuscated, but then the .jar file does not start (after double clicking)?
 

DonManfred

Expert
Licensed User
Longtime User
Make sure to use Java 8.

Java 11 is not able to create executable jars.
You can create an executable (exe) with B4JPackager 11...
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
javac is the java compiler. you need to use the regular one with -jar filename
 
Upvote 0

powerino

Active Member
Licensed User
In reality it could not find the database, now it works, but only from the command line. If I double click on the icon it doesn't start. The problem is that the additional files used by me in the program are searched in the "user / username" folder ... so I have to understand how to create a folder where I want and copy the files that the program must look for to work
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
If I'm not wrong you can use this:

note:
- run.exe is the executable (starting from v1.14 the executable name is based on the jar name). The executable file depends on the other folders. You can distribute the executable and the folders and it will work without any other dependencies.
 
Upvote 0

powerino

Active Member
Licensed User
To create an .exe file with B4JPackager you must have an .jar file ...


I have already tried that path, but I get 3 errors that I don't understand


 
Last edited:
Upvote 0
Top