I have a website build with JSP and Java programs. I would like to have a properties file that contains some system information for my Java programs to access. I was hoping I could just put it in the root directory of the site and then the programs would find it. But I'm not sure how to reference the file. I'm doing the following but it is giving me a FileNotFoundException. Also I'd be able to do the same thing on our AS400 server. So where could I put it so the Java programs could access it when they are running on my laptop or on the AS400? And how would I reference it from my programs so I don't have to change the program each time I move it from my laptop to the AS400?
Code:
Properties prop = new Properties();
prop.load(new FileInputStream("system.properties"));