Java Applet on Macintosh

J

Johnny

Hi all:

I have a very simple Java applet which runs perfectly on Windows in IE, but
when I try to load it in IE on MAC OS 9, I get an error"

An Exception Occurred, ClassNotFoundException for TestApplet

Java Exception: java.lang.NullPointerException.

The Page hosting the Java Applet is being served from Apache, and the code
is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<applet code="TestApplet.class" width=450 height=600>
</applet>
</BODY>
</HTML>

Can anyone offer any advice as to what I can do?
 
S

Steve W. Jackson

"Johnny said:
Hi all:

I have a very simple Java applet which runs perfectly on Windows in IE, but
when I try to load it in IE on MAC OS 9, I get an error" [ snip ]

Can anyone offer any advice as to what I can do?

Mac OS 9 is officially dead, though a great number of users still stick
with it. Its Macintosh Runtime for Java (MRJ) only supported Java
1.1.8, and adding Swing support (early Swing 1.1.1, IIRC) was possible
but not pleasant.

Bottom line: don't worry about an applet working for any Mac not
running some release of Mac OS X (unless you want to use only Java 1.1.8
or earlier). The earliest releases of Mac OS X included Java 1.3. Java
1.5 (aka Java 5) is now in widespread use in Mac OS X 10.4, and Java 6
is in the works as a "developer preview" -- it's unclear whether it will
be made available as a finished product for 10.4, or only with the
release of 10.5 coming in October.

= Steve =
 
J

Johnny

Hi Steve:

Thank you for the reply....My wife has a G5 with Mac OS X 10.3.9, and I
cannot get the applet running on that either. I just get a red "X" on the
page. Since she ahs 10.3.9 I cannot upgrade to the JDK 5, but I used the JDK
v1.6. to build the applet. I guess maybe that's the problem? Do I need to
use an earlier SDK?

--
John.

http://mscrmguy.blogspot.com/

Steve W. Jackson said:
Johnny said:
Hi all:

I have a very simple Java applet which runs perfectly on Windows in IE,
but
when I try to load it in IE on MAC OS 9, I get an error" [ snip ]

Can anyone offer any advice as to what I can do?

Mac OS 9 is officially dead, though a great number of users still stick
with it. Its Macintosh Runtime for Java (MRJ) only supported Java
1.1.8, and adding Swing support (early Swing 1.1.1, IIRC) was possible
but not pleasant.

Bottom line: don't worry about an applet working for any Mac not
running some release of Mac OS X (unless you want to use only Java 1.1.8
or earlier). The earliest releases of Mac OS X included Java 1.3. Java
1.5 (aka Java 5) is now in widespread use in Mac OS X 10.4, and Java 6
is in the works as a "developer preview" -- it's unclear whether it will
be made available as a finished product for 10.4, or only with the
release of 10.5 coming in October.

= Steve =
 
S

Steve W. Jackson

"Johnny said:
Hi Steve:

Thank you for the reply....My wife has a G5 with Mac OS X 10.3.9, and I
cannot get the applet running on that either. I just get a red "X" on the
page. Since she ahs 10.3.9 I cannot upgrade to the JDK 5, but I used the JDK
v1.6. to build the applet. I guess maybe that's the problem? Do I need to
use an earlier SDK?

Java 6 (1.6) is *only* available as a developer preview and probably not
available for 10.3.9 at all. But to get it, you'd need to join the
Apple Developer Community (ADC), which you can do for free with an
online membership.

In any event, since the Applet was done in 1.6, it won't work in any
lower release on *any* platform.
 
R

Roedy Green

An Exception Occurred, ClassNotFoundException for TestApplet

Java Exception: java.lang.NullPointerException.

The Page hosting the Java Applet is being served from Apache, and the code
is:

See if you can turn on a console so you can find out where you are
getting the exceptions.


see
http://mindprod.com/jgloss/runerrormessages.html#CLASSNOTFOUNDEXCEPTION

Put your class in a package and put the class files in a jar. It must
be in the same directory as the HTML page that invokes.
See http://mindprod.com/jgloss/applet.html

Make sure Applets in general are working by running
http://mindprod.com/japplets/wassup.html
 
S

Steve W. Jackson

Now I have - I find the specific reference to
Eclipse, under the -target details, very odd.
That same sentence can apply to Netbeans,
JBuilder, TextPad or an Ant build file - not
just Eclipse.

But otherwise - good info. - as usual.

But none of this is applicable to the OP, who indicated that the system
which would not run the applet was Mac OS 9...
 
A

Andrew Thompson

Steve said:
[quoted text clipped - 12 lines]
But otherwise - good info. - as usual.

But none of this is applicable to the OP, who indicated that the system
which would not run the applet was Mac OS 9...

The way I understand it, it does. Indicated
elsewhere in the thread was that the machine
ran 1.1.8, but the source was being compiled
using 1.3.1.

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200707/1
 
S

Steve W. Jackson

Steve said:
As well as the '-bootclasspath' option to *guarantee*
that no members of post n.n version are used. -target
[quoted text clipped - 12 lines]
But otherwise - good info. - as usual.

But none of this is applicable to the OP, who indicated that the system
which would not run the applet was Mac OS 9...

The way I understand it, it does. Indicated
elsewhere in the thread was that the machine
ran 1.1.8, but the source was being compiled
using 1.3.1.

I was actually referring to the series of messages that both you and
Roedy posted concerning the Java console and numerous other things. The
fact is, that OS is defunct and no reliance whatsoever should be placed
on its even being able to use applets any longer. But, if great care is
taken to use seriously ancient code via the techniques outlined, it
*can* work...but it's not wise.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top