|
-
July 30th, 2001, 10:50 AM
#1
Use a java compiled class in vb
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.
"the opposition of the opposites is the engine of becoming"
-
July 30th, 2001, 03:00 PM
#2
Re: Use a java compiled class in vb
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.
-
July 31st, 2001, 10:24 AM
#3
Re: Use a java compiled class in vb
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
"the opposition of the opposites is the engine of becoming"
-
July 31st, 2001, 10:41 AM
#4
Re: Use a java compiled class in vb
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|