Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can an applet call another class file?

 
George Hutto
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, I'm new to a lot of this, so any help is appreciated.

I've written an applet that works just grand in the appletviewer.

In my apache 6.0.35 ROOT directory I've got the HTML file, the applet class and some supporting classes.

Here is my applet declaration:

<BODY>
<APPLET CODE="SterlingCC"
ARCHIVE="oc4j.jar,servlet.jar,servlet-api.jar,SterlingCC.jar"
CODEBASE="http://localhost:8080/"
HEIGHT="700" WIDTH="900" ALIGN="bottom">
This browser does not support Applets.
</APPLET>
</BODY>

Yes, I also have a jar file with the applet and supporting classes. Right now they are all right in the root directory.

The HTML screen comes up fine and shows the applet interface but when I click my submit button nothing seems to happen. I was wondering if there is some issue with an applet using other classes.

Also, is there a way to troubleshoot this? I don't get any errors showing up in Firefox so I was wondering if some log file might be generated that I can view.

Thanks,

George
 
Paul Clapham
Sheriff
Pie
Posts: 20182
25
MySQL Database
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, of course an applet can "call" other classes. (Note: Java programmers say that a class "uses" another class by "calling" methods from that class.)

If the applet code is throwing an exception (the most likely possibility) then you'll find the stack trace in the Java console. As for your APPLET element: it mostly looks okay to me, except of course I can't tell whether your relative URLs are correct; but I seriously doubt your applet is going to need anything from servlet.jar or servlet-api.jar. If it does, you must have misunderstood something.
 
George Hutto
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Yes, of course an applet can "call" other classes. (Note: Java programmers say that a class "uses" another class by "calling" methods from that class.)

If the applet code is throwing an exception (the most likely possibility) then you'll find the stack trace in the Java console. As for your APPLET element: it mostly looks okay to me, except of course I can't tell whether your relative URLs are correct; but I seriously doubt your applet is going to need anything from servlet.jar or servlet-api.jar. If it does, you must have misunderstood something.


Okay, still showing my newbishness. "Java Console" -- how does one access that? When I get an error in JDeveloper I can see it easily enough and I've been poking around in Firefox but seem to be missing something.

Ah Ha! I found Java Console ... now to figure out how to have it monitor my applet.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic