8 Replies - 1140 Views - Last Post: 09 April 2011 - 12:55 PM Rate Topic: -----

#1 loloalssum  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 18
  • Joined: 16-June 09

My java applet program does not appear in appletviwere?

Posted 09 April 2011 - 01:00 AM

Hi,

I write a java applet program in netbeans IDE. But when i test it in appletviwere it does not appear and give me this error:


load: class OtheApplet.class not found.
java.lang.ClassNotFoundException: OtheApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: OtheApplet.class



My html file contains:

 <html>
  <head>
    <title>Othello Evaluation Environment</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
      <applet code="OtheApplet.class" width="600" height="500">

      </applet>

  </body>

</html>


What is the problem??

Thank you.... .

Is This A Good Question/Topic? 0
  • +

Replies To: My java applet program does not appear in appletviwere?

#2 GregBrannon  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2204
  • View blog
  • Posts: 5,236
  • Joined: 10-September 10

Re: My java applet program does not appear in appletviwere?

Posted 09 April 2011 - 01:36 AM

It can't find the specified *.class file. Try moving the class file around (or copying it to all likely locations) until it works.
Was This Post Helpful? 0
  • +
  • -

#3 loloalssum  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 18
  • Joined: 16-June 09

Re: My java applet program does not appear in appletviwere?

Posted 09 April 2011 - 02:00 AM

I try it before.. but it does not work :(
Was This Post Helpful? 0
  • +
  • -

#4 loloalssum  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 18
  • Joined: 16-June 09

Re: My java applet program does not appear in appletviwere?

Posted 09 April 2011 - 02:22 AM

when i try to compile the program from command prompt it give me this error:
OtheApplet.java :24: cannot find symbol
symbol: class OthelloBoard
location: class OthelloGame.OtheApplet
OB=new OthelloBoard();

OtheApplet.java :39: cannot find symbol
symbol: class OthelloBoard
location: class OthelloGame.OtheApplet
OB=new OthelloBoard();

2 errors

but the program work with out error in netbeans!!!

plese canany one help me :(
Was This Post Helpful? 0
  • +
  • -

#5 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8342
  • View blog
  • Posts: 31,885
  • Joined: 06-March 08

Re: My java applet program does not appear in appletviwere?

Posted 09 April 2011 - 08:55 AM

If you have more than one class you will have to put them in a .jar
Or make your OthelloBoard an inner class of OtheApplet

In Netbeans, Netbeans "knows" about the two different classes
Was This Post Helpful? 0
  • +
  • -

#6 loloalssum  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 18
  • Joined: 16-June 09

Re: My java applet program does not appear in appletviwere?

Posted 09 April 2011 - 09:15 AM

I have many classes

how to put them in .jar ??
Was This Post Helpful? 0
  • +
  • -

#7 loloalssum  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 18
  • Joined: 16-June 09

Re: My java applet program does not appear in appletviwere?

Posted 09 April 2011 - 09:36 AM

thank you very much
i found the solution..

the .html file must be located out side the pakage.. :)
Was This Post Helpful? 0
  • +
  • -

#8 GregBrannon  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2204
  • View blog
  • Posts: 5,236
  • Joined: 10-September 10

Re: My java applet program does not appear in appletviwere?

Posted 09 April 2011 - 12:54 PM

Thanks for posting your solution.
Was This Post Helpful? 0
  • +
  • -

#9 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8342
  • View blog
  • Posts: 31,885
  • Joined: 06-March 08

Re: My java applet program does not appear in appletviwere?

Posted 09 April 2011 - 12:55 PM

View Postloloalssum, on 09 April 2011 - 11:36 AM, said:

the .html file must be located out side the pakage.. :)

What do you mean ?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1