Eclipse: How to build? Help Please

S

soup_or_power

Hi
I am trying Project->Build and not seeing any results. I have the
classpath defined under Window->Preferences. There is a CVS repository
in the backend that is downloaded into the /home/user/workspace of the
client on which eclipse runs. What I expect from Eclipse is to javac
the open file using the classpath and generating a class file. How can
I accomplish this seemingly basic thing? Please post your helpful
comments.

Thank you
Murthy
 
O

Oliver Wong

Hi
I am trying Project->Build and not seeing any results. I have the
classpath defined under Window->Preferences. There is a CVS repository
in the backend that is downloaded into the /home/user/workspace of the
client on which eclipse runs. What I expect from Eclipse is to javac
the open file using the classpath and generating a class file. How can
I accomplish this seemingly basic thing? Please post your helpful
comments.

Eclipse isn't so much meant to be a compiler as an IDE. That is to say,
if you just want to generate class files from java files, you might want to
look at a build tool, like ANT.

To actually answer your question though, first of all, are the files you
want to build part of a Java project in Eclipse? Eclipse is a "generic" IDE,
so if created a "C/C++ project" in Eclipse and added .java files to it,
Eclipse will assume these are just generic resource files and not touch
them.

Second, is automatic building turned on? If so, then Eclipse will
immediately generate the class files any time it detects changes to them.
Since it knows the files are already built, it will probably ignore any
requests to build them again. If you want to force a rebuild, choose the
"clean" command.

Other potentially helpful comments:

Eclipse has a built in CVS client. It's probably a good idea to use it
because Eclipse will have an easier time detecting when files have changed
and thus make its automatic build feature more useful. Otherwise, if you
update the files while Eclipse is open, you might have to manually tell
Eclipse to refresh its view of the files to check for changes.

Eclipse has its own newsgroup server, and one of the newsgroup is called
"eclipse.newcomer", which is probably a very good place to post further
questions you may have. You need to register a (free) account to access
their newsgroup server. Details are at
http://www.eclipse.org/newsgroups/index.html

- Oliver
 
S

soup_or_power

Oliver
Many thanks for your detailed response. The good folks at eclipse.org
suggested the online tutorials. I went through them. They don't cover
CVS. What is the simplest way to compile files checked out from CVS? I
am not using automatic build. I have set up the class path to include
all the jars necessary for the build. Please let me know.

Thank you
 
O

Oliver Wong

Oliver
Many thanks for your detailed response. The good folks at eclipse.org
suggested the online tutorials. I went through them. They don't cover
CVS. What is the simplest way to compile files checked out from CVS? I
am not using automatic build. I have set up the class path to include
all the jars necessary for the build. Please let me know.

Thank you

What I would do is to set up Eclipse to be your CVS client. In Eclipse,
choose the menu items "Window->Open Perspective->Other..." and choose "CVS
Repository Exploring" in the menu that pops up. From there, you'll have a
list of repositories (possibly of length 0, meaning you won't see anything).

If the repository you want is not there yet, right click on an empty
spot in the "CVS Repositories" view, and choose "New->Repository Location".
From there, you'll have to fill in info like the address of the CVS server,
username and password and stuff like that.

Now that you've got a repository, open it, then open "HEAD", and you
should see all the projects in your CVS repository. Select the one you want
and choose "Check Out". Eclipse should create the project for you. Hopefully
it'll be a Java project. You'll know it's a Java project because the project
icon will have a little "J" in the top right corner.

If it IS a Java project, then Eclipse should start compiling the project
automatically right away, and you're all set.

If not, then it gets kind of tricky. Perhaps this thread will help you:

http://groups.google.ca/group/comp....read/thread/cc2a0697cca94c6c/d55ec6b4a29734df

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top