Hi,
I need to run a java class file from VB. I tried using the ShellExecute API, but that returns 31( an error that "there is no program associated with the specified type of file.")
How do I run the file? any ideas????
Thanks.
Printable View
Hi,
I need to run a java class file from VB. I tried using the ShellExecute API, but that returns 31( an error that "there is no program associated with the specified type of file.")
How do I run the file? any ideas????
Thanks.
Open it inside a WebBrowser?
No, I didn't open it from a web browser. I placed a command button on a form and in the click event of the command button I called the ShellExecute API.
Excuse my bad English, I meant:
"Why don't you try to open it inside a Web Browser?"
Try using "jview classname" or "wjview classname" as the executable to run.
Oh ok, Juan Carlos Rey...will try to.
noone,
Im unable to open the java class file from VB using jview or wjview. Does jview work from VB or only from VJ++???
Any more ideas??
Thanks a lot.
any more ideas on openaing a java class file from VB????? im bordering on desperation!!!!!!!! help needed........
What Juan Carlos was suggesting, is that you use the WebBrowser Control to open a web page which contains the Java Applet.
First you need to create the web page itself, with the Applet embedded into it. Then you need to store that web page either locally on the computer, or on a home page somewhere.
Finally, you need to create your VB form and drop the WebBrowser control onto it (Note you MUST have Internet Explorer 4.0 or higher to see the WB Control in your components list). All you do, is specify the URL to which you want to navigate...which in your case is the web page you just created.
Jview and WJview are MS' Java Interpretters. They should run any compiled Java Application. Is the class file your trying to run an applet or Java application?
Hi Rammy,
If you want to RUN the class file (if its a class therefore its an applet of one kind or another), so use the Internet control in your VB application by Clicking on PROJECT on the menubar and COMPONENTS and find the Internet WEB BROWSER control and in the DOCUMENTSOURCE (i'm not sure if that is the correct property name- but i'm sure you get the drift)set the anme of the Java class file you wish to open, and if that doesn't work then do as Brent Akster and Carlos Juan says and create a HTML file with the java class in there and use that as the source docuument for the web browser control.
DocZaf
{;->
Zaf,
Not all Java class files are applets. A java program can be written as an application. If it is an applet then you will have to create an HTML file to run it. If you are writing for a new version of Windows it almost certainly has jview.exe or wjview.exe on it.
Hmmmmmmmm
Okay Noone, thank you for educating me...
I'm glad i'm just a humble guy, as i dont have far to fall, and learn more everyday
Cheers
DocZaf
{;->
Hey Zaf,
Sorry if I came off sounding a bit condescending, didnt mean it. Just get a little touchy when it comes to Java (love Java, gotta use VB for school). Anyways Rammy, have you got your program to run the class file?
Hey Noone NP
:-)
Thats okay, i never took it like that,
and am sorry if i gave the wrong impression.
And rammy , sure all the time, i'll be checking, to learn as well as to help out if possible
DocZaf
{;->