Java Applet on Macintosh

Discussion in 'Java' started by Johnny, Jul 6, 2007.

  1. Johnny

    Johnny Guest

    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?

    --
    John.

    http://mscrmguy.blogspot.com/
     
    Johnny, Jul 6, 2007
    #1
    1. Advertising

  2. In article <MSuji.11665$>,
    "Johnny" <> wrote:

    > 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 =
    --
    Steve W. Jackson
    Montgomery, Alabama
     
    Steve W. Jackson, Jul 6, 2007
    #2
    1. Advertising

  3. Johnny

    Johnny Guest

    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" <> wrote in message
    news:...
    > In article <MSuji.11665$>,
    > "Johnny" <> wrote:
    >
    >> 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 =
    > --
    > Steve W. Jackson
    > Montgomery, Alabama
     
    Johnny, Jul 6, 2007
    #3
  4. In article <3awji.11671$>,
    "Johnny" <> wrote:

    > 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.
    --
    Steve W. Jackson
    Montgomery, Alabama
     
    Steve W. Jackson, Jul 6, 2007
    #4
  5. Johnny

    Johnny Guest

    Hi Steve:

    Ok, thanks. I compiled using v1.3.1 and it worked on OS X.

    John.

    --
    John.

    http://mscrmguy.blogspot.com/

    "Steve W. Jackson" <> wrote in message
    news:...
    > In article <3awji.11671$>,
    > "Johnny" <> wrote:
    >
    >> 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.
    > --
    > Steve W. Jackson
    > Montgomery, Alabama
     
    Johnny, Jul 6, 2007
    #5
  6. Johnny

    Roedy Green Guest

    On Fri, 6 Jul 2007 13:21:44 -0400, "Johnny" <>
    wrote, quoted or indirectly quoted someone who said :

    >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
    --
    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Jul 7, 2007
    #6
  7. Johnny

    Roedy Green Guest

    On Fri, 06 Jul 2007 14:02:55 -0500, "Steve W. Jackson"
    <> wrote, quoted or indirectly quoted someone
    who said :

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


    you need to use the -target option in compile to make it work on
    earlier JVMS.

    See http://mindprod.com/jgloss/javacexe.html
    --
    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Jul 7, 2007
    #7
  8. Roedy Green wrote:
    >On Fri, 06 Jul 2007 14:02:55 -0500, "Steve W. Jackson"
    ><> wrote, quoted or indirectly quoted someone
    >who said :
    >
    >>In any event, since the Applet was done in 1.6, it won't work in any
    >>lower release on *any* platform.

    >
    >you need to use the -target option in compile to make it work on
    >earlier JVMS.


    As well as the '-bootclasspath' option to *guarantee*
    that no members of post n.n version are used. -target
    is simply a directive to denote the class file format that
    is recorded, as I understand it.

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

    Message posted via JavaKB.com
    http://www.javakb.com/Uwe/Forums.aspx/java-general/200707/1
     
    Andrew Thompson, Jul 7, 2007
    #8
  9. Johnny

    Roedy Green Guest

    On Sat, 07 Jul 2007 05:03:26 GMT, "Andrew Thompson" <u32984@uwe>
    wrote, quoted or indirectly quoted someone who said :

    >As well as the '-bootclasspath' option to *guarantee*
    >that no members of post n.n version are used. -target
    >is simply a directive to denote the class file format that
    >is recorded, as I understand it.


    for more details see http://mindprod.com/projects/jdkversion.html
    and http://mindprod.com/jgloss/javacexe.html
    --
    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Jul 7, 2007
    #9
  10. Roedy Green wrote:
    >>As well as the '-bootclasspath' option to *guarantee*
    >>that no members of post n.n version are used. -target
    >>is simply a directive to denote the class file format that
    >>is recorded, as I understand it.

    ...
    >and http://mindprod.com/jgloss/javacexe.html


    Oh yeah, sorry. I suppose the idea of putting the
    full information at the link (the same link you posted
    before my comment) was not to have to go into the
    minutae of a complex subject. Note to self -
    "Read the link content".

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

    Message posted via http://www.javakb.com
     
    Andrew Thompson, Jul 7, 2007
    #10
  11. Andrew Thompson wrote:
    >>>As well as the '-bootclasspath' option to *guarantee*
    >>>that no members of post n.n version are used. -target
    >>>is simply a directive to denote the class file format that
    >>>is recorded, as I understand it.

    >...
    >>and http://mindprod.com/jgloss/javacexe.html

    ..
    >...Note to self - "Read the link content".


    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.

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

    Message posted via JavaKB.com
    http://www.javakb.com/Uwe/Forums.aspx/java-general/200707/1
     
    Andrew Thompson, Jul 7, 2007
    #11
  12. In article <74ce37ed46841@uwe>, "Andrew Thompson" <u32984@uwe> wrote:

    > Andrew Thompson wrote:
    > >>>As well as the '-bootclasspath' option to *guarantee*
    > >>>that no members of post n.n version are used. -target
    > >>>is simply a directive to denote the class file format that
    > >>>is recorded, as I understand it.

    > >...
    > >>and http://mindprod.com/jgloss/javacexe.html

    > .
    > >...Note to self - "Read the link content".

    >
    > 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...
    --
    Steve W. Jackson
    Montgomery, Alabama
     
    Steve W. Jackson, Jul 9, 2007
    #12
  13. Steve W. Jackson wrote:
    >> >>>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.

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

    Message posted via JavaKB.com
    http://www.javakb.com/Uwe/Forums.aspx/java-general/200707/1
     
    Andrew Thompson, Jul 9, 2007
    #13
  14. In article <74ea8c924bdad@uwe>, "Andrew Thompson" <u32984@uwe> wrote:

    > Steve W. Jackson wrote:
    > >> >>>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.
    --
    Steve W. Jackson
    Montgomery, Alabama
     
    Steve W. Jackson, Jul 9, 2007
    #14
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Blah Blah

    java, drag-n-drop, and macintosh

    Blah Blah, Aug 20, 2003, in forum: Java
    Replies:
    0
    Views:
    466
    Blah Blah
    Aug 20, 2003
  2. Krista
    Replies:
    3
    Views:
    2,358
    Andrew Thompson
    Sep 15, 2004
  3. Vinu
    Replies:
    2
    Views:
    513
    Steve W. Jackson
    Dec 15, 2004
  4. Mickey Segal

    Macintosh Widgets from Java Applets

    Mickey Segal, Aug 1, 2005, in forum: Java
    Replies:
    0
    Views:
    375
    Mickey Segal
    Aug 1, 2005
  5. Mr. X.

    Does Java work on Macintosh ?

    Mr. X., Mar 2, 2008, in forum: Java
    Replies:
    3
    Views:
    804
    Roedy Green
    Mar 2, 2008
Loading...

Share This Page