I'm attempting to create yet another
Java service tool. After looking at the source code that comes with the Microsoft Java SDK, I found that their jexegen/jntsvc programs bind
string params into a string table and raw classfile data into RT_RCDATA resources within an exe.
After some google searching, I found some good examples on how to update/read resources. However, I'm stuck when it comes to
actually instantiating the class. When I try the IBM JVM, I get to the point where I load the class but can't find the methodID for the static "main" method. When I use the Sun JVM, I don't even get that far, and my call to DefineClass returns a NULL.
Here's the source to an analog program (no EXE/DLL resource stuff, but it's pretty damn close):
(yes, it's getting to be a hack job, and yes, it's silly
to hardcode classnames in there...)
Finally, the "Hello" class it refers to is just a simple
Hello World.
Any pointers would be greatly appreciated. Thanks.