Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Newbie Question-Eclipse can't compile
Newbie Question-Eclipse can't compile [message #174369] Sun, 22 August 2004 05:50 Go to next message
Eclipse UserFriend
Originally posted by: bwilmot.gci.net

I've been using Netbeans for 6 months now. But thought I'd try Eclipse
since its got some kind press recently.

Got a "hello World" simple keyed in. But when I run, it pops open a
dialog box of "Create, Manage, and Run Configurations."

Tried about every cobintaion there. When run button is depressed I get a
second dialog box that says "Launch configuration New_configuration
references non-existing project brad1."

What do you suppose gives? Is there a simple mode of operation soi that I
can just practise simple J2SE experiments like NetBeans?
Re: Newbie Question-Eclipse can't compile [message #174513 is a reply to message #174369] Mon, 23 August 2004 13:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

Brad wrote:

> I've been using Netbeans for 6 months now. But thought I'd try Eclipse
> since its got some kind press recently.
>
> Got a "hello World" simple keyed in. But when I run, it pops open a
> dialog box of "Create, Manage, and Run Configurations."
>
> Tried about every cobintaion there. When run button is depressed I get a
> second dialog box that says "Launch configuration New_configuration
> references non-existing project brad1."
>
> What do you suppose gives? Is there a simple mode of operation soi that I
> can just practise simple J2SE experiments like NetBeans?
>

The tutorials and Help will go a long way towards answering newbie
questions. See Help > Contents... > Java Development Users Guide >
Getting Started

Launch Configurations are the mechanism by which Eclipse launches
programs, including Java programs, JUnit tests, Ant, etc. If your
project has just one runnable class, you should be able to right-click
it and choose Run (a Launch Config would be created automatically and
launched as a result). I guess some more detail about what you did and
saw might help to figure out why that did not happen for you.
In any case, definitely spend some time in the Help - it will make your
exploration of Eclipse a lot smoother.

HTH,
Eric
Re: Newbie Question-Eclipse can't compile [message #174694 is a reply to message #174513] Tue, 24 August 2004 02:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brad_wilmot.correct.state.ak.us

Eric Rizzo wrote:

> Brad wrote:

> > I've been using Netbeans for 6 months now. But thought I'd try Eclipse
> > since its got some kind press recently.
> >
> > Got a "hello World" simple keyed in. But when I run, it pops open a
> > dialog box of "Create, Manage, and Run Configurations."
> >
> > Tried about every cobintaion there. When run button is depressed I get a
> > second dialog box that says "Launch configuration New_configuration
> > references non-existing project brad1."
> >
> > What do you suppose gives? Is there a simple mode of operation soi that I
> > can just practise simple J2SE experiments like NetBeans?
> >

> The tutorials and Help will go a long way towards answering newbie
> questions. See Help > Contents... > Java Development Users Guide >
> Getting Started

> Launch Configurations are the mechanism by which Eclipse launches
> programs, including Java programs, JUnit tests, Ant, etc. If your
> project has just one runnable class, you should be able to right-click
> it and choose Run (a Launch Config would be created automatically and
> launched as a result). I guess some more detail about what you did and
> saw might help to figure out why that did not happen for you.
> In any case, definitely spend some time in the Help - it will make your
> exploration of Eclipse a lot smoother.

> HTH,
> Eric


No help. It seems that to to do the command line equivalent as "javac
myprog.java" and produce a simple executable class file as output requires
one to read a tome, learn a whole new vernacular and "rediscover" how
Eclipse designers believe you should edit/compile/test your code! What
ever happened to the concept of self-discovery? I just got my hands on
NetBeans 4.0 today, and it seems they have the same system. So what, if
you know how to set your own CLASSPATH and run javac from the command
line? I've only spent 180 minutes on my Eclipse Hello World application
and feel that Eclipse is a non-starter. Too bad, since I'm going to
decide what my staff use at work. (Sorry for my sourness) But I am left
a non-believer that newbies haven't already experienced what I am going
through!

