|
-
Apr 6th, 2000, 07:27 PM
#1
Thread Starter
Hyperactive Member
help needed.......urgent.......
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.
-
Apr 7th, 2000, 10:47 AM
#2
Hyperactive Member
Open it inside a WebBrowser?
-
Apr 8th, 2000, 12:21 AM
#3
Thread Starter
Hyperactive Member
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.
-
Apr 8th, 2000, 07:09 AM
#4
Hyperactive Member
Excuse my bad English, I meant:
"Why don't you try to open it inside a Web Browser?"
-
Apr 8th, 2000, 01:19 PM
#5
Hyperactive Member
Try using "jview classname" or "wjview classname" as the executable to run.
"People who think they know everything are a great annoyance to those of us who do."
-
Apr 9th, 2000, 11:29 AM
#6
Thread Starter
Hyperactive Member
Oh ok, Juan Carlos Rey...will try to.
-
Apr 9th, 2000, 03:21 PM
#7
Thread Starter
Hyperactive Member
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.
-
Apr 9th, 2000, 11:31 PM
#8
Thread Starter
Hyperactive Member
any more ideas???
any more ideas on openaing a java class file from VB????? im bordering on desperation!!!!!!!! help needed........
-
Apr 10th, 2000, 12:46 AM
#9
Member
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.
-
Apr 10th, 2000, 12:57 AM
#10
Hyperactive Member
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?
"People who think they know everything are a great annoyance to those of us who do."
-
Apr 10th, 2000, 08:04 AM
#11
Fanatic Member
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
{;->
-
Apr 10th, 2000, 08:09 AM
#12
Hyperactive Member
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.
"People who think they know everything are a great annoyance to those of us who do."
-
Apr 10th, 2000, 08:17 AM
#13
Fanatic Member
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
{;->
-
Apr 10th, 2000, 08:54 AM
#14
Hyperactive Member
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?
"People who think they know everything are a great annoyance to those of us who do."
-
Apr 11th, 2000, 05:47 AM
#15
Fanatic Member
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
{;->
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
|