"HelloWorld.java" to run at eclipse

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • devgupta01
    New Member
    • Jan 2008
    • 20

    #1

    "HelloWorld.java" to run at eclipse

    Hi all,
    I have simple program- "HelloWorld.jav a" to run at eclipse.
    Java Version 1.4.2
    Eclipse Version 3.2

    Code:
    class HelloWorld
    {
      public static void main(String[] aa)
     {
       System.out.println("Hello World!!");
       System.out.println("Please Help me, How to run this prog at eclipse.");
     }
    }
    I m new at eclipse. How to configure eclipse to run this program.
    Please let me know if anybody has solution of my problem.
    thanks.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by devgupta01
    Hi all,
    I have simple program- "HelloWorld.jav a" to run at eclipse.
    Java Version 1.4.2
    Eclipse Version 3.2

    Code:
    class HelloWorld
    {
      public static void main(String[] aa)
     {
       System.out.println("Hello World!!");
       System.out.println("Please Help me, How to run this prog at eclipse.");
     }
    }
    I m new at eclipse. How to configure eclipse to run this program.
    Please let me know if anybody has solution of my problem.
    thanks.
    Just create a new project and call it Tests, then right click your project and click new class and give it the name of your class.
    Then just make sure the standard Java classes are in the build path of your project.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Did you try to check the help feature and make it search for 'run java' or similar?

      kind regards,

      Jos

      Comment

      • nomad
        Recognized Expert Contributor
        • Mar 2007
        • 664

        #4
        Originally posted by devgupta01
        Hi all,
        I have simple program- "HelloWorld.jav a" to run at eclipse.
        Java Version 1.4.2
        Eclipse Version 3.2

        Code:
        class HelloWorld
        {
        public static void main(String[] aa)
        {
        System.out.println("Hello World!!");
        System.out.println("Please Help me, How to run this prog at eclipse.");
        }
        }
        I m new at eclipse. How to configure eclipse to run this program.
        Please let me know if anybody has solution of my problem.
        thanks.
        I'm assuming that you have a Package and a Class set up.
        1. Right click in the Editor window, choose Source from the popup menu and then choose Format. Your code will be reformatted.
        2. In the Package Explorer window, right click the file HelloWorld.java , choose Run As, and then choose Java Application. You will be prompted to save your program. Click OK to save.
        3. The program will execute and a console window at the bottom of the screen will display the output.
        nomad

        Comment

        • nomad
          Recognized Expert Contributor
          • Mar 2007
          • 664

          #5
          Originally posted by nomad
          I'm assuming that you have a Package and a Class set up.
          1. Right click in the Editor window, choose Source from the popup menu and then choose Format. Your code will be reformatted.
          2. In the Package Explorer window, right click the file HelloWorld.java , choose Run As, and then choose Java Application. You will be prompted to save your program. Click OK to save.
          3. The program will execute and a console window at the bottom of the screen will display the output.
          nomad
          If you goto the Eclipse website they tell you how to do this as well
          http://www.eclipse.org/resources/ they even have videos on how to.

          Comment

          Working...