2012-12-18, 11:05 PM
Piggy 2.0 Wrote:A friend mentioned Eclipse to me as well last year. He gave me the files for it, but I lost them due to last-minute-shenanigans. I only work in TextPad because thats what I use up at my class, and I dunno if Eclipse stores or converts the files differently since I have to send them to my teacher when I'm done with all the projects. I'll definitely start using it at home, however.
Other than that, holy hot damn is that helpful.
Glad I could help.
Eclipse doesn't really store them differently, other than giving some structure to your project. For example, all your java files end up in a src folder, and all your class files(compiled code, not what you want to give to your teacher) end up in a bin folder.
If you want a file to be run directly in the project without a path, you would put it in the main folder.
So for example, let's say your project folders are in "C:/Java/Workplace/ProjectNameHere/".
Your Source (.java) files would be in "C:/Java/Workplace/ProjectNameHere/src"
Your Compiled (.class) files would be in "C:/Java/Workplace/ProjectNameHere/bin"
Typically, libraries you add would be in a lib folder so: "C:/Java/Workplace/ProjectNameHere/lib"
And any files you want to execute directly would be in the base folder, "C:/Java/Workplace/ProjectNameHere/whatever.extension".
I imagine that's where you would put your database information and what not. Then you can just access it by "whatever.extension" in your code.
In the future, if you wish to add a library to Eclipse, it's EXTREMELY easy.
All you do, is add said library to your project, and as specified earlier, preferably in a lib folder. Then, when you refresh the tree path in the project explorer on the left of Eclipse, you will see that folder. Open it, select the library, right click it, and hit Build Path -> Add to Build Path. It does all the work for you in configuring it correctly. Then you can just import it like a regular library, and you're good to go.
You can always look up file access stuff on the web if you want further details on how Eclipse manages files, but if you just put everything in the root directory of your project, you should be perfectly fine when your teacher tries to access it if s/he uses TextPad.
As for your new question: Good luck...I haven't exactly been lucky with schools myself so I have no recommendations. Sorry.

