Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Creating a project within an existing directory
Creating a project within an existing directory [message #208156] Mon, 30 April 2007 14:46 Go to next message
Eclipse UserFriend
Originally posted by: dgront.chem.uw.edu.pl

Hello!

I have the main directory called trunk. In trunk I have several
directories with my classes. There are no *.class files directories - only
subdirectories.

So the situation looks like that:

/trunk
|
|- dir1
| |
| dir1A
| |
| MyClass.java
|
|- dir2
|
MyClass2.java


The class MyClass is properly imported as dir1.dir1A.MyClass. For example
file MyClass2.java starts as follows:

import dir1.dir1A.MyClass1;

My CLASSPATH (also the list of jar files defined in Eclipse) points to a
file dir1.jar, that contains a MyClass. The whole package compiles nicely
both with
make and ant.

Now I want to substitute vi with Eclipse. I created a new project called
"trunk" and imported my whole structure into it. And there my problems
starts. Eclipse wants me to change my "import" line from:
import dir1.dir1A.MyClass1;
to:
import dir1A.MyClass1;

It looks like my package dir1 is not recognized by Eclipse as a package
but as a src-directory with a package "dir1A" inside.

How can I switch of this stupid Windows-like behavior?
I wants my *.class files to be put in:
classes/dir1
and
classes/dir2
respectively, depending on a source directory. Than I want a jar file to
be created from classes/dir1.

I dont't know why eclipse cannot compile my source since dir1.jar file is
already on CLASSPATH and it is also included in "external jars list" in my
project

I hope anyone can help me.
Dominik
Re: Creating a project within an existing directory [message #208165 is a reply to message #208156] Mon, 30 April 2007 15:13 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Dominik,

Bring up the Properties for the project using the popup, select Java
Build Path, and use the Source tab to specify your desired source folders.


dgront wrote:
> Hello!
>
> I have the main directory called trunk. In trunk I have several
> directories with my classes. There are no *.class files directories -
> only subdirectories.
>
> So the situation looks like that:
>
> /trunk
> |
> |- dir1
> | |
> | dir1A
> | |
> | MyClass.java
> |
> |- dir2
> |
> MyClass2.java
>
>
> The class MyClass is properly imported as dir1.dir1A.MyClass. For
> example file MyClass2.java starts as follows:
>
> import dir1.dir1A.MyClass1;
>
> My CLASSPATH (also the list of jar files defined in Eclipse) points to
> a file dir1.jar, that contains a MyClass. The whole package compiles
> nicely both with
> make and ant.
>
> Now I want to substitute vi with Eclipse. I created a new project
> called "trunk" and imported my whole structure into it. And there my
> problems starts. Eclipse wants me to change my "import" line from:
> import dir1.dir1A.MyClass1;
> to:
> import dir1A.MyClass1;
>
> It looks like my package dir1 is not recognized by Eclipse as a
> package but as a src-directory with a package "dir1A" inside.
>
> How can I switch of this stupid Windows-like behavior?
> I wants my *.class files to be put in:
> classes/dir1
> and
> classes/dir2
> respectively, depending on a source directory. Than I want a jar file
> to be created from classes/dir1.
> I dont't know why eclipse cannot compile my source since dir1.jar file
> is already on CLASSPATH and it is also included in "external jars
> list" in my project
>
> I hope anyone can help me.
> Dominik
>
Previous Topic:What do those little Update Manager Symbols mean?
Next Topic:Eclipse plugin which render graphs from warnings
Goto Forum:
  


Current Time: Fri Apr 26 23:19:51 GMT 2024

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

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

Back to the top