Home All Groups Group Topic Archive Search About

Calling Java class from VB.net

Author
18 Jan 2006 8:15 PM
simon
hello,
may have a need shortly to call a java class from a vb.net web app.
basically the java class would serve as an email creation/sending
function.
i realize this all could be done in .net, but i'm just curious as to
what needs to be set up to make a call such as this.
i realize you can call a java function from sql server and was
wondering if wrapping the call to java from a proc would be an easy
way to go.  preferably i'd like to make the call directly from a vb
class

searching the web for this topic did not turn up much information
"call java from vb.net"

did find this response from one site regarding ASP calling Java:
   the only way you could call a java object is if it is compiled to a
   class and resides in C:<Windows>\Java\Trustlib.

   Then you can do :

   set javaObject = GetObject("java:YourClass")
   strResult = javaObject.YourMethod()
   Response.Write(strResult)
   set javaObject = nothing

also found where you can purchase a 3rd party tool, JNBridge - but
looking for a free coding solution, not purchased.

the java classes i would end up calling would only be returning a
value of success or fail, everything else would be handled in the java
class and database.

thoughts on this topic would be appreciated, as always!  thanks

Author
18 Jan 2006 8:59 PM
Kerry Moorman
simon,

One option is to make the Java class a web service.

Kerry Moorman


Show quoteHide quote
"simon" wrote:

> hello,
> may have a need shortly to call a java class from a vb.net web app.
> basically the java class would serve as an email creation/sending
> function.
> i realize this all could be done in .net, but i'm just curious as to
> what needs to be set up to make a call such as this.
> i realize you can call a java function from sql server and was
> wondering if wrapping the call to java from a proc would be an easy
> way to go.  preferably i'd like to make the call directly from a vb
> class
>
> searching the web for this topic did not turn up much information
> "call java from vb.net"
>
> did find this response from one site regarding ASP calling Java:
>    the only way you could call a java object is if it is compiled to a
>    class and resides in C:<Windows>\Java\Trustlib.
>
>    Then you can do :
>
>    set javaObject = GetObject("java:YourClass")
>    strResult = javaObject.YourMethod()
>    Response.Write(strResult)
>    set javaObject = nothing
>
> also found where you can purchase a 3rd party tool, JNBridge - but
> looking for a free coding solution, not purchased.
>
> the java classes i would end up calling would only be returning a
> value of success or fail, everything else would be handled in the java
> class and database.
>
> thoughts on this topic would be appreciated, as always!  thanks
>
>
Author
18 Jan 2006 9:16 PM
simon
thanks for the reply.  i will definitely look into this configuration.
was also very curious if there was a way directly call it
thanks

Show quoteHide quote
>simon,
>One option is to make the Java class a web service.
>Kerry Moorman
>
>"simon" wrote:
>> hello,
>> may have a need shortly to call a java class from a vb.net web app.
>> basically the java class would serve as an email creation/sending
>> function.
Author
18 Jan 2006 11:01 PM
j-integra_support
You can use Web Services, but if you need higher performance than an
interoperability bridge is the way to go (although not free). Intrinsyc
Software has 2 products which do this - one deploys on the .NET side,
the other on the Java side (so you can use whichever product best fits
your environment).

Access Java from .NET using J-Integra for .NET
http://j-integra.intrinsyc.com/support/net/doc/#examples/csharp_java/quickstart.html

Access Java from .NET using J-Integra Espresso
http://j-integra.intrinsyc.com/support/espresso/doc/#JavaConn/sample_java.html

For a free evaluation, visit http://j-integra.intrinsyc.com/

Shane Sauer
J-Integra Interoperability Solutions
http://j-integra.intrinsyc.com/
high performance interop middleware for java, corba, com & .net
Author
20 Jan 2006 4:46 PM
Steve Long
I'm wondering if the class could be re-writen as a J# class.

?
Steve

Show quoteHide quote
"simon" <m*@here.com> wrote in message
news:lv7ts1d2034vj0fhosl4j29prlci0gmer2@4ax.com...
> hello,
> may have a need shortly to call a java class from a vb.net web app.
> basically the java class would serve as an email creation/sending
> function.
> i realize this all could be done in .net, but i'm just curious as to
> what needs to be set up to make a call such as this.
> i realize you can call a java function from sql server and was
> wondering if wrapping the call to java from a proc would be an easy
> way to go.  preferably i'd like to make the call directly from a vb
> class
>
> searching the web for this topic did not turn up much information
> "call java from vb.net"
>
> did find this response from one site regarding ASP calling Java:
>    the only way you could call a java object is if it is compiled to a
>    class and resides in C:<Windows>\Java\Trustlib.
>
>    Then you can do :
>
>    set javaObject = GetObject("java:YourClass")
>    strResult = javaObject.YourMethod()
>    Response.Write(strResult)
>    set javaObject = nothing
>
> also found where you can purchase a 3rd party tool, JNBridge - but
> looking for a free coding solution, not purchased.
>
> the java classes i would end up calling would only be returning a
> value of success or fail, everything else would be handled in the java
> class and database.
>
> thoughts on this topic would be appreciated, as always!  thanks
>