I have entered my Hello World program in the Eclipse editor, but now
realize, that when I deliberately damage the code (syntax), Eclipse
doesn't complain. (Netbeans shows an immediate error). When I try to run
it, it still gives me the same original error: "Launch configuration
New_configuration
references non-existing project brad1."

From the "Getting Started" HELP menu, I find no help on "LAUNCH
CONFIGURATIONS" as you suggested. But I spent an hour or so there. Too
bad there isn't a list of terms. Sure wish I had prior knowledge on what
the heck a PROJECT is, even though I've got one defined, and my simple
program seems to indicate its "in" the project.

Found in HELP talk about BUILDing a project, but the MANUAL options seem
like the wrong way. But then why doesn't the AUTO work? If AUTO was
working I would think that I'd get some kind of error due to my deliberate
syntax error.

Maybe I'm wrong, but I would think that to run a Hello World application
already coded in the Eclipse editor that, someone could say "click here
first" and then "here" second and my problem would be solved.

BTW, another Java newbie at work couldn't get Eclipse to compile either,
so I hope Eclipse isn't a elitist toy. NetBeans…...…easy, until their
release 4.0

Oh, before sending I spent another 30-minutes or so......Tried to do a
bunch of things related to my code......One error that seems inappropriete
that I'm getting in several places is "The resource is not on the build
path of a Java project." God only knows if this is at all related to my
difficulties. Does a user have to set his CLASSPATH before starting
Eclipse?

Thanx much if anyone can help.
Re: Newbie Question-Eclipse can't compile [message #174701 is a reply to message #174694] Tue, 24 August 2004 03:59 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
It would appear that the project you created is not Java project.

Eclipse auto-builds the .java file to .class files for all .java files
contained in a Java project.
Does your project icon in the Package Explorer show a little blue 'J'
associated with the folder?
If not, then you have created a Simple project.

To create a Java project
File>New>Project>Java Project
Give the project a name. Click Finish

Select your new project
File>New>Class
Create the class

Enter your code
Save (class file will be generated with auto-build on (Project>Build
Automatically))
In the Package Explorer, select your class, right click>Run>Java Application

HTH
Darins

"Brad" <brad_wilmot@correct.state.ak.us> wrote in message
news:cge85a$bh7$1@eclipse.org...
> Eric Rizzo wrote:
>
> > Brad wrote:
>
> > > I've been using Netbeans for 6 months now. But thought I'd try
Eclipse
> > > since its got some kind press recently.
> > >
> > > Got a "hello World" simple keyed in. But when I run, it pops open a
> > > dialog box of "Create, Manage, and Run Configurations."
> > >
> > > Tried about every cobintaion there. When run button is depressed I
get a
> > > second dialog box that says "Launch configuration New_configuration
> > > references non-existing project brad1."
> > >
> > > What do you suppose gives? Is there a simple mode of operation soi
that I
> > > can just practise simple J2SE experiments like NetBeans?
> > >
>
> > The tutorials and Help will go a long way towards answering newbie
> > questions. See Help > Contents... > Java Development Users Guide >
> > Getting Started
>
> > Launch Configurations are the mechanism by which Eclipse launches
> > programs, including Java programs, JUnit tests, Ant, etc. If your
> > project has just one runnable class, you should be able to right-click
> > it and choose Run (a Launch Config would be created automatically and
> > launched as a result). I guess some more detail about what you did and
> > saw might help to figure out why that did not happen for you.
> > In any case, definitely spend some time in the Help - it will make your
> > exploration of Eclipse a lot smoother.
>
> > HTH,
> > Eric
>
>
> No help. It seems that to to do the command line equivalent as "javac
> myprog.java" and produce a simple executable class file as output requires
> one to read a tome, learn a whole new vernacular and "rediscover" how
> Eclipse designers believe you should edit/compile/test your code! What
> ever happened to the concept of self-discovery? I just got my hands on
> NetBeans 4.0 today, and it seems they have the same system. So what, if
> you know how to set your own CLASSPATH and run javac from the command
> line? I've only spent 180 minutes on my Eclipse Hello World application
> and feel that Eclipse is a non-starter. Too bad, since I'm going to
> decide what my staff use at work. (Sorry for my sourness) But I am left
> a non-believer that newbies haven't already experienced what I am going
> through!
>
> I have entered my Hello World program in the Eclipse editor, but now
> realize, that when I deliberately damage the code (syntax), Eclipse
> doesn't complain. (Netbeans shows an immediate error). When I try to run
> it, it still gives me the same original error: "Launch configuration
> New_configuration
> references non-existing project brad1."
>
> From the "Getting Started" HELP menu, I find no help on "LAUNCH
> CONFIGURATIONS" as you suggested. But I spent an hour or so there. Too
> bad there isn't a list of terms. Sure wish I had prior knowledge on what
> the heck a PROJECT is, even though I've got one defined, and my simple
> program seems to indicate its "in" the project.
>
> Found in HELP talk about BUILDing a project, but the MANUAL options seem
> like the wrong way. But then why doesn't the AUTO work? If AUTO was
> working I would think that I'd get some kind of error due to my deliberate
> syntax error.
>
> Maybe I'm wrong, but I would think that to run a Hello World application
> already coded in the Eclipse editor that, someone could say "click here
> first" and then "here" second and my problem would be solved.
>
> BTW, another Java newbie at work couldn't get Eclipse to compile either,
> so I hope Eclipse isn't a elitist toy. NetBeans
Re: Newbie Question-Eclipse can't compile [message #174771 is a reply to message #174694] Tue, 24 August 2004 15:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

