loading a configuration file

Hi

I have a configuration file that i need to load in (data.txt). The package my class that wishes to load the file is in com.test.loader.

In my class I am using LoaderUtility.class.getResourceAsStream(data.txt)

The data.txt is not within the same jar file. I need to place this into a self contained jar, this jar will only contain the data.txt file. What package structure is required for this new jar file so it can be loaded in by the LoaderUtility.jar.

singh101Asked:
Who is Participating?
 
GlobaLevelConnect With a Mentor ProgrammerCommented:
Would this then need to be in the same package com.test.loader
>> yes i would try that...
0
 
singh101Author Commented:
Not really. I need to place this data.txt in its own jar file. Would this then need to be in the same package com.test.loader?
0
 
webdev2000Connect With a Mentor Commented:
Yes it would need to be in the same package/directory structure to use that line
Or you could specify the absolute path to put it elsewhere
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.