• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Callig Java Methods from Visual Basic

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello. I have an application in java that I want to integrate with another application which was done in VB. How can VB call a java method and receive the returning result?.
Another alternative to this is: How can I create a DLL out of a java class?
Thanks!
Francisco.
 
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't directly call the VB methods instead try using APACHE SOAP.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are running windows and using Visual J++ - you can create COM DLLs using ms java (or at least you could a while back - not sure what has happened with the law suit and stuff).
You can run these dlls under Microsoft Transaction Server (or not) and call them from vb using CreateObject (I think - the details are slightly hazy).
Check out msdn on microsoft, but I'm sure it's possible.
Sorry for the slightly fuzzy details but it was a while ago.
Tony
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Originally posted by Francisco Iacobelli:
Hello. I have an application in java that I want to integrate with another application which was done in VB. How can VB call a java method and receive the returning result?.
Another alternative to this is: How can I create a DLL out of a java class?
Thanks!
Francisco.


There is another way for calling java methods from within VB. I never did it on my own I just read about it.
Take a look at:
http://java.sun.com/products/javabeans/software/bridge/
or search for ActiveX on java.sun.com.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
This document contains details regarding the VBScript files execution with Windows Script Engine (WSE). Access the Java Objects in VBScripts or VB.
VBScript can use the java objects (applet or java beans) using GetObject() function by Instantiate Java object via moniker.

Installation Requirements:
Download the windows script host .exe file from the Microsoft site & Install it.
URL is: http://msdn.microsoft.com/scripting/default.htm?/scripting/vbscript/default.htm
Procedure:
We can run WSE either in desktop or in command line. For Desktop we have to run wscript.exe & for command line run cscript.exe which takes *.vbs(VBScript file) as the argument.
The java class file, which we are accessing in vbscript file, should be in the classpath.
The one more condition for java file is it has to have the Default constructor.
hope this may help u.

------------------
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I would like to present my opinion on this. I think the solutions suggested may not be good since they are all platform dependent. Particularly when it comes to the case with two different applications written in two different languages, it is better we assume two different operating system also. Hence it would be better if CORBA is used to solve this problem.

Originally posted by Francisco Iacobelli:
Hello. I have an application in java that I want to integrate with another application which was done in VB. How can VB call a java method and receive the returning result?.
Another alternative to this is: How can I create a DLL out of a java class?
Thanks!
Francisco.


 
bacon. tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic