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


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.



exe not working when build from command line

exe jar nor norking when build from command line but same is working fine when i use GUI application.. in error its showing main class not defind , but i have define mail class. 

when build from application exe size become 11MB but when build from command line exe size become 9.25MB

Command which i used:

j2ewiz /regname xxxxxxx /regkey xxxxxx C:\Users\admin\Desktop\digivalet-bms-5.jar  /minjre 1.8.x_xx  /maxjre 1.8.x_xx  /platform linux /type console /m com.digivalet.core.DVBmsMain /platform linux /encrypt /embed C:\Users\admin\Desktop\digivalet-bms-lib.zip  /amd64

Hi Team,

Hi Team,

Please provide details for below

Is .NET framework required while generating exe .or while executing the generated exe

is so from which version of .NET framework is needed.

V2.2 Personel License

Hi I am Willing to Purchase Personel License V2.2 does it include Hide and Encrypt Class Protection.

Exceptions when using AdoptOpenJDK 11

We get this kind of exceptions in gui-application when using AdoptOpenJDK v. 11 and Jar2exe 2.5:

210118:064115.617 Session started
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at com.regexlab.j2e.Jar2ExeLauncher.main(Jar2ExeLauncher.java:48)
Caused by: java.lang.NoClassDefFoundError: org/jasypt/exceptions/EncryptionOperationNotPossibleException
at com.cardiscope.db.MainInstance.<init>(MainInstance.java:70)
at com.cardiscope.db.DatabaseConfig.scanConfigurations(DatabaseConfig.java:169)
at com.cardiscope.db.DatabaseConfig.<init>(DatabaseConfig.java:136)
at com.cardiscope.db.DatabaseConfig.main(DatabaseConfig.java:564)
... 8 more
Caused by: java.lang.ClassNotFoundException: org.jasypt.exceptions.EncryptionOperationNotPossibleException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at com.regexlab.j2e.Jar2ExeClassLoader.findClass(Jar2ExeClassLoader.java:107)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 12 more

The exe has been converted with options:

/type windows /minjre 11 /platform windows /amd64 /encrypt /checksum:false /runasadmin /config "libs ./lib" /config "jre_order cesi" /authorize

JRE version 1.7 and 1.6 not visible in version 2.5


I recently upgraded to version 2.5 but no I don't see JRE version 1.7 and 1.6 at all in options. How can I use them as I need them to process some legacy applications.

We will try 1.7 and 1.6 later

V2.5 uses some new feature of Java since 1.8.   We will try to support older Java later.

Please try again with JDK 11

Is your screen "high density"? Are you running on JDK 8?

As I know before, it is because JDK 8 shows too small, not Jar2Exe show too big. JDK 11 will shows the same size as Jar2Exe.

If not so, please tell more about the OS version, JDK version, screen size etc.

When I shutdown my

When I shutdown my application, the exe created by Jar2Exe often continues as a zombie process (which I see in Task Manager).

I want how do I shutdown all traces of my application.


Generated exe crashes in Windows XP, works fine with windows 7 +


I have generated an exe using jar2exe. It is crashing with dialog saying '*** has encountered a problem and needs to shut down....'. This exe works fine on Windows 7 onwards. I checked .jar form which it was created, it runs fine on Windows XP. What is the problem here?



One of my JFrame java files will not run --runs fine in Netbeans

I have aprogram which run fine when compiled in jar2exe until I added another Jframe file to it. Works great in NetBeans 8.0.2 with the added file but seems that Jar2exe will not allow this one file to run from the main exe java program. Not usre what is the cause of the problem. Any suggestions? 

Unable to Generate Key



I am unable to generate key for my laptop and server is giving following error.



my user name is msibtain



type Exception report


description The server encountered an internal error () that prevented it from fulfilling this request.


org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class com.regexlab.product.KeygenTools

root cause

javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class com.regexlab.product.KeygenTools

root cause

java.lang.NoClassDefFoundError: Could not initialize class com.regexlab.product.KeygenTools

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.26 logs.
Apache Tomcat/6.0.26

Windows 10: No icon, noc splash title

Same gif for splash screen and icon. Gif is shown in splash screen - but not the splash title.

Icon never appears.

I use the newest unregistered version.

Any suggestions?

Winrar preview

Even using the option to hide the jar files. It is still possible to open the exe with winrar, even if it only shows the Jar2exe files. Is there any way to prevent this?

Those files are not your classes

What you see in WinRAR are not your classes.

