LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Start work with eclipse (https://www.linuxquestions.org/questions/programming-9/start-work-with-eclipse-294508/)

eduardomsilva 02-24-2005 06:38 PM

Start work with eclipse
 
Hello!!

I am a not very experienced Java programmer... and I need to work with a project where I have ot deal with Java, and with code that is already developed.

So I am thinking about to use the IDE (eclipse) to work in this project. The problem is that I have not a clear idea about how to use it...

The code that I have is placed in this workspace:

workspace/src/(several directories) - source files .java
workspace/data/(several directories) - contains some data structures to be used by the program
workspace/bin/(several directories) - contains the compiled programs

I can run the compiled programs... my problem is that I don't know how to compile my changes in the source code, and place it directly on the bin directory... (using eclipse, or maybe some other tricky thing...)

So if someone could give some directions to start with this, I will appreciate a lot!!

If you need more specification, please tell me...

Thank you in advance!

/edu

Hko 02-25-2005 07:37 AM

In the "Project" menu, there is an item called "Build automatically". If it is checked, compilation is done automatically each time you save your file(s). If it is not checked, the item "Build project" becomes available which will do compilation when clicked.

eduardomsilva 02-25-2005 09:11 AM

I did that... and I think it is not working...

I just changed a sentence in the first print of the program... and I did the compilation (Build all)... and when I run it the change doesn't appear...

What I mean is, I don't know if the file from the "src" directory is compiled, and generated a new .class file in the "bin" directory...

I heard something about a "classpath" thing, but I am not aware of it...

Any ideas?!

Thank you

/edu

Hko 02-25-2005 09:42 AM

I am by no means an experienced eclips user. But I guess to work with exisiting code, you need to import the source into the eclipse workspace or something like that.

csfalcon 02-25-2005 10:17 AM

A simple way to do this is for you to create a new project and then copy the files from your src directory into the new project's src. Then in eclipse, select the new project on the left hand panel and hit "F5".

Does your program need any external jar files? If you do then you need to set the classpath for the project:
right click the project -> select "properties" -> click "Java Build Path" -> click "Add External Java"


All times are GMT -5. The time now is 10:13 PM.