My program read configuration data by reading xml file fro current directory:
File fXmlFile = new File("configFile.xml");
It works fine in NetBeans IDE. I have build project and got jar file. It runs fine if I double click on it in Windows 10. In case I open file by using right click on jar and Open with -> Java
program can't find configuration file. In this case I got exception:
java.io.FileNotFoundException: C:\Windows\System32\configFile.xml (The system cannot find the file specified)
Why it looks just to system path and not in current directory? How to ask program to load file in current directory when running in Open with -> Java
case?
Jar's manifest file:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.10.4
Created-By: 12.0.1+12 (Oracle Corporation)
Class-Path: lib/log4j-api-2.11.2.jar lib/log4j-core-2.11.2.jar lib/met
ouia.jar lib/swt.jar
X-COMMENT: Main-Class will be added automatically by build
Main-Class: com.aaa.myprog.runMe