When Java program starts, it needs at least one jar file as its entry point. Jar2Exe lets the exe file is a jar file at the same time. Please don't worry, those files which you see in WinRAR are not your own classes.

I can not register the version anymore

My windows 10 updated tonight and now I can not register the version anymore. When I try to register again "Activate jar2exe have reached the number of licenses". I ask for urgent help, because I'm on a project and need it to work. Thank you


does this tool support licenc?e.

I need , once install my java apllication for computer .it cant be use for any other computer

Jar2EXE killed by AVG

I have used AVG for years as well as Jar2EXE, but on the last update of AVG (17.5.3022) , it now intercepts and kills Jar2EXE complaining that it is infected with a virus. Yes, it's probably a flaw in AVG, but I would suggest contacting AVG to get this resolved!

Not able to move licenses to another computer.


I recently formatted all my computers, now I am unable to activate, it gives me error that I have reached number of licenses.

Please do the needful.




Runtime.getRuntime().addShutdownHook() apparently not running

Running my project from a built as a runnable jar (no jar2exe), I see that the code in the shutdown hook thread runs properly, but if I build as an exe (using jar2exe), the code in the shutdown hook seems NOT to run. 

Should the code in the shutdownhook thread be running, or is this a limitation of a program packaged using jar2exe?

EDIT: I have discovered that sometimes programs built with jar2exe do indeed execute the shutdown hook code.  I will try to narrow the differences, perhaps flush the output to stdout will help determine if the code is running.


Hai how to make exe with sqlite database.is it necessary to add lib in dependened jar files.how to add other txt and pdf file with exe

Jar2exe Encryption can be evaded

Can shield the function of JVM javaagent etc?
Because the parameters can be easily get into the JVM bytecode, lead to protect

Desktop icon goes back to java coffee cup

Works perfectly except for the icon.  And that is the only reason I'm interested because I have all the rest in a runnable jar.

So, much to my surprise, even when I got the shortcut on the desktop to match what was compiled with jar2exe, as soon as I ran it

the icon changed to a windowed coffee cup.  Cannot purchase unless this is fixed.

Spring Boot

I encrypt an spring boot application what is a single jar with all dependent libraries inside.  

It run good as jar but when I generate the exe file it does not work.

Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/c
Caused by: java.lang.ClassNotFoundException: org.springframework.core.io.Resourc
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
The main startup class could not be found.

Java Runtime Environment Not Found


I am using Jar2Exe. When I generate .exe, it is working fine in my system. But in some systems, it is showing Java Runtime Environment Not Found message even though JRE is installed in their system.

What is the problem with it and how can I fix it?

Thank you,


swift payment

Dear Sir,

I am from BNP Paribas Turkey. We would like to buy below product urgently.

Could you please inform us whether you accept SWIFT bank transfer ?

Product: JAR2EXE.COM Standard License

Qty: 1

Price: 145 USD


Thank you,

Program Not Working

I have generated several .exe files that run perfectly fine and do the correct thing on my system but simply do not work when my friend runs them on his computer. It's the exact same file and my windows 10 laptop runs it perfectly fine but when he runs it nothing happens except a very quick flash of a window.

When copying the .exe file program opens up but no content/empty

Hi there, 

I was trying to copy my exe file to an external and run it from another computer. Program open up but window's empty, doesn't run.

Is there something I'm missing here?

Does the exe still need to be in same location as the lib folder?


Grateful for any help!


webapp with spring


this week,i am trying to study how to use jar2exe to wrap and encrypt webapp spring project.

i can do it fellow the solution advice:Webapp,which is the project of tomcat\webapp\examples,

but failse,when i do it on my simple webapp project,with the srping,this project just pring helloworld.

the error msg is:

warning:cannot search for matching files underneath url[j2e:libs/web-inf-classes.jar!com/demo/web/controllers/] because it does not correspond to a directory in the file system

java.io.filenot foundexception: url[]



please help,tks!


Corruption of History

I am still encountering problems where the history of previous builds is repeated / corrupted.

When I use the drop-down on "Please input the jar file full path or classes directory:" item, instead of seeing one item for each project built in the past, I see one accurate item, then dozens of items that are corrupt.  These corrupt items appear to be a mixture of two build items.

This is a picture of what the corruption looks like:


Is it possible to offer a way to completely clear history to see if that helps?

Lost History

Today when I built a project I'd never built before, my history got lost due to some corruption, I think.  The image shows the new project repeatedly added to the history, but with on character removed for each entry.


I see a file called j2ewiz.ini, dated 3/31/2015.  Could I take action to somehow restore my history using that INI file?

Corruption of History Resolved

You can search the whole C: drive for j2ewiz.ini , it is under C:\Users\<your user>\AppData\Local\VirtualStore\Program Files (x86)\Jar2Exe Wizard

At Jar2Exe's view, it is under C:\Program Files (x86)\Jar2Exe Wizard , but the Windows mapped it to your HOME directory for read-write.

Pack .DLL file

Can I pack inside my .exe file .DLL files?

error example


I want to convert webapp (war ) to an .exe file, read the web page tutorial " http://www.jar2exe.com/solutions/webapp "

but when you run the exe displays the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/s

my version of the software is 2.1.7 with license

thanks for the help

This problem is resolved

This problem is resolved finally. There are 2 ways to resolve:

1) Move away or rename the binary file to a different filename as the jar filename.

2) Download again the latest Jar2Exe and try again.


Windows Integrity Level - UIPI

In recent versions of Windows, User Interface Privilege Isolation (UIPI) implements restrictions in the windows subsystem that prevents lower-privilege applications from sending window messages or installing hooks in higher-privilege processes.

The program I package with this tool works to sent messages using the JNA WIN32 API User32.INSTANCE.PostMessage() on older JVM's and older OS's, but if the JVM is newer and OS is newer, it seems these inter process messages fail due to insufficient privilege.

Question: Is there something to be done in the build of the exe to cause the JVM to be higher privilege, or is that a function that is outside the scope of your product?

Exe is Not running after Hide/Encrypt Class files


  The exe generated is not running after the checkbox Hide/Encrypt Class files is checked. Otherwise it is running fine. But the soul purpose of Encrypting class files is not working.




Please pay attention to class loader

The probable situation I have thought is that: have you packed depended jar files into a single “jar” file and then use this jar file to convert into exe file? If so, please do NOT pack your depended jar files into a single “jar” file, and instead, pack the depended jar files by Jar2Exe at http://www.jar2exe.com/usage/wizard/stepdepjars

If the above is not the reason, if yourself have used class loaders, please remember that, the protected jar files could not be extracted by your own class loader.

JavaFX executable


I am trying to convert a JavaFX application with Jar2Exe into an executable. I have done all the steps in your advice, but still no success. When I start the final executable, it says: "JavaFX launcher error - Unable to invoke main method". 

I have added the binaries of fx.jar to the binaries of my application. Is that necessary? 

The command line version of what I've tried is this: 

"C:\Program Files (x86)\Jar2Exe Wizard\j2ewiz" /jar D:\Software\FSS\dist-bin /o D:\Software\FSS\dist\KnowledgeMap-0-6-1.exe /m com.javafx.main.Main /type windows /minjre 1.8 /platform windows /encrypt /checksum /amd64 /pv 0,6,0,1 /fv 0,6,0,1 /ve ProductVersion=0,6,0 /ve "ProductName=Knowledge Map" /ve "LegalCopyright=Copyright (c) 2014 - 2015" /ve "SpecialBuild=0, 6, 0, 1" /ve FileVersion=0,6,0 /ve "FileDescription=Knowledge Map" /ve "LegalTrademarks=Trade marks" /ve "InternalName=0, 6, 0, 1" /ve "CompanyName=ForeKnowledge GmbH" /config "libs lib" /keepflat D:\fx.jar|META-INF\*|com\javafx\**

Any help / hints would be very much appreciated. 

Best regards


Solaris support

Does Jar2Exe support Unix/Solaris?

Splash Screen Does Not Show

The splash screen was working in 1.3.  I upgraded to 2.1 and I no longer see the splash screen.

When building the .exe file (using  "Windows GUI Application"  type), I click the 'test' button, and I see the image, but when I launch the application, the image does not show.  Although this application does not have a GUI, I know the application is running since it responds on the ports it monitors.

Please use 'gif', 'png' or 'jpg' file

Since Jar2Exe v2.1.2, the generated exe file will use the "splash" feature of JRE instead if it is running with JRE 1.6 or above.

The "Splash" of JRE requires a 'gif', 'png' or 'jpg' file, so please try again.

I'm so sorry Jar2Exe does not limit this or clarify this.



I hava two questions:

1) How to set "-Dfile.encoding=UTF-8 -Djava.encoding=UTF-8" in exe file?

2) In my jar file exists several *.jar so I dont use external lib,yet when I want to make exe file and be run correctly I have to set external lib. How to make exe file without set CLASSPATH with external lib?




Add new comment