Results 1 to 7 of 7

Thread: Way to run it

  1. #1
    Huamin is offline Member
    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0

    Default Way to run it

    Hi,
    if I choose

    Run Menu > Run

    within Eclipse Juno Java tool, I get the following
    https://dl.dropboxusercontent.com/u/40211031/tt200.png

    can you please advise, how to run the project?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    25

    Default Re: Way to run it

    Recommended reading: How to ask questions the smart way

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Way to run it

    In Eclipse you don't run "projects", you run a class inside the workspace. As such you have to run the source file with a valid main(). Assuming this is a client application.

    That's about as much as I can say with absolutely no information.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,423
    Blog Entries
    7
    Rep Power
    27

    Default Re: Way to run it

    It would've helped if you'd read at least a bit of Eclipse's online documentation; you have to define a 'launcher' that tells Eclipse what to run. (select Run>Run Configuration ...) You name the launcher for convenience, select a project and the class that contains a public static void main(String[] args) method. Why do people expect that something works the way they had in mind that it should work without reading the instructions first?

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Way to run it

    You are correct, but such a launcher is automatically created when you run a class WITH public static void main for the first time. You only really need to meddle with it when you need to further configure it, such as what parameters you want to pass to the program.

    And again: that's assuming this is a java client application project and not say an applet or a web application.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  6. #6
    trcooke is offline Tim Cooke
    Join Date
    Jul 2014
    Location
    Belfast
    Posts
    101
    Rep Power
    0

    Default Re: Way to run it

    You've provided pretty much no information for us to go on at all, so it's near impossible to know what to suggest.

    Also cross posted Way to run it

  7. #7
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Way to run it

    From the sister forum:

    I really did develop Java project a few months ago, using Eclipse tool.

    But now I do not know how to compile the current project. And could you please help?
    Aha, its a chameleon OP. We've gone from not being able to run the application to not being able to compile it at all. Well, I'm not going to burn my fingers on this one.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Posting Permissions

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