1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Publishing program with NetBeans

Discussion in 'Programming & Webmastering' started by Wozzer, Dec 4, 2012.

  1. Wozzer

    Joined:
    Jun 30, 2008
    Messages:
    1,133 (0.49/day)
    Thanks Received:
    68
    Location:
    England
    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
     
    Last edited: Dec 4, 2012
  2. Jimmy6

    Jimmy6

    Joined:
    Nov 12, 2013
    Messages:
    74 (0.21/day)
    Thanks Received:
    2
    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
     

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page