By xboooting
you probably mean the -Xbootclasspath
parameter?
You can use the -Xbootclasspath
to override the classes that are being loaded when the VM is booting. This way you can give the VM your own implementation of a certain class and it will be used right from the start of the VM. You can do something like this:
java -Xbootclasspath/p:path_to_the_jar_with_myCanvas_class.jar HelloWorld.class
But the -Xbootclasspath
won't replace the Canvas
class at runtime, the replacement will occur already at the start of the VM.
Here is a nice post about Xbootclasspath : When to use -Xbootclasspath on HotSpot?
java.awt.Canvas
? Time to join us in the 3rd millennium & use Swing. BTW 1) What is the use-case here for a) Extending this class. b) Using it instead of the inbuilt class? 2) It will not be legal to distribute this app. AFAIU. – Dulcle