access java class with moniker

D

dennis

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
 
A

Atrax

<%
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/
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top