开发者

How to make exexutable file from netbeans project?

开发者 https://www.devze.com 2023-03-31 22:43 出处:网络
I developed a small application in Netbeans. I developed in such a manner that all the code and Jars lies in a single folder say \"graph\". Now i want to make executable file for that so that my targe

I developed a small application in Netbeans. I developed in such a manner that all the code and Jars lies in a single folder say "graph". Now i want to make executable file for that so that my target 开发者_如何学编程users could run this application without installing netbeans. They simply need to double click on graph.exe. Since i am new to Java world so i apologize in advance for asking such a simple question

Thanks, //Jame


Usually your Java apps do not get converted to exe files. Though, you can create executable jars.

To do that in NetBeans you will have to right click on your project name and click on "Clean and Build" option. This will create a jar file under "dist" folder in your project folder. Double clicking on the jar will start your program.

Though, always remember that you will need the JVM on all the machines where you intend to run this jar file. Also you might will have run your jar file from a .bat file to set the class path to your libs.

Easiest remedy to go about this problem is to create a launch4j wrapper which will create a wrapper exe for you.

http://launch4j.sourceforge.net/

Hope you find this helpful

0

精彩评论

暂无评论...
验证码 换一张
取 消