Brad wrote:
> Eric Rizzo wrote:
>>The tutorials and Help will go a long way towards answering newbie
>>questions. See Help > Contents... > Java Development Users Guide >
>>Getting Started
>
>
>>Launch Configurations are the mechanism by which Eclipse launches
>>programs, including Java programs, JUnit tests, Ant, etc. If your
>>project has just one runnable class, you should be able to right-click
>>it and choose Run (a Launch Config would be created automatically and
>>launched as a result). I guess some more detail about what you did and
>>saw might help to figure out why that did not happen for you.
>>In any case, definitely spend some time in the Help - it will make your
>>exploration of Eclipse a lot smoother.
>
>
>>HTH,
>> Eric
>
>
>
> No help. It seems that to to do the command line equivalent as "javac
> myprog.java" and produce a simple executable class file as output requires
> one to read a tome, learn a whole new vernacular and "rediscover" how
> Eclipse designers believe you should edit/compile/test your code! What
> ever happened to the concept of self-discovery? I just got my hands on
> NetBeans 4.0 today, and it seems they have the same system. So what, if
> you know how to set your own CLASSPATH and run javac from the command
> line? I've only spent 180 minutes on my Eclipse Hello World application
> and feel that Eclipse is a non-starter. Too bad, since I'm going to
> decide what my staff use at work. (Sorry for my sourness) But I am left
> a non-believer that newbies haven't already experienced what I am going
> through!
[snip]

Resist the urge to rant. Since none of use are sitting with you
observing your interactions with Eclipse and seeing your reactions, it
is difficult for us to understand at what fundamental point you and it
missed each other. We are trying to help, but the only way we can
effectively is if you are open minded about it and assume first that any
problems you have are due to user error or lack of understanding. That
is certainly not always the case, but I've found that such an attitude
helps me explore and learn, and also makes others more willing to help
me when I can't find my way on my own.
Now that you've tolerated my soapbox/general advice, I'll try to help
solve your problems directly ;-)

First, I'll reiterate a point I made before: Spend the time to go
through the tutorials under Help > Contents... > Java Development Users
Guide > Getting Started. There are 2 tutorials there that will take you
through, in gory detail, what is required to create, build, navigate,
run, and debug a Java project in Eclipse. A lot of it is the kind of
thing you can skim over because it is "obvious," but a lot of it is
probably a bit different than other IDEs and environments.

Second, like someone else pointed out, I think the fundamental problem
you're having is that the Project you created is not a Java project.
Remember that Eclipse is not a Java tool, per se, but a generic tool
platform on which any kind of development tool can be built. That is why
you have to be explicit about some things (for example, making a Project
"Java" instead of just the default).
Each Java Project has its own compile and runtime classpath settings, so
you don't have to set them up before running Eclipse. Eclipse (the IDE
application) runs in one environment, but the Java applications you
build with it can each have their own environment that is the same or
different from Eclipse's hosting env.

Please try creating a new Java Project from scratch and/or going through
the tutorial and see if that changes things for you. If so, it should
give you more to work with and we look forward to your next questions as
you explore the tool.


> Oh, before sending I spent another 30-minutes or so......Tried to do a
> bunch of things related to my code......One error that seems inappropriete
> that I'm getting in several places is "The resource is not on the build
> path of a Java project." God only knows if this is at all related to my
> difficulties. Does a user have to set his CLASSPATH before starting
> Eclipse?

This would be one symptom if your Project were not a Java Project (most
likely a "Simple Project" if you used default choices when creating it.

HTH,
Eric
Re: Newbie Question-Eclipse can't compile [message #174804 is a reply to message #174694] Tue, 24 August 2004 16:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

Brad wrote:

> Eric Rizzo wrote:

> > Brad wrote:

> > > I've been using Netbeans for 6 months now. But thought I'd try Eclipse
> > > since its got some kind press recently.
> > >
> > > Got a "hello World" simple keyed in. But when I run, it pops open a
> > > dialog box of "Create, Manage, and Run Configurations."
> > >
> > > Tried about every cobintaion there. When run button is depressed I get a
> > > second dialog box that says "Launch configuration New_configuration
> > > references non-existing project brad1."
> > >
> > > What do you suppose gives? Is there a simple mode of operation soi that
I
> > > can just practise simple J2SE experiments like NetBeans?
> > >

> > The tutorials and Help will go a long way towards answering newbie
> > questions. See Help > Contents... > Java Development Users Guide >
> > Getting Started

> > Launch Configurations are the mechanism by which Eclipse launches
> > programs, including Java programs, JUnit tests, Ant, etc. If your
> > project has just one runnable class, you should be able to right-click
> > it and choose Run (a Launch Config would be created automatically and
> > launched as a result). I guess some more detail about what you did and
> > saw might help to figure out why that did not happen for you.
> > In any case, definitely spend some time in the Help - it will make your
> > exploration of Eclipse a lot smoother.

> > HTH,
> > Eric


> No help. It seems that to to do the command line equivalent as "javac
> myprog.java" and produce a simple executable class file as output requires
> one to read a tome, learn a whole new vernacular and "rediscover" how
> Eclipse designers believe you should edit/compile/test your code! What
> ever happened to the concept of self-discovery? I just got my hands on
> NetBeans 4.0 today, and it seems they have the same system. So what, if
> you know how to set your own CLASSPATH and run javac from the command
> line? I've only spent 180 minutes on my Eclipse Hello World application
> and feel that Eclipse is a non-starter. Too bad, since I'm going to
> decide what my staff use at work. (Sorry for my sourness) But I am left
> a non-believer that newbies haven't already experienced what I am going
> through!

> I have entered my Hello World program in the Eclipse editor, but now
> realize, that when I deliberately damage the code (syntax), Eclipse
> doesn't complain. (Netbeans shows an immediate error). When I try to run
> it, it still gives me the same original error: "Launch configuration
> New_configuration
> references non-existing project brad1."

> From the "Getting Started" HELP menu, I find no help on "LAUNCH
> CONFIGURATIONS" as you suggested. But I spent an hour or so there. Too
> bad there isn't a list of terms. Sure wish I had prior knowledge on what
> the heck a PROJECT is, even though I've got one defined, and my simple
> program seems to indicate its "in" the project.

> Found in HELP talk about BUILDing a project, but the MANUAL options seem
> like the wrong way. But then why doesn't the AUTO work? If AUTO was
> working I would think that I'd get some kind of error due to my deliberate
> syntax error.

> Maybe I'm wrong, but I would think that to run a Hello World application
> already coded in the Eclipse editor that, someone could say "click here
> first" and then "here" second and my problem would be solved.

> BTW, another Java newbie at work couldn't get Eclipse to compile either,
> so I hope Eclipse isn't a elitist toy. NetBeans…...…easy, until their
> release 4.0

> Oh, before sending I spent another 30-minutes or so......Tried to do a
> bunch of things related to my code......One error that seems inappropriete
> that I'm getting in several places is "The resource is not on the build
> path of a Java project." God only knows if this is at all related to my
> difficulties. Does a user have to set his CLASSPATH before starting
> Eclipse?

> Thanx much if anyone can help.
Go to Help->Welcome. Click on the Tutorials icon (the blackboard with the
numbers and letters on it.) Click on the Java Development icon (the
light blue window with the Dark Blue J on it.) Follow the directions
Re: Newbie Question-Eclipse can't compile [message #174945 is a reply to message #174804] Wed, 25 August 2004 09:36 Go to previous message
Eclipse UserFriend
Originally posted by: brad_wilmot.correct.state.ak.us

Thanx - all .....it Lives! <grin>

The blue J ! I should have known. Seems that Eclipse is indeed
interested in customers. I find it refreshing; not only in the reply, but
that products on the move are chasing the market place. (And by people
interested in holding those customers.)

Soap Box....so hang up now, and accept my Thanx....I got it to work.
==>
Seems that the whole Java world is driving toward more complexity. I got
to Eclipse via the Swing vs. SWT issue, and that NetBeans is starting to
suck. (IMHO)

The issue I am railing on isn't Swing, SWT, Eclipse or Netbeans. I said,
it seems the whole Java community is driving toward complexity. Why?

Seems ANT got some kind of award this year. Did I say anything about
complexity? Can't help to believe programmers have become so
self-indulged on complexity, that the majority can no long see the sheer
folly of where our jobs must go (Bangladesh). Unless there is connect
between this complexity and the cost($) to owners of the business that
owns the SW, something is going to happen.

If Eclipse wants to own the market, they must solve the Blue J problem.
Now, to be sure, there was a total twit in the driver's chair, but we all
have to start considering simpler models of design, architecture, and
implementation, rather than adding, multiplying and exponentialzing (yeah,
I made that up) complexity. There is a trillion dollar market out there
that does not need the complexity of EJB, ANT, CWS, scalability, NetBeans,
persistence, JNI, JMS, ada, ada, ada). They may need about <1%, but they
really don’t need it all, and to the extent being preached/presented and
forced by tools such as Eclipse. Not all businesses are Amazon, TWA, DOD
and other gigantic systems that most of us will never see. They are
mom&pop, local government(taxes) and larger concerns (e.g. GM, Exxon etc.)
that have small, separate operating units that don't have/need monster
solutions to their parochial problems.

Programmers (or techs) with $100K+/Yr salaries will disagree, but
programming must become more inclusive, not less.

Eclipse's lunch will be eaten if high school students and undergrads can't
use it. BTW, .Net sucks too. Been there done that.

Adding a whole “Eclipse” model, where newbies start simple and add to
their complex world as they gain experience and actually need a function,
tool, technology or nightmare when they decide to go that route. Grow the
developer…..don’t overwhelm her and make every hurdle so high, that
success is at risk.

My 2 cents. [Note to self: Start a blog] [Note to self: Charge more. ]
Previous Topic:Compilation error do not appear as tasks
Next Topic:Refactor/move
Goto Forum:
  


Current Time: Sat Nov 09 03:39:43 GMT 2024

Powered by FUDForum. Page generated in 0.04290 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top