One click to fix Java Desktop application installation deployment

Source: Internet
Author: User

For Java desktop applications, the more annoying is the installation of deployment issues, the client is installed with JRE, JRE version of the problem, where the JRE to download, how to use the JRE to start your Java application? Do not say that people who have just contacted the computer, is more familiar with the computer, if not touched Java, face a Java application, how to launch it under Windows, it is estimated that will toss half a day. If not for this problem, Java in my eyes is the most perfect language, but also my favorite language.

So I think this is the biggest reason why Java desktop apps are annoying to some people, Java has the advantage of "write, Run Anywhere", cross-platform features are really good, but not everyone needs or want to cross the platform, and sometimes JVM platform or version problems will cause "write, test Everywhere" of embarrassment.

The best way to do this is to take the JRE with you and make it easy for users to click. Below we solve such a problem, what good suggestions or methods to invite other friends to advise or add!

For Windows platform, let user one-click installation, double-click the use of tools exe4j + Inno Setup, these two tools can be found on the Internet, unfamiliar can be more search, use it is not difficult.

With JRE running, JRE size should be the most annoying, I installed the default jre6 size of 80M, and the program only about 200-300k, feel very unreasonable, distribution and network transmission process will be greatly affected! To solve this problem I've been searching the web for the "slim version" of the JRE, accidentally found the Beansoft teacher introduced an article on the mini JRE, the relevant JRE download after decompression about 14M, a trial, relative to my application is missing a number of class files, about part of the XML Operation class, and swing desktop application framework related to some of the classes are also not found, and finally borrowed a bit, their own a complete JRE from 80M to 38M, remove a lot of unnecessary class files, of course, if patience can also be thin down, and then remove some of the class files.

On this basis to cooperate with Inno Setup this installation package production tool, finally the entire program from 40M to 8M, the following to see about the entire operation process, on the JRE of the thin body some cumbersome will not write, and Sun's JRE slimming program is also in progress, I believe that soon there will be a smaller version of the JRE to launch , there is no need to bother.

Here is a complete Java program for me--myloading

You can see that the jre1.6 has been shipped, the following first use exe4j to make an EXE executable file (that is, the MyLoading.exe above), and specify the jre1.6 we bring. The following is the EXE4J launch interface, click Next to start creating the configuration file.

Then select the type, and we choose the first one, which guarantees that the program still has cross-platform features. If you choose a second, you can completely compile the program into an EXE file, you can better protect your program is not decompile.

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.