Hi there! I just want to ask if it is possible that my java program, which is done in Netbeans, can be run in a computer without netbeans? I mean, how can I compile my program where in, maybe an exe file can be created or an icon will be displayed in the screen and once the user clicks that file the program will automatically run?

thank you.

Recommended Answers

All 6 Replies

Check the tutorial for jar creation from netbean Ide , then convert that jar into exe through exewrapper.... Even all these you need jdk kit installed on the system for running the exe files...

or, you could realise that a jar file IS an executable file.
just stick to the .jar file, instead of creating an exe file. why doing this? an exe file is a windows-executable file, which won't run unless the user is running windows as an OS. by just keeping the .jar file, you would be able to distribute your application to any users, no matter what OS they use.

> java Xyz
where Xyz is the Xyz.class file generated by Netbeans

commented: this is obviously not what the OP is looking for -2

> java Xyz
where Xyz is the Xyz.class file generated by Netbeans

what the OP means, is how do you create an executable file which runs your application when you click on it.

one of the advantages of this, is not to go and have the bother to
1. open a command prompt
2. navigate to your project folder
3. run the main class using the java command.

even turning your jar into an exe would (for some OS, I mean) be a better answer to the OP's question than this, and my opinion about turning a jar into an exe can be found in my previous post.

thanks for all your reply. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.