Eight methods to convert a Java class file into an EXE file

Source: Internet
Author: User

Hot girl remarks: Today I received a letter from cqq (the guy who cracked the Tianyi background system using java). Unfortunately, he compiled a class file.

I have no idea about programming. I searched to see how to compile it into an exe file.

So I found this article. In fact, the following dude is more amazing.

Several Methods for locally compiling Java applications into EXE (JOVE and JET are recommended)
1. Get a TowerJ compiler from www.towerj.com, which can load your CLASS file
Compile it into an EXE file.
2. Use Microsoft SDK-Java 4.0's jexegen.exe to create the EXE file. This software can
Download from Microsoft website for free:
Http://www.microsoft.com/java/download/dl_sdk40.htm
The jexegen syntax is as follows:
Jexegen/OUT: exe_file_name
/MAIN: main_class_name main_class_file_name.class
[And other classes]
3. Visual Cafe provides a local compiler that can create an EXE file. You need to install the CD
.
4. Use InstallAnywhere to create an installation disk.
5. Use a high-performance Java compiler provided by IBM AlphaWorks.
Address acquisition:
Http://www.alphaworks.ibm.com/tech/hpc
6. JET is an excellent local compiler for Java. This compiler can obtain
Test version:
Html> http://www.excelsior-usa.com/jet.html
7. JOVE of Instantiations
Http://www.instantiations.com/jove/...ejovesystem.htm
JOVE combines the previous SuperCede, an excellent local compiler, And now SuperCede
It no longer exists.
8. JToEXE
Bravo Zulu Consulting, a local compiler developed by Inc, could have been
The webpage is free to download. However, it cannot be found on the company's homepage.

Feedback:
# Re: eight methods to convert a Java class file into an EXE file
Compare several java-to-exe tools and share your views:

1. Get a TowerJ compiler from www.towerj.com, which can compile your CLASS file into an EXE file.
Note: I can't find it now. If I don't provide it, I will be acquired by someone else.

2. Use Microsoft SDK-Java 4.0's jexegen.exe to create an EXE file. This software can be downloaded free of charge from Microsoft's website:
Http://www.microsoft.com/java/download/dl_sdk40.htm

The jexegen syntax is as follows:

Jexegen/OUT: exe_file_name
/MAIN: main_class_name main_class_file_name.class
[And other classes]

Note: I have not tried it.

3. Visual Cafe provides a local compiler that can create an EXE file. You need to install the EXE component provided on the CD.
Note: I have not tried it.

4. Use InstallAnywhere to create an installation disk.
Note: It is a good tool.
But it must be larger than 8 M (with jre), and 1 M (without jre ).
However, it can be compiled into exe programs available on various platforms.

5. Use a high-performance Java compiler provided by IBM AlphaWorks, which can be obtained from the following address:
Http://www.alphaworks.ibm.com/tech/hpc

Note: I have not tried it.

6. JET is an excellent local compiler for Java. The compiler can obtain a test version from this website:
Http://www.excelsior-usa.com/jet.html

Note: Do not like it.
The compiled program is still jre. I heard that jre is not supported for genuine programs. It takes 30 minutes to compile after installation.

7. JOVE of Instantiations
Http://www.instantiations.com/jove/...ejovesystem.htm
JOVE combines the previous SuperCede, an excellent local compiler, And now SuperCede no longer exists.

Note: Too annoying. A dialog box always comes out.
A dialog box is displayed, indicating that this is a product of jove.

8. JToEXE
Bravo Zulu Consulting, a local compiler developed by Inc, could have been downloaded from the company's webpage for free, but cannot be found on the company's homepage at present.
Home: http://www.bravozulu.com/
I have had this software on the FTP below. I don't know if it is still there:
Ftp://race.dlut.edu.cn/pub/java/tools/jet

Note: It's annoying. I always come up with a dialog box, but I didn't think I found crack and found it on google.
Now that the dialog box is removed, I like this tool very much. Although it requires jre, the file is only over 100 kb, which is good.

9. Exe4j
Very good

10. jbuilder
This tool does not need to be discussed much. In jbuilder6.0 or earlier (including 6.0), the exe file cannot be generated, so you can implement it using the following method. This is something someone else can think of. I just want to publicize it.
In addition, both jbuilder7.0 and later versions can generate exe files.

This is Borland's non-public usage technique. It can use JBuilder to create exe files to start Java files.
JBuilder does not support local compilation. However, there is a hidden technique that allows you to start a Java program from an executable file, which can appear or does not appear in the console window. To do this, you need these files in the bin directory of JBuilder:
JBuilder.exe
JBuilderW.exe (optional)
JBuilder. config
Jdk. config
JavaLauncher. dll
"JBuilder.exe" is a common executable shell file used to start Java programs. "JBuilderW.exe" is the same as javaw.exe, which encapsulates "JBuilder.exe, however, the console window is not displayed during running. The key to using these files is the file name. "JBuilder.exe" looks for a configuration file named "JBuilder. config", which contains the required information to run the Java program. Similarly, "JBuilderW.exe" finds "JBuilder.exe" to start Java programs without the Console window. If you rename jbuilder.exe to "foo
. Exe ", then" foo.exe "will go to the" foo. config "configuration file. Similarly," JBuilderW.exe "will be renamed to" fooW.exe ", which will go to the" foo.exe "file.
In this case, the intelligent reader should guess how to use jbuilder.exe to start the application. (Or the renamed exe file) to start the Java application. The following uses the local machine as an example.
Borland JBuilder 5 is installed in the E: jbuilder5 directory, and a tempdirectory is created under E: jbuilder5in. then, jbuilder.exe and JBuilder are created. config, JavaLauncher. dll, jdk. copy the four config files to the E: jbuilder5inemp directory, create a hello directory under the directory, and generate a hello. java file, that is, E: jbuilder5inemphellohello. java file,
// Hello. java/
Package hello;
Public class hello {
Public static void main (String s []) {
System. out. println ("Hello, Exe file! ");
}
}
Compile it into a class file, open the Jbuilder. config file, and modify the file accordingly:
Find the following two lines in JBuilder. config:
# Start JBuilder using the its main class
Mainclass com. borland. jbuilder. JBuilder
Change
# Start JBuilder using the its main class
Mainclass hello. hello
Addpath E:/jbuilder5/bin/temp/
The addpath command adds the directory to the class path. The commands that can be identified by other config can be found in config_readme.txt in the JBuilder/bindirectory.
Then modify the javapath in jdk. config to a relative path. For example
Javapath ../jdk1.3/bin/java
Modify
Javapath.../../jdk1.3/bin/java
Last
Modify jbuilder.exeand jbuilder.configto the corresponding file name, for example, foo.exe AND foo. config.
Run the foo.exe file.
So far, modifying JBuilder to use the exe file to start your Java application has been completed.
But the fun part is not here. The following tips may be more interesting. Package the Jar file into the exe file!
Assume that the hello. jar package is generated using the above file,
Jar cvf hello. jar hello *. class
Then, add the jarpackage to the end of jbuilder.exe,
Copy/B ..JBuilder.exe + hello. jar foo.exe
In the foo. config (JBuilder. config) file, remove the previously added class path and add the following path:
Addpath E:/jbuilder5/bin/temp/foo.exe
Then, foo.exe
Have you seen it?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.