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

Thread: launch error

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Posts
    11
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default launch error

    Launch Error.jpg


    I am use an IDE.I am trying to run with ctrl+F11.
    What can I do to run correctly?


  2. #2
    Senior Member PhHein's Avatar
    Join Date
    Mar 2013
    Location
    Germany
    Posts
    609
    My Mood
    Sleepy
    Thanks
    10
    Thanked 93 Times in 86 Posts

    Default Re: launch error

    Implement a main method.

  3. #3
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: launch error

    I suspect you either need a main() method, or if the source code has one, then the source code file should be named the same as the top-level public class name with the .java extension. You might refer to the IDE's getting started tutorials for help over these basic Java hurdles with the IDE.

  4. The Following User Says Thank You to GregBrannon For This Useful Post:

    shirin (December 6th, 2013)

  5. #4
    Junior Member
    Join Date
    Dec 2013
    Posts
    11
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Re: launch error

    Thanks, but when this error appear while I want to run simple program with CloudSim toolkit with eclipse IDE.Can you help me to run it correctly?

  6. #5
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: launch error

    The simple program has a main() method? When we suggest remedies, you need to address them directly.

    If you don't know, say so. If you do know and you've determined that the simple program does not have a main() method, then add one. If you don't know how to add a main() method, then you need to start at the beginning and learn some Java rather than expecting people to explain to you how to run random code you found on the Internet. If the simple program has a main() method and you're still getting the error, then post the simple program in code tags and we'll go from there.

  7. #6
    Junior Member
    Join Date
    Dec 2013
    Posts
    11
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Re: launch error

    public class sample2 {

    public static void main(String[] args) {

    System.out.println("Hello world");
    }

    }
    This is my code without any error and I want to start cloud programming with eclipse IDE.What can I do to learn?Can You help me?

  8. #7
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: launch error

    First, please read the Announcement topic to learn how to post code in code or highlight tags and other useful info for newcomers.

    I don't know what cloud programming is. Please define what you think it is and what you need help with. Someone smarter may happen by and be able to help.

Similar Threads

  1. launch error
    By shirin in forum What's Wrong With My Code?
    Replies: 2
    Last Post: December 7th, 2013, 01:45 AM
  2. Launch Error Editor does not contain main type
    By aj_boulay in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 21st, 2012, 12:31 AM
  3. [SOLVED] How to write Eclipse launch file?
    By beruska in forum Java IDEs
    Replies: 3
    Last Post: October 18th, 2011, 09:41 AM
  4. method to launch a jar file
    By frozen java in forum Java Theory & Questions
    Replies: 2
    Last Post: July 17th, 2011, 02:17 PM
  5. Unable to launch app of java application
    By sharmaneelam in forum What's Wrong With My Code?
    Replies: 1
    Last Post: May 19th, 2010, 08:42 AM