Hi Ranchers !!
My Project has following structure
Test-->com.company.Example.Test1
-->Rules/File1.txt
In class Test1 i am reading File1.txt by following code
When i run this class (Using eclipse)it works fine and show the content of File1.txt.
But the problem is coming when i create a jar file(which include class with main() method also).When i try to run this by
java -jar Test.jar it is showing file not found exception for Rules/File1.txt file.
I guess i need to set a class-path somewhere so that when i execute jar file it can locate File1.txt.
I have noticed that when i unzip the jar file its content structure is not same as actual project
Test. Actual project contains the File1.txt under Rules folder which is directly under project Test .But the unzipped jar contains File1.txt directly under Test and also Rules folder is not created.
Please suggest possible solution for above problem.
Thanks in advance.
-Prabhat