- This topic has 4 replies, 2 voices, and was last updated 20 years, 5 months ago by ajpeustace.
-
AuthorPosts
-
ajpeustaceMemberHi,
I’ve been trying out MyEclipse, but have an issue now related to the classpath. I’ve searched the forums and FAQs and haven’t seen anything.
Ever since selecting ‘Add WebProject Capabilities’ my application can’t see a properties file on my system – the class loader is prepending a lib directory entry to the filename :
Props file: file:/D:/home/dev/newmemphis/web/WEB-INF/lib/axis.jar!/log4j.properties
java.io.FileNotFoundException: file:\D:\home\dev\newmemphis\web\WEB-INF\lib\axis.jar!\log4j.properties (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at java.io.FileInputStream.<init>(FileInputStream.java:66)The properties file actually resides in my classes directory, and is usually picked up normally by the class loader. This problem has just occurred- I haven’t made any other changes.
I’m running Eclipse 3.0 M8, MyEclipse 3.7.2 on winXP. I’ve checked the .log file under the workspace dir, and nothing is being output on this.
The loader is trying to access a properties file for Log4j, I don’t know if this is relevant. In the past on Eclipse I’ve had to specify the order of my log4j jars to get the loader to pick it up.
Thanks in advance.
Alan
Riyad KallaMemberAlan,
Properties files should never be in your output (classes) directory. Output directories are scrubbed by Eclipse (completely erased) when the project is rebuilt. The properties file should be in your /src folder or on your classpath someplace. If it is in your source folder, then it will be copied to your output folder accordingly.You can open up the Navigtor View (Window > Show View > Navigator) and then browse into your output directory (classes) and see if the properties is infact not there any longer. The reason this probably happened after you “Add Web Capabilities” is that part of that process is to make your output directory “WebRoot/WEB-INF/classes”, which would mean that Eclipse probably scrubbed (Erased) the directory before rebuilding the project.
ajpeustaceMemberThanks for the response.
@support-rkalla wrote:
Alan,
Properties files should never be in your output (classes) directory. Output directories are scrubbed by Eclipse (completely erased) when the project is rebuilt.I’m aware of this behaviour in Eclipse- I’ve deselected the build option that causes this to happen.
I just checked there, sorry, my mistake- I didn’t realise that MyEclipse changed the output path, which I already had set to my classes dir. My dev dir mirrors my container dir, and I had set the path for MyEclipse to my dev dir.
Should have taken a break 🙂
Riyad KallaMemberI’m aware of this behaviour in Eclipse- I’ve deselected the build option that causes this to happen.
Ok, sometimes our users aren’t aware of that and get mad that “MyEclipse is destroying their project”, although we removed the automatic project-detroying code in the 2.6 release 😀
Are you up and running now?
ajpeustaceMemberOk, sometimes our users aren’t aware of that and get mad that “MyEclipse is destroying their project”, although we removed the automatic project-detroying code in the 2.6 release 😀
Glad you removed that- I had other stuff in there that I would have been miffed to lose 😯
Are you up and running now?
Yes, thanks. 😀
-
AuthorPosts