-1

I made a desktop application with Java netbeans, it's a Jframe with some components. I built it and the .jar file created in the dist folder in the project folder. I have already the jre (Java Runtime Environment) installed on my pc. When I try to open the .jar with the jre I got nothing, Nothing appears. What can I do ?

Jack
  • 21
  • 3

1 Answers1

0

https://netbeans.org/kb/articles/javase-deploy.html#Exercise_1

The link above will take you to a tutorial. Jar files are not executable by default. You need to specify a starting class to make a jar file executable.

If this doesn't work, then make sure you have called setVisible(true) on your JFrame.

Edited to add: (author added info)

When I try to run through CMD there's Unsupported major.minor version 52.0

This means your JRE version does not match your compiler version. You can confirm with the -version option, then fix your path to use Java from the same place your compiler lives.

Mel Nicholson
  • 3,225
  • 14
  • 24