Hi,
I am having an issue with maven and getting a file from within my
executable jar project.
I have the following code in my main
URL url = this.getClass().getResource("/comma.txt");
File commaFile = new File(url.getFile());
The issue is that the url that is found when executing the jar has an
exclamation mark in it. ie
/home/jeffxor/workspace/cyrus/target/cyrus-0.0.1-SNAPSHOT.jar!/comma.txt
you will notice it after the jar file name. Obviously when I then try
to get a file I get FileNotFoundException.
I have used this code on other machine and have had no issue. I am
using Ubuntu and maven 2.0.8 and java 1.6., I have searched the
internet but have got no results and I am out of ideas.
Any help would be great.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]