Let me know if the java is correct, if the html is correct, what directory, or directories should these files reside in, and what directory should I run "appletviewer test.html" from. I respectfully ask you to take another look (can't thank you enough!).
APPLET VIEWER PROGRAM CODE
As stated in my first post with the "package applet " line removed from my code and the html looking to "test" only it works fine I get an applet window with the word Hello in it. For everything I try an applet window opens but the word Hello doesn't appear. I used all sorts of combinations running appletviewer from C:\, C:\applet, C:\temp5, C:\temp5\applet. I also created a directory C:\temp5\applet and copied test.* over there as well. I run "appletviewer test.html" directly from c:\temp5. I created a directory off of the root and called it C:\temp5.
APPLET VIEWER PROGRAM WINDOWS 7
I'm running windows 7 and doing all my work now from a cmd prompt. I think maybe I didn't provide enough detail. Unfortunately I still can't get this to work. How can I get appletviewer to recognize my applet if it has a package name?
APPLET VIEWER PROGRAM INSTALL
To be able to use this functionality, download and install the Java Applets Support plugin following the instructions in the section Manage plugins. I've tried applet.test, applet//test and several others but nothing works. Java applets support is not bundled with IntelliJ IDEA. I suspect my problem is in my html syntax but I can't figure it out. : test (wrong name: applet/test)įrom a book I'm reading (Core Jave, Volume I - Fundamentals) I see that I should change my html file as follows (adding applet/ before the name test): I find I can't get the appletviewer to work. I run into trouble when I try add a package label at the top of my java file. When I execute the command: appletviewer test.html Everything works great. When you run this, you should see a circleĪt the same location as the rectangle you drew first.I'm trying to get appletviewer to work with a very simple Hello program. You decide to draw a circle, save it as Circle.java For example,įill draw a circle that fits inside the rectangle whose upper left handĬorner is at (100, 100) and with diameter 50. Rectangle with the given location and dimensions. The oval is defined to be the largest oval that will fit inside of the In different places or they will overlap. Several rectangles by including several fillRect If your browser does not show applets try using the appletviewer application.
Remember to save and compile the applet classĪre a number of colors recognized by the awtĬolor.blue, Color.cyan and Color.magenta.