0

I am using NetBeans IDE 11.0 with the NetBeans 8.2 Patch 2 applied. I am running JAVA SE Development Kit 12.0.2 (64-bit) on a PC running under Windows 10. I have an application that I have written in JAVA and it runs well within the NetBeans IDE. I want to generate a file that would be executable outside the IDE under Windows. I've located the jar files built by NetBeans but when I double click on them nothing happens. I've read numerous threads on this topic but none of them have resolved my issue. Thanks in advance for guidance on how to resolve this issue.

Tim

Tim
  • 1
  • 1
  • 3
    Does this answer your question? [How to create a Jar file in Netbeans](https://stackoverflow.com/questions/9681876/how-to-create-a-jar-file-in-netbeans) – vincenzopalazzo Dec 14 '20 at 19:09
  • As is commented on the above reference, the current NetBeans does not have the "packaging" option that is discussed. We need an updated tutorial on creating executables. – Tim Dec 15 '20 at 14:21
  • mh I'm missing somethings, do you look inside this comment? https://stackoverflow.com/a/61757366/10854225 – vincenzopalazzo Dec 15 '20 at 14:41
  • As I stated in my original post, I found the jar file in the ..\build\libs directory. Checking the files properties it shows it opens with OpenJDK Platform binary. However when I double click the file nothing happens and task manager shows nothing is running. – Tim Dec 15 '20 at 15:48
  • Try to run java -jar name.jar, but this it out of this post – vincenzopalazzo Dec 15 '20 at 20:59
  • Unfortunately it doesn't work. Looking at the instructions at https://netbeans.apache.org/kb/docs/java/javase-deploy.html I note that it says that the jar file should be in the PROJECT_HOME/dist. However in my project's distributions file is only a tar and a zip file. The only jar file is in the PROJECT_HOME/distributions/libs folder. I've also tried extracting the zip and it just creates a dist & lib folder with a bin & lib folder and again the only jar is in the lib folder. None of them execute when double clicked. – Tim Dec 15 '20 at 23:34
  • In my opinion, you need to rewrite your question and make your example reproducible. A lot of maven/gradle application work well with Netbinse, but the process to build the jar is different from some other technique. Try to specify all the information to reproduce your environment. Without this information, we can copy and paste only the informations that are written on Netbinse site- – vincenzopalazzo Dec 16 '20 at 08:53

0 Answers0