In Eclipse, right-click on the name of the project you want to make a jar package, and the following pop-up box appears, select Export:
Second, click "Jar File" in the next interface, and then next:
Third, in the next appearance of the interface, check the items you want to package and other options, such as the test item, as shown in the figure, and then click Browse on the right arrow to select the
, as shown in the following figure:
2. After selecting runnable JAR file, it will pop up the following dialog box, choose the export path, the default finish is actually OK. But it's two points to note:
The JVM parameters that you set up in run configuration are no longer functional after the package is finished, and need to be specified on the command line when the jar is executed (see 4);
For the thi
file, the following dialog box is displayed. After you select the export path, finish by default. However, note the following two points:
The JVM parameter you set in the run configuration does not take effect after it is packaged. You need to specify it in the command line when executing the jar (see figure 4 );
There are three processing methods for third-party packages. No matter which one does not affect your use, I use the first one b
Previously wrote an article about usingEclipse generates the Java executable jar package, but the most recent use is unsuccessful in any case, and when you double-click the executed jar, the following error pops up:Could not find the main class:mailTest.SendMailTest1.Program wil exitIn response to this problem, I first
. jar in the command line to check that the program has been successfully executed.
Java w-jar AAA. jar can also execute this jar package.
The command line window appears when you use java.exe.
Run javaw.exe without the command line window. All output such as system. Out. P
An application is made into an executable jar package to publish the application through a jar package.The key to creating an executable jar package is to have the Java-jar command know
I recently wrote a small program of stock yield analysis in Java to calculate the benefits of my stock operation. Here, a procedure is recorded to package the source code into an executable command.1: Generate the executable jar fileSelect the project, select Export from the menu, select runnable
to execute the program on the machine does not install JRE, then you need to copy the JRE directory on your own machine, I installed the JRE5, the last directory structure:Open exe4j, skip the Welcome, and click the second item in the left navigation directly, as we have already packaged the Java project as an executable jar file in advance.In the pop-up window,
to create an executable jar, we need to add spring-boot-maven-plugin to our pom.xml . To do this, dependencies Insert the following lines directly below the section : 1 2 3 4 5 6 7 8 not everyone likes to go from spring-boot-starter-parent POM inheritance . You may have your own corporate standard parents tha
, simulate (Java project)-right mouse button-exportPop-up window, select "JAR file" and click "Next"Uncheck the "config" and "Lib" directories, and the Project Profile ". Classpath" and ". Project" generated by Eclipse, click "Next"All by default, click "Next"In the pop-up window, select the MANIFEST.MF file that we created and click "Finish"The contents of my MANIFEST.MF file are: manifest-version: 1.0 ma
, simulate (Java project)-right mouse button-export
Pop-up window, select "JAR file" and click "Next"
Uncheck the "config" and "Lib" directories, as well as the project configuration file ". Classpath" and ". Project" generated by Eclipse, and click "Next"
All by default, click "Next"
In the pop-up window, select the MANIFEST.MF file we created ourselves and click Finish
The contents of my MA
Kerugaki-Blog Parkhttp://www.cnblogs.com/kailugaji/Software that needs to be prepared:Jdk,eclipse,exe4j,inno Setup CompilerFirst, the Java source program--Personal income tax:Package Math;import Javax.swing.JOptionPane;Kerugaki Http://www.cnblogs.com/kailugaji/public class Wrrtax {public static void main (string args[]) {string Mone Y Enter your income double x, y; Double tax=0; Joptionpane.showmessagedialog (NULL, "personal income tax calculator
step: final PackagingBefore sending to the user, usually with WinZip or winrar all the files into a compressed package, and then the user gets the compressed package, after extracting it to run the program, the Eclipse software is this way.Another way is to create a single Setup.exe file with a setup program such as InstallShield, Installanywhere, which has a wizard-like installation interface, and you can insert menu items into the Windows program b
For a programmer who has switched from C ++ to Java, it is also difficult to create java executable files. The project was left behind by a few colleagues. Several necessary library files and tools for creating executable files were encrypted and unblocked; I don't know if i
Original: IntelliJ idea export Java executable jar packageto ensure that their Java code is not a problem, in idea inside can be run normally, then, follow the following steps:Open File - - Project Structure -artifacts, such asIdea Export Java
want to run it, you should use a directory on the folder of the folders to command: Java partners.tom. (In the directory of the group with this command does not work: Java Tom, or there will be an error said class name can not find, only partners\ Tom is the class name) so the JVM will follow this thread to parse the directory layer to find the Tom.class and execute it. If your package is longer, the same,
file with only three lines of content, which is modified as follows:
. \java\jre\bin\javaw.exe
-jar Manager.jar
The first line sets the directory that points to the jar package Managger.jar, because Launch.exe and Myswt.jar are in one directory, so use "." is the current directory.
The second line sets the path pointing to Jre\bin\javaw.exe. The JRE directory ha
, whereaccpeduThe file is directly in the picture file, no unnecessary folders, this is becauseclass classes placed in Packages: Packageaccpedu; in; Then you can importAccpedu.jarto the project, as follows:Through such a naming convention (packageaccpedu; After importing the Accpedu.jar package, its pictures are automatically imported into the same class directory:Then export the Java program's executable
How to create executable Java programs
Detailed description of executable jar packages and jar commands
I often see someone asking on the internet how to compile a Java program into a.
1. How to build a Java Project executable jar package through eclipseFirst, export the jar file to the Java project under EclipseNextNextNextAfter the last click, the executable jar fil
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.