1
1-crm
Hey,
I have following problem with my Java program:
My project folder looks like:
my_folder
+ binary
+ Class1.class
+ source
+ Class1.java
+ files
+ File1.txt
+ File2.txt
....
I'd like to get access from Class1 to the files File1.txt and File2.txt
I need access to the files from a JAR package of this project as well
as from a 'normal' classpath program.
File f = new File ("files/File1.txt"); doesn't work within a jar
package.
and the call ClassLoader.getResource("files/File1.txt") always returns
null.
Has anbody an idea how to get access to the files? Why does the
getResource() call return null? Because of my file structure?
Thanks in advance,
1-crm
I have following problem with my Java program:
My project folder looks like:
my_folder
+ binary
+ Class1.class
+ source
+ Class1.java
+ files
+ File1.txt
+ File2.txt
....
I'd like to get access from Class1 to the files File1.txt and File2.txt
I need access to the files from a JAR package of this project as well
as from a 'normal' classpath program.
File f = new File ("files/File1.txt"); doesn't work within a jar
package.
and the call ClassLoader.getResource("files/File1.txt") always returns
null.
Has anbody an idea how to get access to the files? Why does the
getResource() call return null? Because of my file structure?
Thanks in advance,
1-crm