I have been working on a project in Eclipse that requires me to open a file. It’s working as expected. I imported my project into Netbeans just to check it out but when run, the file can’t be opened. I think a screenshot would be most helpful in this case:

Any idea what the issue is? I’ve even explicitly specified the run directory in the project properties and that still doesn’t work.
Additional Info:
- I just remembered that I’m using the JDK 1.6 in Eclipse but Netbeans is using the JDK 1.7 — is file path resolution handled differently between the two platforms?
Also, as suggested by a few users, I added in my catch block:
System.err.println(new File(inFileName).getAbsolutePath();
Which, as it should, returns:
C:\Users\David\Dev\projects\Autocuration\pearltrees_export_02-07-2012.rdf
After attempting to construct the URI manually,
I got the following exception:
Exception in thread "main" java.lang.IllegalArgumentException: Illegal character in path at index 32: pearltrees_export_02-07-2012.rdfConsidering there is no 32nd character, I assume the printStackTrace method must trim the string obtained from the exception message before printing.
Whatever the case, it appears that Netbeans parses Run arguments using the ‘ ‘ (space) character as a separator. However, it also includes that space when it passes the arguments to the main method. In other words, I was trying to open:
"pearltrees_export_02-07-2012.rdf "rather than:
"pearltrees_export_02-07-2012.rdf"Simply trimming argument fixes the problem:
Anyway, I cannot find any documentation stating this is the intended behavior as it is certainly different from how the
javabinary behaves (and any other editors I know of). For this reason I consider this a bug, and I submitted a bug report:http://netbeans.org/bugzilla/show_bug.cgi?id=215429
I guess we’ll see what the Netbeans fellows have to say..