Actually, you can register java classes.  There's a tool called javareg(I
think you can get it from Microsoft's site.  Possibly in their java sdk)
that you can use to register java classes.  I wrote a java package that VB
users as well as Java users had to have access to.  There are a few rules
that you need to follow in writing java code to be used by VB, one of which
is that class constructors cannot pass parameters.  Here's a simple example
showing how to use java code in VB(please be warned that I a not a VB
programmer, so the VB may look awful to some, but it works)...

Java code:
public class ArrayTest{
        public ArrayTest(){

        }

        public String setVal(String[] valk){
                return valk[1];
        }

}

1.javareg /register /class:ArrayTest /typelib:ArrayTest.tlb
2.select "References..." from the "Project" menu in VB.
3.find "ArrayTest" in the list, and select it

VB code(after using javareg to register the java class
Sub main()
    Dim foo As ArrayTest
    Dim val As String
    Dim MyArray(3)
    MyArray(0) = "Sunday"
    MyArray(1) = "Monday"
    MyArray(2) = "Tuesday"

    Set foo = New ArrayTest
    val = foo.setVal(MyArray)
    Debug.Print val
End Sub
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Mike Hewitt
Sent: Friday, March 24, 2000 1:08 PM
To: [EMAIL PROTECTED]
Subject: Re: Converting DLL's to java and call them from ASP


Not to sound like a downer, but I don't think you're going to be able to
pull off calling java classes from asp.

As you may already know, the asp method of Server.CreateObject("A.B")
requires that A.B be in the windows system registry, and I am pretty sure
that you can't 'register' a java class.  Windows just doesn't see it as
executable code.

You can create com wrappers for your classes (although I have never done
so), but at that point, you're back to having .dll's.

Of course if anyone does figure it out, though I know I'd like to hear how.

Good luck

Mike

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Bradley McLain
Sent: Friday, March 24, 2000 10:55 AM
To: [EMAIL PROTECTED]
Subject: Re: Converting DLL's to java and call them from ASP


an admirable goal ;-)  i'd be interested also in some ideas here.

certainly you could post all form data to servlets.
you could also use client javascript to access java methods.
there is probably some COM/CORBA way to establish a connection.
i'm looking through some documentation for 'CreateObject', but there doesn't
seem to be any way to instantiate anything other than an ActiveX object.

any other ideas?

bradley mclain

>From: vaidyanathan_g <[EMAIL PROTECTED]>
>Reply-To: vaidyanathan_g <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Converting DLL's to java and call them from ASP
>Date: Fri, 24 Mar 2000 16:32:50 +0530
>
>Hi,
>
>Is it possible to make calls to java classes or Java servlets  from ASP? We
>want to convert the middle tier dll's to java classes and call from asp
>classes.Is it possible? If so any pointers to do the same.
>
>Thanks
>
>Regards,
>
>Vaidy
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to