mickygreen
New member
Hi Question in java rearding files
Hi folks, I guess that maybe you can help me with something. Currently my program is reading a property file and I am using: ... File configFile=new File(CONFIG_FILE); ... CONFIG_FILE= ".\file.properties" The problem is that the file must be in the same place I run my main. The program I wrote is working for different clients and I don't want them to put the file exactly where the jar/main class are. I would like that the file name and plac will be defined in the classpath and the jvm will know to seek for it there. Does anyone know if it possible or can be done? Any more suggestion will be happily taken care of. Thanks, Micky.
Hi folks, I guess that maybe you can help me with something. Currently my program is reading a property file and I am using: ... File configFile=new File(CONFIG_FILE); ... CONFIG_FILE= ".\file.properties" The problem is that the file must be in the same place I run my main. The program I wrote is working for different clients and I don't want them to put the file exactly where the jar/main class are. I would like that the file name and plac will be defined in the classpath and the jvm will know to seek for it there. Does anyone know if it possible or can be done? Any more suggestion will be happily taken care of. Thanks, Micky.