Problem with Java Applets in Textpad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blackstormdragon
    New Member
    • Feb 2007
    • 32

    Problem with Java Applets in Textpad

    I've been trying to run a Java applet in TextPad. When I click on "Run Java Applet" it prompts me for my html file, but when I hit ok a window pops up and says "The system cannot find the file specified." Other times it dosen't even prompt me for my html file it simply tells me "The system cannot find the file specified." I figure it has nothing to due with my program because I get the same answer even when working with one of the demos Java supplies.

    I know when I first started with TextPad I had to fix the "Compile Java" and "Run Java Application", so I figured maybe this was the same sort of problem. I've been seraching for quite awhile, but have been unable to find a solution. If there are any suggestions, I'll be willing to try them. (I have to fix this before my assignments due.)

    Thanks.
  • BigDaddyLH
    Recognized Expert Top Contributor
    • Dec 2007
    • 1216

    #2
    Be sure that the active file is your applet class. All that the "Run Java Applet" menu item does is give you a chance to pick a HTML file from the current folder. If you say "no", it generates a trivial HTML file like this:

    [HTML]<!DOCTYPE HTML><HTML><HEA D></HEAD><BODY>
    <APPLET CODE="YouApplet .class" CODEBASE="." WIDTH=400 HEIGHT=300></APPLET>
    </BODY></HTML>[/HTML]

    You can always create this by hand.

    Comment

    • blackstormdragon
      New Member
      • Feb 2007
      • 32

      #3
      Originally posted by BigDaddyLH
      Be sure that the active file is your applet class. All that the "Run Java Applet" menu item does is give you a chance to pick a HTML file from the current folder. If you say "no", it generates a trivial HTML file like this:

      [HTML]<!DOCTYPE HTML><HTML><HEA D></HEAD><BODY>
      <APPLET CODE="YouApplet .class" CODEBASE="." WIDTH=400 HEIGHT=300></APPLET>
      </BODY></HTML>[/HTML]

      You can always create this by hand.
      I feel very silly( and slighlty confused) right now. This is my first time working with an applet. So if I understand, the only way to see what my applet looks like is to make an html file and than open it in a web browser. So what is the point of "Run Java Applet" if it does nothing?

      Comment

      • BigDaddyLH
        Recognized Expert Top Contributor
        • Dec 2007
        • 1216

        #4
        Originally posted by blackstormdrago n
        I feel very silly( and slighlty confused) right now. This is my first time working with an applet. So if I understand, the only way to see what my applet looks like is to make an html file and than open it in a web browser. So what is the point of "Run Java Applet" if it does nothing?
        There are two common ways to run an applet: using a browser like Firefox or using the JDK tool appletviewer.ex e

        The TextPad menuitem is just a short cut to calling appletviewer. You can also open up the HTML file in TextPad and click on the 'world icon' on its toolbar ("view in web browser").

        Comment

        • blackstormdragon
          New Member
          • Feb 2007
          • 32

          #5
          Originally posted by BigDaddyLH
          There are two common ways to run an applet: using a browser like Firefox or using the JDK tool appletviewer.ex e

          The TextPad menuitem is just a short cut to calling appletviewer. You can also open up the HTML file in TextPad and click on the 'world icon' on its toolbar ("view in web browser").
          Okay, thank you very much. This seems to make sense now.

          Comment

          Working...