Hi! my apologies if this is not the correct subforum, the question is about beginning Eclipse
I've already compiled and run the "hello world" example but I need to run an already developed (not by me) software.
This software is in many folders, with the following structure:
D:\ folder1 \ folder2 \ folder3 \ folder4
folder4 contains 9 folders : A, B, C,....H, I.
In folder B there's a folder named "TESTS" where is the main that I need to run, in the first line of that class there's the
I have all the .java classes but I need to compile all of them, I created a project but I don't know how to define the folder's structure in my project, I just copied the same structure in the Eclipse workspace but it did not work.
Welcome to JavaRanch! No need to apologize for asking a beginner question anywhere let alone the Beginning forum
In Eclipse, there is a "src" folder in a project when you first created it. This represents the "root." So if I have the package "com.javaranch.coding.MyClass", it goes in the directory. <my project's full path>/src/com/javaranch/coding.
I am going to move this to our IDEs forum since it is kind of about Eclipse.
Joined: Jun 05, 2010
I'm doing something wrong:
first I created a workspace for Eclipse D\alex
then I created a project MyProject there
As you said, when I created MyProject the D\alex\MyProject\src was created.
The class that I need to compile is in C\spv7.3\cb\pfv\spv\tests it is the package: package cb.pfv.spv.tests;
I copied the folders cb\pfv\spv\tests to D\alex\MyProject\src, so now I have
Then I do File-Open File and open the file I need to compile from D\alex\MyProject\src\cb\pfv\spv\tests
then I try to compile it Project-Build Project but nothing happens.
Joined: Jun 05, 2010
NOW IT WORKS!!!
Automatic compilation was turned on so i turned it off, then I refreshed the view and now could compile everything and there is a directory with the generated classes.
Now they are compiled with some warnings but no errors, thanks.
This was the key step - Eclipse maintains its own "view" of the directories and files within a project. If you copy files, using OS tools, into or out of the project you must then refresh the project for Eclipse to use them.