Hi
I''m programming something with java and I''m using abolute paths to include other files. My question is, are there any settings in eclipse to use only relative paths or do I have to realize this with some lines of code?
I hope someone can help me, I''m desperated :(
解决方案
Now I know I was really dumb :S
The needed file has to be in the same folder as the project p.e.:
current directory: C:\xy\xz\xx\.
absolute path of file: C:\xy\xz\xx\file.txt
relative path of file: .\file.txt
or
absolute path of file: C:\xy\xz\file.txt
relative path of file: .\..\file.txt
and so on.
Greetings
Painjofshem
Other files like pictures, icons, print templates?
- add a folder "resource" to your project aside of the folder "src"
- underneath build up a decent structure ("print", "properties", "icons")
in the code refer to these folders with a relative path: "/resource/icons/..."
You might have to unpack the resource-folders when you build your application.