Results 1 to 5 of 5
  1. #1
    VinceGuad is offline Member
    Join Date
    Jan 2008
    Posts
    36
    Rep Power
    0

    Question Quick Help Please! Can't Run Code!!

    I have Java 6 Update 4 installed on my computer as well as Eclipse Classic 3.3.1 (both downloaded and installed today)

    When I go to Run -- > Run As inside Eclipse it shows (None Applicable)


    can anyone tell me why this is and how to fix this? I cannot run anything :(! Seems as if its not detecting my Java

  2. #2
    roots's Avatar
    roots is offline Moderator
    Join Date
    Jan 2008
    Location
    Dallas
    Posts
    293
    Rep Power
    7

    Default

    it shows Run as Java Application if the code in the editor has main method ..
    public static void main(String[] args)..
    dont worry newbie, we got you covered.

  3. #3
    VinceGuad is offline Member
    Join Date
    Jan 2008
    Posts
    36
    Rep Power
    0

    Default

    There's nothing wrong with the code

    Java Code:
    //********************************************************************
    //  Lincoln.java       Author: Lewis/Loftus
    //
    //  Demonstrates the basic structure of a Java application.
    //********************************************************************
    
    public class Lincoln
    {
       //-----------------------------------------------------------------
       //  Prints a presidential quote.
       //-----------------------------------------------------------------
       public static void main (String[] args)
       {
          System.out.println ("A quote by Abraham Lincoln:");
    
          System.out.println ("Whatever you are, be a good one.");
       }
    }
    Heres a screenshot also




    :confused: :confused: :confused:

  4. #4
    roots's Avatar
    roots is offline Moderator
    Join Date
    Jan 2008
    Location
    Dallas
    Posts
    293
    Rep Power
    7

    Default

    Now i see it ..

    You need to define a project before you can execute a java code. I could not see any project in Package Explorer in the image.

    Create new project. And paste that file to src folder of that project every thing will be alright
    dont worry newbie, we got you covered.

  5. #5
    VinceGuad is offline Member
    Join Date
    Jan 2008
    Posts
    36
    Rep Power
    0

Similar Threads

  1. Simple version of quick sort
    By Java Tip in forum Algorithms
    Replies: 0
    Last Post: 04-15-2008, 07:40 PM
  2. Wanna make 5 quick bucks?
    By GodiaN in forum Java Applets
    Replies: 5
    Last Post: 01-21-2008, 07:15 PM
  3. Quick Stupid Question
    By bluekswing in forum New To Java
    Replies: 7
    Last Post: 01-08-2008, 06:35 PM
  4. Quick Job required in Java
    By taxman in forum Jobs Offered
    Replies: 0
    Last Post: 01-02-2008, 11:46 AM
  5. Quick Question (Functions)
    By ibanez270dx in forum New To Java
    Replies: 2
    Last Post: 11-16-2007, 01:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •