user2651804
user2651804

Reputation: 1614

How to change Eclipse default classpath

I'm new to Eclipse, and I'm surprised I can't find the answer anywhere: I want the files created by my application to go to the .bin folder. (and be read from). The program reads resources from the default package in the project, and also saves to it. If my understanding is correct, I want to change the classpath to .bin? How can I do this.

EDIT: When, for instance, I make a FileWriter and write a file to the harddisk, I want this file inside the .bin folder, not on the same level.

Upvotes: 0

Views: 3475

Answers (3)

user2651804
user2651804

Reputation: 1614

I simply gave up. I don't think it's possible to change the runtime classpath with Eclipse, so I just changed my application to getResource("bin/myFile.txt"). and prefaced the loading of all .png files with /bin also.

Upvotes: 0

Debojit Saikia
Debojit Saikia

Reputation: 10632

While creating your project, select Create separate folders for sources and class files in project layout section:

enter image description here

And in the next widget window, select the output folder:

enter image description here

Upvotes: 2

pappu_kutty
pappu_kutty

Reputation: 2488

by default, if your project is java project, then your classes will be there in the bin folder. to view the bin folder, go to navigator perspective.windows>show view>navigator

Upvotes: 0

Related Questions