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 6 of 6

Thread: New to java

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default New to java

    Can anyone tell whats the meaning of Failed to load Main
    In java virtual machine launcher



    ""Failed to load Main - class Mainifest attribute from
    C:\Program Files (x86)\java\jre6\lib\xxx.jar""


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: New to java

    Please do not post multiple copies of the same question. I've deleted your duplicate posts, and moved this thread to a more appropriate forum.

    What jar are you trying to run? How exactly are you trying to run it?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Junior Member
    Join Date
    Mar 2012
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: New to java

    """I have moved this thread to - Java IDEs

    Creating a JAR file in Eclipse is easy.

    In Eclipse, select File > Export > Java > Jar File

    Click Next

    Tick the correct Project on the left hand side and expand to tick the correct Package.
    With the Package selected, tick the .java files on the right hand side which you wish to be added to the JAR.

    Where it says 'Select the export destination'
    Browse to the desired destination and give the file a name, eg time.jar

    Make sure 'compress the contents of the JAR file' is ticked and click Next, then Next again.

    Make sure 'Generate the manifest file' and 'Seal the JAR' are selected.

    Under 'Select the class of the application entry point:' click Browse and select the main Class.

    Now click Finish.

    Your JAR file will now be in the destination folder selected earlier.

    You can run this by navigating to the directory in a command window and typing: java -jar time.jar"""



    i done like this

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: New to java

    What is the main class of the jar? Is that what the manifest says? Examine the contents of the jar to be sure.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Junior Member
    Join Date
    Mar 2012
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: New to java

    its says the version and the main class

  6. #6
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: New to java

    I do not understand what you're trying to say, and I suspect that you don't understand what I'm saying either. The best I can do is point you towards the tutorials: Lesson: Packaging Programs in JAR Files (The Java™ Tutorials > Deployment)
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!