Question : Don't know how to open workspace in Eclipse

There is supposed to be an XML file that is a workspace, and I don't understand how to open it.  

I am running Ubuntu.. Follows is a command line of all possible relevant files. I have put them in workspace" which seems to be what Eclipse wants

kayve@kayve-laptop:~$ cd Documents/
kayve@kayve-laptop:~/Documents$ cd ..
kayve@kayve-laptop:~$ cd workspace/
kayve@kayve-laptop:~/workspace$ pwd
/home/kayve/workspace
kayve@kayve-laptop:~/workspace$ ls
hw3  HW3  HW4
kayve@kayve-laptop:~/workspace$ cd HW4
kayve@kayve-laptop:~/workspace/HW4$ ls
06~Chapter_09.zip  ch09
kayve@kayve-laptop:~/workspace/HW4$ cd ch09/
kayve@kayve-laptop:~/workspace/HW4/ch09$ ls
Lists
kayve@kayve-laptop:~/workspace/HW4/ch09$ cd Liat
bash: cd: Liat: No such file or directory
kayve@kayve-laptop:~/workspace/HW4/ch09$ cd Lists
kayve@kayve-laptop:~/workspace/HW4/ch09/Lists$ ls
build.xml  nbproject  src  test
kayve@kayve-laptop:~/workspace/HW4/ch09/Lists$ ls nbproject/
build-impl.xml  genfiles.properties  project.properties  project.xml
kayve@kayve-laptop:~/workspace/HW4/ch09/Lists$ ls src
lists
kayve@kayve-laptop:~/workspace/HW4/ch09/Lists$ ls src/lists
CoarseList.java  LazyList.java      OptimisticList.java
FineList.java    LockFreeList.java
kayve@kayve-laptop:~/workspace/HW4/ch09/Lists$ ls test
lists
kayve@kayve-laptop:~/workspace/HW4/ch09/Lists$ ls test/lists
CoarseListTest.java  LazyListTest.java      OptimisticListTest.java
FineListTest.java    LockFreeListTest.java
kayve@kayve-laptop:~/workspace/HW4/ch09/Lists$



Answer : Don't know how to open workspace in Eclipse

Okay, think I understand so take a deep breath and see if this helps.


Switch workspace to just /home/kayve/workspace .  The HW4 structure below are your project files.  HW4 you should consider the project name and by default Eclipse will treat it as such.


Anyway, establish your workspace as root of the folder I showed if not already.

Second, click File | New | Project .

See the image "New Project Screen" for what you want to look for as suspect you are creating a general Java project.  Therefore, you can choose Java project OR if the XML file being referenced is an ANT buildfile you can choose that.  Not to get you more confused, let's just go forward with Java Project (the more I look above, it appears you have a Netbeans project that you are porting to Eclipse).

Carrying on, on the next screen you want to pick the option shown in "Create From Existing Source Option" image.  You will then be able to browse and pick the correct project folder.  

*Again the more I look at this you have a Netbeans project here and looks like Lists is actually your project with src folder and package lists inside.  The other tests directory has your lists package and JUnit test classes which you can choose to put in same project in Eclipse or create a different project for.

Just to keep it simple let's just try to get you through the first step of adding the classes under src/lists first and then can worry about the test ones when you have a better understanding.  


*I have Netbeans and Eclipse on this machine which is Ubuntu as well, so if my above comments don't help you tonight I will be back on in the morning and can give a more step by step approach specific to Netbeans to Eclipse project import.

Should work for you as above.  After project is in Eclipse, you can set the source folder to /path/to/src.  Then lists will properly be recognized as a package name.
 
New Project Screen
New Project Screen
 
 
Create From Existing Source Option
Create From Existing Source Option
 
Random Solutions  
 
programming4us programming4us