The Artima Developer Community
Sponsored Link

Java Answers Forum
need help on applet

4 replies on 1 page. Most recent reply: Mar 27, 2002 6:28 AM by Kishori Sharan

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 4 replies on 1 page
William

Posts: 2
Nickname: jyl
Registered: Mar, 2002

need help on applet Posted: Mar 22, 2002 10:30 AM
Reply to this message Reply
Advertisement
i am developing an applet.
i put the Project.class file and html file in the same directory and the html file contain the tag
<APPLET code="Project.class" width='400' height='320'>
</APPLET>
when i open the html file. the applet wasn't loaded, it says "class Project not found".

thx.


Lynn Hollerman

Posts: 67
Nickname: gmholler
Registered: Mar, 2002

Re: need help on applet Posted: Mar 22, 2002 12:04 PM
Reply to this message Reply
What browser are you using? I just had a similar problem; I'm on 2 machines - a Sun workstation running Netscape 4.79, and a Windows PC running Netscape 4.78, so what worked for me may or may not work for you.

On the Sun, I recompiled the applet in question with the "-target 1.1" option - that still gave me an error, but it was different from the error I initially had, and it turned out to be in my code.

However, on the PC, which I had just recently started using to develop Java, what resolved my problem was enabling the Java plug-in.

But, according to a reference book I have (Core Java, copyright 2001), as well as some sources I've seen on the Web, the HTML for applets is supposed to be "converted" for it to run in the newer browsers - the Sun site supplies a tool for doing this conversion.

HTH!

Lynn.

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: need help on applet Posted: Mar 22, 2002 12:25 PM
Reply to this message Reply
I think Microsoft has succeeded on this count.

abhijeet

Posts: 13
Nickname: aaraje
Registered: Mar, 2002

Reneed help on applet Posted: Mar 27, 2002 4:17 AM
Reply to this message Reply
May be spelling of class file is incorrect

Kishori Sharan

Posts: 211
Nickname: kishori
Registered: Feb, 2002

Re: need help on applet Posted: Mar 27, 2002 6:28 AM
Reply to this message Reply
If you are inheriting your applet from JApplet then you need to use OBJECT tag instead of APPLET tag. If you are placing your Project class in a package then you also need to set CODEBASE in OBJECT/APPLET tag. If these two aren't your problem then send your Project.java to me and I will make it work.

Thanks
Kishori

Flat View: This topic has 4 replies on 1 page
Topic: JApplet and Applet... class not found Previous Topic   Next Topic Topic: abstract classes

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use