path differences in netbeans, cmd, and .bat or .cmd

Emmetsun

New Member
I am facing a strange issue. My code runs just fine from Netbeans or cmd with \[code\]java -jar MP2.jar\[/code\]but when I try to run it from the .bat or .cmd\[code\]"%JAVA_HOME%"\bin\java -jar .. \dist\MP2.jar > test_mp2_out.txt\[/code\]I get an error in my text file\[code\]DataIn\nrmavg.txt (The System cannot find the path specified)\[/code\]or a null pointer exception at the line I have new FileReader(nrmavg.txt)I can provide more code if needed, but I think this may be a windows problem.Any ideas?
 
Top