Activate Your Applets

Activate Your Applets

Did you ever feel the urge to use a nice Java class you just wrote as an ActiveX object on your Windows machine? Good news: you can do it in three easy steps. First, make sure you’ve got the latest build of the Microsoft VM on the target machine (check Second, copy your .class file to the LIB or TRUSTLIB directory. Third, run the JAVAREG utility (use Start/Find/Find Files if you’re not sure where it is) as follows:
JAVAREG /register /class: /progid: is the name of your class, and can be anything, but preferably the same–it’s the object name you’ll have to pass to a function like CreateObject later on.

And that’s it! The nice thing is that this will work for any Java class that will run on the Microsoft VM, and not just classes created with Microsoft development tools. If you want to get rid of your ActiveX object at any time, use JAVAREG with the /unregister switch.


Share the Post: