I was using Unix before to compile and edit my Java. In that I have used property files right inside my current working directory where the class file exists. Now i have switched to Eclipse IDE. I dont know how to add the same properties file here in Eclipse. Please help me.
A:
If you have created a Java Project in eclipse by using the 'from existing source' option then it should work as it did before. To be more precise File > New Java Project. In the Contents section select 'Create project from existing source' and then select your existing project folder. The wizard will take care of the rest.
Sagar V
2010-09-23 08:54:25
Thanks for the response Sagar...
Vijay Athreyan
2010-09-23 09:14:03
you are welcome. Hopefully it has been of help to you :)
Sagar V
2010-09-23 09:28:26
A:
In the package explorer, right-click on the package and select New -> File, then enter the filename including the ".properties" suffix.
Michael Borgwardt
2010-09-23 08:58:14
+1
A:
It should work ok as it is in Unix, if you have properties file in current working directory. Another option would be adding your properties file to the classpath and getting the inputstream using this.getClass().getClassLoader().getResourceAsStream("xxxxx.properties");
More here
johnbk
2010-09-23 09:05:51