FAQ

Typical questions asked by Jar2Exe users


How to get more details of the error when generated exe fails to run?

If the exe file is generated as "GUI application" or "Service application", the console is not visible, so it is not convenient to debug when it fails to run, we do not know what is wrong.

There are 2 ways to get more detailed informations about the exception description:

  1. For "GUI application", you can create it as "Console application" for DEBUG, then you can get the exception on the Console window. For "Service application", you can use "yourprogram /test" at command line to run it as a console application.
  2. Another way, in the ".cfg" file, use a "stderr" to redirect the console to a file, for example "stderr yourprogram.log". Please refer to http://www.jar2exe.com/createdexe/intro/stdredir .

What is the mechanism of Jar2Exe?

Jar2Exe generate exe file by wrapping binary code around encrypted jar file. When a generated exe file runs, it starts the JVM and call the main method of entry point class. Jar2Exe does not compile java code into native code.

The binary code of generated exe files does not depend on MFC, STL, or VC runtime library on Windows, does not depend on GLIBC on Linux.

The independency of runtime library brings a good compatibility, but it lets the size of exe file a little larger, that the binary code is about 150kb ~ 300kb according the options. (While if the binary code depends on the runtime library, the size can reduce to 20kb ~ 100kb, but less compatibility.)


How to run generated exe on a computer without JRE installed?

When a 'jre' directory exists along with generated exe in the same directory, the generated exe will use the 'jre' directory first. The 'jre' directory need not to be INSTALLED, but just a COPIED 'jre' directory will work.

You can pack the 'jre' directory and your generated exe file into one install file, and let the 'jre' be extracted with your main exe file into the same directory. Since the copied 'jre' is justed copied, not normally installed by JRE's install file, other softwares cannot find it, so this copied 'jre' is a private JRE and used by your generated exe only.

  • See jvmdll page for more details.
  • See jre page for bundled jre.

Why "Java Environment not found" when generated exe runs?

1. JRE is required when generated exe runs. If you have not installed JRE, you can download it from http://www.java.com.

2. If you run generated exe files on 64 bits of Windows or Linux, please note that 32 bits of exe can run with 32 bits of JRE, 64 bits of exe can run with 64 bits of JRE.

3. On Linux, gcj is not supported.


Can generated exe file be re-encrypted by third-party softwares?

You can uncheck the "Self checksum" box at Step 6: Output if Jar2Exe is ACTIVATED, and then you can re-encrypt generated exe by third-party softwares.


Generated exe file cannot run after signed?

Same as to be re-encrypted, you need to unckeck "Self checksum" box at Step 6: Output, and then generated exe can be signed by 'signtool.exe' etc.


Why error "/lib/ld-linux.so.2: bad ELF interpreter" when generated exe file runs on Linux?

You're on a 64-bit system, and don't have 32-bit library support installed. You can install it like this:

yum install glibc.i686

Or

apt-get install ia32-libs

Where can I find the program version of Jar2Exe?

About menu is here:


Is there a free edition of Jar2Exe with basic features only?

Yes, those features without "Trial xxx days" are free to use:

  1. To create a console application without any of the "trial features" enabled, is free to use, the generated exe file will not expire after 30 days.
  2. At the bottom of License compare page, you can click the TrialPay button to click an advertisement, and then you can get a full featured license.

 

Comments

I can not show the images

Hi, I was trying with this example but my program did not do the same, when it runs, my images did not show. Is there another solution for this?

Please pay attention to the ClassLoader

Please use Thread.currentThread().getContextClassLoader() to load the protected resources, or use a "new Jar2ExeClassLoader()" to load.

If your problem not resolved, you can contact [email protected] for help. Or you can discuss with me on Skype live:sswater

Error under Java 7

I have generated a jar than runs fine on a XP machine with Java 1.7 (last version). But whe I convert it to an exe (especifiying JRE min ver 1.7.x_xxx and the same to max ver) I get the error: "Java Runtime Environment not valid" when i try to execute-it.
I've reinstalled Java several times with same results. I've no problem if I install Java 1.6 (and uninstall 1.7 ver!!!!!) and I generate the .exe  for 1.6 version.

Pages

Add new comment