access java class with moniker

Discussion in 'ASP General' started by dennis, Sep 16, 2003.

  1. dennis

    dennis Guest

    Hi,
    I need to access Java object through an ASP page. I reckon that there
    are two ways:
    1) If the Java object is registered as a COM then access it through the
    ProgID using CreateObject method.
    2) Direct access to the java class through java moniker. I am trying to
    do this ..but failed to get it working.

    I created a class called Javatest and put it in the
    Windows/java/TrustLib and also put it in the classpath.

    In the ASP code..I did this,
    <%
    1. Dim strResult
    2. set javaObject = GetObject("java:ClassName")
    3. strResult = javaObject.SomeFunction()
    4. set javaObject = nothing
    %>

    I keep getting the "No object for moniker" error.

    I also tried registering the class with javareg and tried to access.
    Still the same error. Any ideas...checks?

    thanks,
    den
     
    dennis, Sep 16, 2003
    #1
    1. Advertising

  2. dennis

    Atrax Guest

    <%
    1. Dim strResult
    2. set javaObject = GetObject("java:JavaTest")
    3. strResult = javaObject.SomeFunction()
    4. set javaObject = nothing
    %>


    why are you calling it with "java:ClassName" when clearly that's not the
    name of your class? or is this just a misleading example?

    and what about the method name?





    ________________________________________
    Atrax. MVP, IIS
    http://rtfm.atrax.co.uk/

    newsflash : Atrax.Richedit 1.0 now released.
    http://rtfm.atrax.co.uk/infinitemonkeys/components/Atrax.RichEdit/

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Atrax, Sep 16, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sebastien
    Replies:
    1
    Views:
    559
    Michael Borgwardt
    Nov 7, 2003
  2. Matt
    Replies:
    2
    Views:
    2,005
    Troy Kinsella
    May 30, 2004
  3. E11
    Replies:
    1
    Views:
    4,842
    Thomas Weidenfeller
    Oct 12, 2005
  4. christopher diggins
    Replies:
    16
    Views:
    769
    Pete Becker
    May 4, 2005
  5. Joseph Turian
    Replies:
    5
    Views:
    607
Loading...

Share This Page