Making edits
Often when you make edits in a .java file you want to see what you have so far. Obviously if it does not compile you
need to edit until you can run it.
In general, you have the following sequence:
-
edit the .java file and remember to save it
-
compile the file
- does it have compilation errors? If so, go back to 1
If there are no errors, then you want to see how it is running. Open your .html file on your favorite browser to look at it.
- If it is not what you want, you need to go back to the above steps of 1-3 to
edit, save and recompile until there are no errors again
- If you have already looked at it once, you will need to clear the classloader cache of your browser.
This is done in the java console (access through little coffee cup on the system panel at the bottom right of your screen
). Right-click on the cup and then chose to Open the Console
When it opens, it looks like this. When it opens, you want to clear classloader cache. This does NOT mean hit the clear button - that just clears the
screen of the java console. The list tells you that you can clear the classloader cache by typing an x.
Type an x into the java console screen. It will tell you that the classloader cache is cleared like here.
- refresh your .html page
- if it is still not what you want, so back up to step 1 to edit again.
Don't forget your <applet> tag in your .html page tells the size of the Graphics space with its height and width.
If you need more space (if you are not seeing something you think you should), make those numbers higher.