I am currently developing in VAJ which unfortunately uses the jdk1.2.1 JVM. However, I need to use the java.awt.Robot class which wasn't implemented until j2sdk1.4.1 I believe. When run on the actual server, I am using j2sdk1.4.2 so I am fine there, but I need to be able to compile the code in VAJ so I can't reference the Robot class directly. I tried creating an interface class and compiling it through a DOS prompt, however it isn't recognizing it for some reason when I run the servlet. So my next thought was try to use the forName method of the Class object. I know this doesn't work, but is there something similar to this I can try?
Class c = Class.forName("java.awt.Robot");
c.keyPress(someInt); // where keyPress is a method of Robot
Something like this would get past my issues with compiling in VAJ and at the same time would execute the java.awt.Robot class on the server since it uses the correct JVM. However keyPress is obviously not a method in the object Class, but I am hoping I am at least getting close?
Any ideas would be greaetly appreciated!
Thanks!
Class c = Class.forName("java.awt.Robot");
c.keyPress(someInt); // where keyPress is a method of Robot
Something like this would get past my issues with compiling in VAJ and at the same time would execute the java.awt.Robot class on the server since it uses the correct JVM. However keyPress is obviously not a method in the object Class, but I am hoping I am at least getting close?
Any ideas would be greaetly appreciated!
Thanks!