Baris,
From which directory are you running your program(s) from?
I think the problem is with the code:
public FileInputStream(
String name) throws FileNotFoundException
String name = is not just the name of the file to be opened, but is the pathname to the file that includes filename as well in the FileSystem.
I don't think loading any file in this way would succeed, even if the file is present in the classpath.(though ResourceBundle might work but it is used for a different purpose!).....You may have to write code to get the correct location of suncertify.properties file and then use it to create your FileInputStream() to open it with Properties class.
My instructions contain the foll. sentence.
All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory.
I have not completed my coding yet, but my design goes something like this......I am not going to jar my suncertify.properties with the runme.jar file.I am assuming suncertify.properties file to be present in the current directory where the client/server is launched.If it does not find it, then the program launches the JFileDialog to prompt the CSR for settings, which I capture and store it in the suncertify.properties and start my client/server program(s) accordingly.
I want the CSR to understand that the JFileDialog box pops up if he tries to run the program from a different directory and the program does not find a suncertify.properties file.I am also documenting this in my design decisions.
The following link might be useful:
https://coderanch.com/t/183683/java-developer-SCJD/certification/NX-Contractor-silly-working-directory This time...ignore Phil's comments in the above link
I have not yet made up my mind to use
System.getProperty("user.dir") to get the current directory.
At this moment, I am assuming that, if no directory or drive is specified as part of the filename, the jvm picks it up the file the current directory in windows. I don't know if the behaviour would be different in other OS.
[ May 13, 2004: Message edited by: Vishwa Kumba ]