How to generate an executable program . jar in Netbeans?

Asked

Viewed 36,959 times

7

I made an application in Java and liked, now I need to get executable to show my colleagues.

How do I get the executable?

  • 3

    Elton, just to be clear: when says executable refers to a file .JAR or a file .EXE ?

2 answers

9

Which IDE is using?

If it is Netbeans, just right-click on the project and go to "Clean and Build", then the IDE will create a folder in the project directory called "dist" containing your file. jar and a folder called "lib" containing the libraries used in the project.

  • 1

    It is evident in the issue that the IDE is netbeans.

  • 1

    Sorry for the inattention. But anyway the procedure is what I described.

1

As Anderson replied, just right click and click "Clean and Build" do not forget that to run applications. jar, you need the JRE Installed, which contains the virtual machine for file interpretation . jar !

  • 1

    In fact what is needed is the JRE, the JDK is aimed at developers. Along with the installation of JDK comes the JRE together, but then the user will be installing a tool more unnecessarily (the JDK).

  • 1

    My mistake, thanks @Math ! =]

Browser other questions tagged

You are not signed in. Login or sign up in order to post.