Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems with JAR files in Netscape 4.05

0 views
Skip to first unread message

Trojanek Tomas

unread,
Aug 20, 1998, 3:00:00 AM8/20/98
to
I have following problem. I made a simple application with JBuilder 2.
I put all my class files in JAR archive (JBuilder made automaticly a
manifest file). I put a html file and jar archive with all needed
classes in the same directory.
HTML file:
...
<APPLET
ARCHIV = "test_2.jar"
CODE = "exapmle2.Applet2.class"
NAME = "TestApplet"
WIDTH = 400
HEIGHT = 300
HSPACE = 0
VSPACE = 0
ALIGN = middle
>
...
the word exapmle2 is my mistake when I gave a name to it in JBuilder.


When Netscape load html file, this appears:
# Applet exception: class exapmle2.Applet2 not found
java.lang.ClassNotFoundException: exapmle2.Applet2
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.ClassNotFoundException.<init>(Compiled Code)
at netscape.applet.AppletClassLoader.findClass(Compiled Code)
at netscape.applet.AppletClassLoader.loadClass1(Compiled Code)
* at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
at netscape.applet.DerivedAppletFrame.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)


I also tried Sun Java Plug-in (v. 1.1.1) and get other error:
File not found when looking for: exapmle2.Applet2

java.lang.NullPointerException
at sun.applet.AppletPanel.createApplet(AppletPanel.java:462)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:398)
at sun.applet.AppletPanel.run(Compiled Code)
at java.lang.Thread.run(Thread.java:474)

When I unpacked all files and erase archive tag in html file, everithing
was o.k. (only with Sun Java Plug-In).

I appreciate any suggestion in this group or on my e-mail:
tomas.t...@usa.net

Tomas


David Risner

unread,
Aug 20, 1998, 3:00:00 AM8/20/98
to
In article <35DBCFE8...@usa.net>,

Trojanek Tomas <tomas.t...@usa.net> wrote:
>I have following problem. I made a simple application with JBuilder 2.
>I put all my class files in JAR archive (JBuilder made automaticly a
>manifest file). I put a html file and jar archive with all needed
>classes in the same directory.
>HTML file:
>...
><APPLET
> ARCHIV = "test_2.jar"
> CODE = "exapmle2.Applet2.class"
> NAME = "TestApplet"
> WIDTH = 400
> HEIGHT = 300
> HSPACE = 0
> VSPACE = 0
> ALIGN = middle

Is Applet2 part of a package called exapmle2? That is how your naming will
be interpreted by the class loader.

If it is not part of a package called exapmle2, then you should take the
period out of the name.

--
David Risner -- Programmer (Java, CGI, NeXT)
Electronic Desktop Project, Cal State Los Angeles
http://www.geocities.com/~drisner/

Pierre A. von Kaenel

unread,
Aug 20, 1998, 3:00:00 AM8/20/98
to
This is one of the things about JBuilder that gave me ulcers! The
applet wizard places all of your class files in a package and sets up a
directory structure to correspond to this organization. I got the same
errors you have reported because I somehow was not placing things in the
proper places on the java server (when I deployed) or the html file was
not reaching the right locations. I did find that by starting the
project from scratch I could choose different settings (I think in the
properties) - the ones having to do with "use only JDK and swing" and
the other three. Using the right combination, the wizard would create a
project without placing my files in a package. Unfortunately, this
produced a project with certain settings which I was stuck with.

At any rate I've just about given up on JBuilder since I never "got
it." The problem for me was their documantation! The help files never
really explain what these settings mean. I did finally get a project to
deploy correctly, but that was by doing what I described above. If your
.java files begin with a "packages" statement at the top, try a new
project with different settings. Yes, I realize I probably didn't do
things right, didn't read the right help file, or my brain just isn't
wired correctly - but I nonetheless had incredible problems with
JBuilder that I didn't have with Visual Cafe or writing directly to the
JDK using Kawa.

Good luck - hope someone else is able to shed light on these problems!
--
Pierre A. von Kaenel
Math & Computer Science Dept.
Skidmore College
Saratoga Springs, NY 12866

Rick Rutt

unread,
Aug 21, 1998, 3:00:00 AM8/21/98
to
"Pierre A. von Kaenel" <pv...@skidmore.edu> writes:

>This is one of the things about JBuilder that gave me ulcers! The
>applet wizard places all of your class files in a package and sets up a
>directory structure to correspond to this organization. I got the same
>errors you have reported because I somehow was not placing things in the
>proper places on the java server (when I deployed) or the html file was
>not reaching the right locations. I did find that by starting the


>At any rate I've just about given up on JBuilder since I never "got
>it." The problem for me was their documantation! The help files never
>really explain what these settings mean. I did finally get a project to
>deploy correctly, but that was by doing what I described above. If your

One possible problem is case-sensitivity in file and directory names.

On Windows 95, the operating system is case-ignorant,
so JBuilder will still run despite casemismatches between package names
in Java source code and Win95 folder names.

However, once a .JAR file is made, the Win95 stored case is used.
The classloader that reads .JAR files is case-sensitive.

If this is your problem (it was mine for a while),
you must work to get Win95's stored dirctory and file names to EXACTLY
match the case of the Java source code package and class names.
Then build the .JAR file.

-- Rick
--

(Rick Rutt is a system architect living and working in metropolitan Detroit.)

0 new messages