Publish Java Desktop programs

Source: Internet
Author: User

I took a copy of the desktop tool open source code, modify the change, on the Elipse execution. Feel good. But by the announcement of the application, it was dumbfounded.

I don't even know how to publish!

Oh, it is Java small white.

The assumption is that the Microsoft camp, directly compiled into an EXE.

But Java here, suppose to compile to EXE, also need a third-party tool, Eclipse is not.

Moreover, to compile EXE, the premise is to first compile the source code into a jar package.

But the jar package is divided into ordinary jar and executable jar package, which one to choose? And this source is a bit large, and it itself refers to a lot of jar packages.

This source uses Ant and Lvy, and I can't figure out what they're doing right now. Ant,lvy should be like NuGet, to help download the dependency package, but whether there is a role to help publish, such as Ant dist or something, it is unclear.

Search on the Internet, no clue, and then asked colleagues, only to know a point answer.

Some people say that Java is not suitable for self-study. Today's letter is a Yan.

The method is Jiangzi:

1, under Eclipse. Right click on the project, select Export, Pop Up the dialog, select Java, then select runnable JAR file

2.

1) be able to choose to compile all the dependent packages into the executable package, but also to choose 3) with the executable package placed in the same folder. The 2nd one doesn't know what it means. I picked the 3rd one.

And then next, you can. Then there will be a warning, whatever it is.

To the end, the resulting file is this:

Kettle52_lib: Dependent Packages
Kettle52.jar: Advertised Executable package
UI: is some resource file. are not generated. I copied it manually.
Spoon.bat: I wrote it manually. The inside code is just this:

java -jar kettle52.jar

Of course, directly double-click Kettle52.jar is also able to execute. It is only convenient to make a batch file.

Publish Java Desktop programs

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.