Method 1: Return the Java class into an ActiveX component Step 1: Create a Java class, named Test.javapublic Class Test {public string getword () {return "Hello World";}} Step 2: Compile into a Class file, and copy To system disk: / Winnt / java / trustlib directory, then register into ActiveX Components Javareg / Register / Class: Test / Progid: Test Step 3: Use Set Obj = CreateObject ("Test") '"Test" in ASP Progidmsgbox Obj.GetWord () registered
Method 2: Direct Use Step 1: Establish Test.javapublic Class Test {Public String getWord () {Return "Hello World";}} Step 2: Compile into Class files, and copy to system disk: / Winnt / Java / TrustLib Directory Next Step 3: Use Dim Objset Obj = GetObject ("Java: Test") msgbox obj.getWord ()