简体   繁体   中英

How to run a netbeans project without having installed the netbeans? :-)

I need to make an answering questions game and I chose to make it using netbeans. I wonder if I can create an executable so that somebody could "play" the game even if he does not have installed netbeans! Any ideas please?

In NetBeans set your application as the active project and press F11, which builds the project. This means that your application will be packaged into an executable jar file that you friend can click to run your application. Once you have clicked F11 you can locate the executable jar file at eg ../Documents/NetBeansProjects/ProjectName/Dist

Developed program has nothing to do with IDE. It doesn't need IDE to be executed...

There is a misconception: Netbeans is not a runtime platform. Netbeans is just a tool to build Java applications. You can perfectly create the same Java application with just notepad.exe and the JDK , you only need to have a bit more knowledge and experience to do it rapidly enough.

To run a Java application, all the enduser needs to have installed is a JRE . To create a runnable Java application, all you need to do is to export the Netbeans project as an executable JAR file.

When you build it, a JAR (Java archive) will be created (look in your dist/ directory or your project properties). If you've set up your project correctly, launching that JAR will start your application. See http://java.sun.com/docs/books/tutorial/deployment/jar/appman.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM