Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Compiled .jar won't work (Error-sound)

  1. #1
    Junior Member
    Join Date
    Feb 2011
    Location
    Sweden
    Posts
    19
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Compiled .jar won't work (Error-sound)

    I'm going to compile a project. I do like in this example below marked in red and the cmd says it compresses to a jar. The .jar ends up in the same folder as the mainclass and when I press the .jar file I just hear that "windows error-sound" and the .jar does not open.

    jar cvf TicTacToe.jar TicTacToe.class audio images

    The example marked in red is from here Creating a JAR File (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files) and I've read all that.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Compiled .jar won't work (Error-sound)

    Read a bit further into those tutorials
    Running JAR-Packaged Software (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files)
    Sounds like you need to set the entry point of the application with a manifest file.

  3. The Following User Says Thank You to copeg For This Useful Post:

    Fermen (March 31st, 2011)

  4. #3
    Junior Member
    Join Date
    Feb 2011
    Location
    Sweden
    Posts
    19
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Re: Compiled .jar won't work (Error-sound)

    Thanks I looked further and fixed my manifest as it was not correctly made.

Similar Threads

  1. Issues with Sound setMicrosecondPosition in Mac Os X
    By surendhar in forum What's Wrong With My Code?
    Replies: 5
    Last Post: August 19th, 2010, 01:33 AM
  2. Java sound API
    By bondage in forum Java SE APIs
    Replies: 3
    Last Post: July 22nd, 2010, 01:01 PM
  3. Program compiled/ran as required - FAILED project WHY??????????
    By MISSAJ in forum What's Wrong With My Code?
    Replies: 7
    Last Post: June 23rd, 2010, 03:35 PM
  4. need help with Timer and sound
    By amahara in forum AWT / Java Swing
    Replies: 4
    Last Post: February 18th, 2010, 12:22 PM
  5. Difference between Speech API and Sound API
    By zeeshanmirza in forum Java SE APIs
    Replies: 1
    Last Post: October 22nd, 2009, 12:22 AM