# Publishing program with NetBeans



## Wozzer (Dec 4, 2012)

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


----------



## Jimmy6 (Dec 5, 2013)

I am running Ubuntu linux. is  that for me to make this application runnable by window users ? and by runnable, i mean, for them to be able to just click the icon and have the application start up. it won't work for me to tell everyone i distribute this to a long string of letters they need to type into CMD to start it up


----------

