Click to See Complete Forum and Search --> : Use a java compiled class in vb
Off
July 30th, 2001, 10:50 AM
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.
Spectre5000
July 30th, 2001, 03:00 PM
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.
Off
July 31st, 2001, 10:24 AM
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
Spectre5000
July 31st, 2001, 10:41 AM
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.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.