Article ID: 167941
Article Last Modified on 11/14/2005
// SIMPLE.JAVA-------------
public class Simple
{
public int SimpleFn ( int x )
{
return x * 2;
}
}
jvc simple.javaNOTE: You do not have to use the Microsoft compiler for Java. JAVAC works just fine.
copy simple.class \winnt\java\trustlib
javareg /register /class:Simple /progid:SimpleThe /class: argument is the name of the .class file in your trustlib or lib directory. The /progid: is the name that you will use in CreateObject() to create your COM object.
SIMPLE.ASP------------- <html><body> <h1>Simple Test </h1>The result from SIMPLE is:
<% Set SimpleObj = Server.CreateObject("Simple") %>
<% = SimpleObj.SimpleFn(5) %>
<hr>
</body></html>
------------------------
163637 INFO: Availability of Current Build of Microsoft VM
Additional query words: ASP java server com CreateObject
Keywords: kbhowto kbfaq KB167941