Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Trying to Import existing Java code into an Eclipse project
Trying to Import existing Java code into an Eclipse project [message #870545] Tue, 08 May 2012 15:53 Go to next message
Rick Dabate is currently offline Rick DabateFriend
Messages: 1
Registered: May 2012
Junior Member
I'm, as new as they come. Going through a Java book for beginners.

Now, I'm at a step where it tells me to try to import the test code. I go through the wizard , but do not see the Test.java anywhere within Eclipse. However, if I browse to my work space and open the Test Projects folder, I see the Test.Java that was imported.

Shouldn't I be able to see the Test.Java within Eclipse somewhere?

Thanks,

Rick
Re: Trying to Import existing Java code into an Eclipse project [message #871210 is a reply to message #870545] Fri, 11 May 2012 13:03 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3266
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 05/08/2012 09:53 AM, Rick Dabate wrote:
> I'm, as new as they come. Going through a Java book for beginners.
> Now, I'm at a step where it tells me to try to import the test code. I
> go through the wizard , but do not see the Test.java anywhere within
> Eclipse. However, if I browse to my work space and open the Test
> Projects folder, I see the Test.Java that was imported.
> Shouldn't I be able to see the Test.Java within Eclipse somewhere?
>
> Thanks,
>
> Rick

You don't say what you've done here to import the project.

You can only import actual Eclipse projects. These are characterized by
..project, .classpath, and maybe other files in the project root. If this
is not the case, then you must create a new project that uses your code.

There are different kinds of projects offered by Eclipse, but the
simplest one is the Java Project. To create a new project of this source
code you wish to use assumes that it's already in a reasonable
subdirectory hierarchy. I'll let you work that out for yourself, but you
might create a new, sample project in Eclipse to see how it builds the
subdirectories.

When you create the new project for your existing code, the second step
in the project creation wizard/dialog is to point it to the root
subdirectory of that code. Make sure you do that.

After that, you'll need to add any supporting JARs to the project.

I suggest a tutorial on creating new Eclipse projects to familiarize you
with the Eclipse IDE. Drop anchor over at vogella.de and check out the
best ones available.

Best of luck.
Previous Topic:400 bad request in middle-tier
Next Topic:Run As
Goto Forum:
  


Current Time: Sat Dec 20 15:54:48 GMT 2014

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

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