techPowerUp! Forums

techPowerUp! Forums (http://www.techpowerup.com/forums/index.php)
-   Programming & Webmastering (http://www.techpowerup.com/forums/forumdisplay.php?f=52)
-   -   Publishing program with NetBeans (http://www.techpowerup.com/forums/showthread.php?t=176609)

Wozzer Dec 4, 2012 03:34 PM

Publishing program with NetBeans
 
Hi All,

I've tried to publish my Java program by using "Clean and Build" in Netbeans. It's produced a .jar file - but when double clicked, it loads nothing.

I've tried loading it on the command line using:
java -jar "C:\Users\USERNAME\Desktop\program1\dist\MYPROGRAM .jar"

And the error:
Failed to load Main-Class mainfest attribute from:
C:\Users\USERNAME\Desktop\program1\dist\MYPROGRAM. jar

I've been told to create a .txt file with the line:
MainClass : MainMenuUI.

But this doesn't seem to have any effect.

EDIT - I've managed to answer my own question and publish my program. Is there any way of converting it to a .jar as by having my program as a .jar file limits the amount of people able to use it. (IE - They must have a JRE installed?)


Regards,

Wozzer


All times are GMT. The time now is 11:40 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.