Java package commercialization software, java package commercialization

Source: Internet
Author: User

Java package commercialization software, java package commercialization

This is the first article I wrote in my blog. Please kindly advise!
I will explain in detail how to compile the java visual window program compiled by java swing and awt components into a software that we can use, commercialize, and install. Most of the information on the Internet is fragmented, and many problems may occur after reading it, resulting in failure to succeed. After three days of experimentation, I have summarized the following experiences and sorted them out here, hoping to help you. The specific Green tool will also provide a link below.
1. First, I use Intellij IDEA development tools. I personally think this is a more advanced development tool than Eclipse. After we have installed JDK, We can automatically check the JDK path without configuring environment variables, so that our program can run without difficult compiler settings, it is very convenient for our compiler to automatically complete the code. JetBrains does well in this regard. If you use the Eclipse development tool, it does not matter, and the operation process is very similar. Follow the steps below.

2. Open your intellij idea and click Create project.

 

 

 

 

 

 

 

 

 

 

 

2. compile your core JAVA code. You can also directly copy the previously written code and put it here for running. Check whether the running GUI is the same as the expected GUI, and whether an incorrect value is returned. If yes, perform the next step.

!

 

 

 

3. Press ctrl + shift + alt + s to enter the project structure interface. Click the "+" button on the second image and select the second option.

 

4. Add a main function for the jar package. Click OK to continue.

 

 

 

 

4. If the main function has a dependency package, click the "+" button to add the dependency jar package, click OK, you can see that the project has an additional META-INFO file, which contains the Jar entry function information.

5. Execute the create jar operation: the generated jar file is displayed after the operation.

 

 

 

 

In this case, the jar is generated. Now we can use my jar to exe tool to convert it into an exe program that can be run on another computer.

The Baidu link is: https://pan.baidu.com/s/1nwcvi33. Click Next to generate an executable program with the suffix exe.

6. The most important step comes. Now that we have the exe program, how can we package our software into an installable program? Please turn to the 360 Software Center to download a free software named inno setup. After you click next for countless times, the software will automatically generate a script file. (The method here is original by the author Geeksongs! This is the only one in China! Other software developers are very messy and cannot use them! The method to use them does not apply to the new version! The computer will crash! I have suffered, so I want to share my methods to avoid making mistakes again !)

Now! Pay attention to it! This script file is too low due to its applicable version! Therefore, some changes must be made in the following script code! Let's see the script code of the following [Taks] class. After a piece of code flags is written: unchecked! This is definitely not correct! The meaning of this Code is: Make it invisible (passive and invisible, meaning you can't see it) because of this, the software we installed won't create shortcuts on the desktop or the Start menu bar! So we should change all unchecked to checkablealone! Then proceed to the next step. We can see the code in the last column, which is 0. 6.1 indicates your windows version. If you want to install Windows 7, win8, and win10 successfully, we should change it to 0, 8.1! In this way, the script program can run on our new version of computer.

7. Click F5 on the keyboard to get the software installation package.

8. Is it interesting? In this way, the JAVA software you write can run on another computer, and you can show off it in front of other computer science experts. After all, the JAVA language is learned in the next semester of the sophomore year, and the package program is available in the Postgraduate stage. It would be nice if you did it in your freshman year!

   

 

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.