I have a small java project. And i want to keep a structure in how the files are organized in my project folder.
There are 3 folders: bin/
, res/
and src/
.
In src are all source files.
In res are some resources like textfiles to be printed are files that are saved during runtime.
And in bin is where all the binarys should be.
I found out, that i can compile my sourcefiles with the -d argument to the bin folder.
javac -d bin src/*.java
But I can't run java bin/Main
from my project folder it gives me a classnotfound error.
(Going in bin
and then run java Main
works. why??)
Second problem is, that res files are only accessible when res/
is in bin/
. I want it kind of like in Eclipse. In the sourcecode files in res/
are used like the executor is in the project folder.
I hope you understand what i'm trying to do. And thanks for any help!