Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot Compile

Status
Not open for further replies.

alexpalmbay

Technical User
Sep 1, 2002
6
US
Good Afternoon,
I have a unique problem on Windows 98/SE. Whenever I try to compile a JAVA applet, the changes do not take effect, unless I reboot my PC. I've tested this out numerous times, and each time I get the same result. It doesn't matter the size of the pgm. Below are the steps I take:
1) Create a JAVA APPLET pgm, using NOTEPAD as my editor.
2) Select FILE|SAVE AS.
3) Save my file using a .JAVA extension, and I save it in my C:\jdk1.3.1_04\bin folder.
4) Open a DOS window, type javac pgmName.java.
5) Double-click on my HTML document associated w/my JAVA pgm, and I see my applet.
6) Close my browser.
7) Change the wording on a label w/in my applet, select FILE|SAVE.
8) Open a DOS window, type javac pgmName.java.
9) Double-click on my HTML document associated w/my JAVA pgm, but the change I made is not there. If I reboot at this time, double-click on the HTML document, then I see the changes.

I'm running Windows 98/SE, and I downloaded JDK1.3.1 v4 from the SUN site.

If I can get assistance w/this problem, I would greatly appreciate it. It makes it very time-consuming when I have to reboot my PC each time.

Thank you very much!
 
Well, what I was going to say was... Open "Control Panel"->"Java Plugin" and hunt about for some sort of "Cache Classes" checkbox, however I appear to have a few versions of the plugin kicking about, and the nearest I can see is a "Clear JAR Cache" button in one of them, and a "Cache JARs in memory" tick-box in another.

Even so, have a hunt about to see if that's what's going on (although, I take it that it will only affect you if you are using JAR files).

Also, if you're using the
Code:
<APPLET>
tag in your HTML page, then you're not actually using the plug-in (but you probably know that: just in case). If so, there may be some sort of &quot;Don't Cache Applets&quot; option in your version of Internet Explorer that you could toggle?

Also... Java does provide an AppletViewer program to test out your applets without having to load a browser:
Code:
Usage: appletviewer <options> url(s)

where <options> include:
  -debug                  Start the applet viewer 
                              in the Java debugger
  -encoding <encoding>    Specify character encoding
                              used by HTML files
  -J<runtime flag>        Pass argument to the java
                              interpreter
... Personally, the last time I made an Applet, I stuck it in a JAR file, and made it able to run standalone, so that you can test it out by simply double-clicking on the JAR file (You might need the Plug-in installed for this - not sure, since I was using Swing anyway).

The really neat thing with doing that is that you can stick all your source, class files and images, etc. into the JAR file, and since it's the same as a .zip file, they'll even get compressed too! [Then, when you're putting your webpage together, you simply name the .jar file in the plugin's object tag, and the browser downloads the whole applet in one compressed file].

Hope it helps,
Stephen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top