Hi,
i've class writted and compiled in java that i want to use in vb. Does somebody have any idea about how to make it work.
Thanks i advance.
I will rate your response.
Printable View
Hi,
i've class writted and compiled in java that i want to use in vb. Does somebody have any idea about how to make it work.
Thanks i advance.
I will rate your response.
Assuming that the java class is run when you click on a button or menu item, try the shell function. Example:
private Sub menu_Clicked()
Dim RetVal as Long
RetVal = Shell("c:\yourFolder\yourClass", 1)
End Sub
Now, this is in theory that this should work. The Shell function documentation states that this is for running
executable files, but if you have your classpath variable set correctly, this should work. Try this out and let me know
if it does or not.
Hi,
the problem with your solution is that, the class is only compiled (.class) and to execute it by the way you are suggering, i need a JVM. Is it another solution with only VB.
Thanks
Assuming you are running windows 9x/2000/ME/NT, you should have a JVM preinstalled on your machine. In
fact, how do you run the java class without the vb code? Does the java class run fine from the command line?
If the java class can be run from the command line, then you should be able to run it with the shell command
in VB.