Java program is converted to an EXE file

zhaozj2021-02-16  46

Several Java turn EXE tools, make a comparison, talk about your own views:

1. Get a Towerj compiler from www.towerj.com, which can compile your Class file into an EXE file. Note: Can't find it, it is not available, and it is acquired.

2. Use Microsoft's SDK-Java 4.0 Jexegen.exe to create an EXE file, this software can download from Microsoft's website, the address is as follows: http://www.microsoft.com/java/download/dl_sdk40.htm

The syntax of Jexegen is as follows:

JEXEGEN / OUT: EXE_FILE_NAME / Main: main_class_name main_class_file_name.class [and other classes]

Note: Nothing tried

3. Visual Cafe provides a local compiler that can create an EXE file. You need to install the EXE components provided on the CD. Note: Nothing tried

4. Create a installation disk using Installanywhere. Note: Very nice tool. But it is to be> 8m (with JRE), there is a> 1M (without JRE). However, it can be compiled into an Exe program that can be used in various platforms.

5. 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: Nothing tried

6. Jet is an excellent Java language local compiler. This compiler can get a test version from this website: http://www.excelsior-usa.com/jet.html

Note: Don't like it. Compiling good programs or JRE, I heard that genuine can not be JRE. I have to build it, I have used it for 30 minutes.

7. Instantiations' jove http://www.instantitutions.com/jove/...ejovesystem.htm Jove merged the previous Supercede, an excellent local compiler, now SuperCede is no longer existed.

Note: Too annoying, always coming out, I have used a dialog, it will come out a dialog, indicating that this is the product of JOVE.

8. JTOEXE BRAVO ZULU Consulting, INC developed a local compiler, which can be downloaded from the company's web page, but it is currently not found on the company's homepage. Company Homepage: http://www.bravozulu.com/ The following FTP has had this software, I don't know if it is still in: ftp://race.dlut.edu.cn/pub/java/tools/jet

Note: I am bored, I always come out a dialog, but I didn't think I found CRACK, found on Google. Now after I removed the dialog, I like this tool very much, although it needs JRE, but the file is only more than 100 K, very good.

9.exe4j is very good

10.Jbuilder This tool does not have to talk more, in JBuilder6.0 (including 6.0), is not generated, so you can use the following method. This can be thought out, I just gave propaganda. There are also JBuilder 7.0 to generate an EXE file.

This is the use of Borland's non-public use, which can make an EXE file to start the Java file through JBuilder. JBUILDER does not support local compilation mechanisms. But there is a hidden tip that allows you to start Java programs from an executable file, you can appear or do not appear in the Console window. To do this, you need these files in jbuilder's bin directory: jbuilder.exe jbuilderw.exe (optional) jbuilder.config jdk.config javalauncher.dll "jbuilder.exe" is a universal executable shell file for Start Java programs, "jbuilderw.exe" seems to be Javaw.exe, which is packaged "jbuilder.exe", but does not show that console window when running. The key to using these files is the file name. "Jbuilder.exe" finds a configuration file called "jbuilder.config", which contains information that runs the Java program. The same "jbuilderw.exe" finds "jbuilder.exe" to start Java programs that do not have a console window. If JBuilder.exe is renamed "foo .exe", "foo.exe" will look for "foo.config" profile, the same "jbuilderw.exe" is renamed "foow.exe", it will go Look for "foo.exe" files. Speaking here, smart readers should guess how to use JBuilder.exe to launch the app. Just rename the JBuilder.exe, JBuilerw.exe, jBuilder.config, specify the primary class and class path in jbuilder.config, and can be started by executing jbuilder.exe (or renamed EXE file) Java app is. Below is this unit as an example. Borland JBuilder 5 is installed in the E: / JBuilder5 / Directory, build a Temp directory in E: / jbuilder5 / bin /, then copy jbuilder.exe, jbuilder.config, javalauncher.dll, jdk.config four files to E: / jbuilder5 / bin / temp / directory, then build a hello directory in this directory, generate a hello.java file in this directory, ie E: /JBUILDER5/bin/temp/hello/hello.java file, //Hello.java/ package hello; public class hello {public static void main (string sout.println ("Hello, Exe File!";}} is compiled into a class file, and then open JBuilder. config file, be amended accordingly: JBuilder.config found inside the following two lines # Start JBuilder using the its main class mainclass com.borland.jbuilder.JBuilder amended as # Start JBuilder using the its main class mainclass hello.hello addpath E: The / jbuilder5 / bin / temp / addpath command is in the class path, this command and other commands that can be identified can be identified in the config_readme.txt in the jbuilder / bin directory.

Then modify the javapath in jdk.config into a relative path, for example, JavaPath ../jdk1.3/bin/java modified to javaPath ../../jdk1.3/bin/java finally will jBuilder.exe, JBuilder.config modifies the file name required, such as the foo.exe and the foo.config file. Now execute the foo.exe file to this, start your own Java application using the EXE file by modifying JBuilder. But the fun place is not in this place, the following tips may be more interesting, pack the JAR file into the EXE file! Assume that the above file is used to generate a hello.jar package, JAR CVF Hello.jar Hello / *. Class then attached the jar package to jBuilder.exe, copy / b ../jbuilder.exe hello.jar foo.exe In the foo.config (jbuilder.config) file, remove the class paths to the previously added, and add the following path: addPath E: /JBUILDER5/bin/temp/foo.exe then execute, foo.exe saw it? An EXE file containing a jar package is executed! The rough principle of this process is that the important information of the EXE file is in the file head, so putting the chaos and seven-eight-shot EXE files are not tight; the important information of the JAR / ZIP file is in the end of the file, so that they are not coherent It can be easily performed. Please note: Readers If you use this feature, you have to take your own risk, because Borland does not provide official support for this feature! You can also see http://www-900.ibm.com/developerwor ...ive/index.shtml This is an article, but it provides a lot of useful information.

Other articles:

Implement FTP with VJ http://www.9cbs.net/develop/read_article.asp?id=18187 Talking Tools http://www.9cbs.net/develop/read_article.asp?id=18189

转载请注明原文地址:https://www.9cbs.com/read-26380.html

New Post(0)