G
Gerrit Hulleman
This has been a much discussed topic in several newsgroups, but I still
cannot figure it out.
I got this class: htmledit.class. Normal website linking to this class as an
applet. Several image files (gif&bmp) for toolbar images.
/
| -htmledit.class
|
|-image1.gif
\-image2.gif
Applet loads, no problem. images are used in the toolbar. Applet tag calls
"htmledit.class"
Trying to get the class in a package (due to OO reasons and java 1.4 jdk) I
get:
/
|-/main
| \-htmledit.class
|
|-image1.gif
\-image2.gif
Changed the header of the htmledit.class to main package, changed the html
code to call the class "main.htmledit.class". Applet loads, get null values
from getResource() call. No images are loaded.
This applet is not (yet) part of a jar file. Tried copying the image files
to the main directory, add codebase, place them in a jar with archieve
attribute in the applet tag, calling image file with a "/" in front of it.
Why is the main applet class no longer able to access the image files when
placed in a package?
G
cannot figure it out.
I got this class: htmledit.class. Normal website linking to this class as an
applet. Several image files (gif&bmp) for toolbar images.
/
| -htmledit.class
|
|-image1.gif
\-image2.gif
Applet loads, no problem. images are used in the toolbar. Applet tag calls
"htmledit.class"
Trying to get the class in a package (due to OO reasons and java 1.4 jdk) I
get:
/
|-/main
| \-htmledit.class
|
|-image1.gif
\-image2.gif
Changed the header of the htmledit.class to main package, changed the html
code to call the class "main.htmledit.class". Applet loads, get null values
from getResource() call. No images are loaded.
This applet is not (yet) part of a jar file. Tried copying the image files
to the main directory, add codebase, place them in a jar with archieve
attribute in the applet tag, calling image file with a "/" in front of it.
Why is the main applet class no longer able to access the image files when
placed in a package?
G