Hi Mark,
I think what you need to do is set your working directory to the
directory containing the root directory holding the path to the images.
Meaning if you have the following structure:
[root]
|->[images]
|-> img01.jpg
,
and you do a getClass().getResource("images/img01.jpg"); then you need
to set the working directory to [root] . You can set the working
directory by going to the project properties -> running project.
I hope this helps.
thanks,
Rogue
Mark@Murphy.net - 03 Jan 2005 21:04 GMT
> Hi Mark,
> I think what you need to do is set your working directory to the
[quoted text clipped - 3 lines]
> thanks,
> Rogue
Rogue-
Thanks for responding but that did not turn out to be the problem.
I did notice a diffence between the code I but I'm not sure if it will
address the issue. I'll have to play around with it. In my code for
Nd3.6 I had the main class is outside of the any packages. {.Main} It
seems NB4 puts the main class in {<project>.Main}.
But my bigger problem is outside of the IDE. Within the IDE I can place
the resource files in locations that the IDE will see for development.
But the Jar file that is created by the IDE is not looking in the "."
directory.
(example folder structure for final project)
folder
-><project>.jar
->Image.jpg
Do you know how I can change to classpath for the created Jar file to
include "."
Thanks again
Mark