 |
 |

08-29-2003, 09:51 AM
|
|
Centurion
|
|
Join Date: Aug 2003
Posts: 107
|
|
Shell command question
|
I want to call the command prompt, go to: J:\dev\Course Magic location and run: java CourseParser medium "N:\IS\DESIGNER\Copied Files\hs\WGHT 41\coursetext\WGHT41.htm" J:\dev\111111111111\test
How do I do it?
Shell("command.com...
Thanks a lot!
|
Last edited by fandecine; 08-29-2003 at 10:44 AM.
|

08-29-2003, 10:47 AM
|
|
Centurion
|
|
Join Date: Aug 2003
Posts: 107
|
|
Quote: Originally Posted by fandecine I want to call the command prompt, go to: J:\dev\Course Magic location and run: java CourseParser medium "N:\IS\DESIGNER\Copied Files\hs\WGHT 41\coursetext\WGHT41.htm" J:\dev\111111111111\test
How do I do it?
Shell("command.com...
Thanks a lot!
updated
|
|

08-29-2003, 11:07 AM
|
|
Iron-Fisted Programmer
Retired Moderator * Guru *
|
|
Join Date: Jul 2001
Location: Fayetteville Arkansas USA
Posts: 18,127
|
|
|
What have you tried already?
Did you use ChDir to change directories to J:\dev\Course Magic first?
|
|

08-29-2003, 11:21 AM
|
|
Centurion
|
|
Join Date: Aug 2003
Posts: 107
|
|
Quote: Originally Posted by Thinker What have you tried already?
Did you use ChDir to change directories to J:\dev\Course Magic first?
No, I just don't know how to do it!
|
|

09-02-2003, 02:08 PM
|
|
Centurion
|
|
Join Date: Aug 2003
Posts: 107
|
|
|
I posted this thread days ago but didn't get any answers. I am trying again. I really need help for this one! Thanks.
LD
|
|

09-02-2003, 03:32 PM
|
|
Iron-Fisted Programmer
Retired Moderator * Guru *
|
|
Join Date: Jul 2001
Location: Fayetteville Arkansas USA
Posts: 18,127
|
|
|
I asked if you tried the ChDir function to change directories before you
did the shell. At the least you should type in ChDir, select it and press
the F1 key to see what help says about it. You need to post more
details about what you have tried. We can't begin to guess what you
need otherwise.
|
|

09-02-2003, 03:39 PM
|
 |
Village VB Idiot
* Expert *
|
|
Join Date: Jan 2003
Location: Idaho
Posts: 1,850
|
|
Is the Java file an Applet? If so, just use the WebBrowser control and .Navigate to the HTML file. I ask because you're pointing to an HTM file.
If the Java file is NOT an applet, and isn't embedded in an HTML page, you need to use Command.com to call the Java interpreter/compiler (I think it's called javac.exe) with the Java file as the parameter.
I've used the first method, and it works great:
Code:
'Make sure you drop a Browser control called WebBrowser1 on the form:
WebBrowser1.Navigate "N:\IS\DESIGNER\Copied Files\hs\WGHT 41\coursetext\WGHT41.htm"
|
|

09-04-2003, 11:03 AM
|
|
Centurion
|
|
Join Date: Aug 2003
Posts: 107
|
|
Quote: Originally Posted by VBJoe Is the Java file an Applet? If so, just use the WebBrowser control and .Navigate to the HTML file. I ask because you're pointing to an HTM file.
If the Java file is NOT an applet, and isn't embedded in an HTML page, you need to use Command.com to call the Java interpreter/compiler (I think it's called javac.exe) with the Java file as the parameter.
I've used the first method, and it works great:
Code:
'Make sure you drop a Browser control called WebBrowser1 on the form:
WebBrowser1.Navigate "N:\IS\DESIGNER\Copied Files\hs\WGHT 41\coursetext\WGHT41.htm"
No it is not an applet! This is what the java file will do:
Run the java file "CourseParser" from the location "J:\dev\Course Magic"
"medium", "N:\IS\DESIGNER\Copied Files\hs\WGHT 41" and "J:\dev\111111111111\test" are parameters for the java file(parser command, source, destination)
So I was thinking about the Shell command but could find nowhere how to use it with a java file.
Thinker, I tried:
ChDir ("J:\dev\Course Magic")
Shell ("command.com")
but it opens the command prompt on the C: drive !
I tried the following but how can I run the java file now?
ShellExecute(hwnd, "open", "command.com", "", "J:\dev\Course Magic", 1)
|
Last edited by fandecine; 09-04-2003 at 11:45 AM.
|

09-04-2003, 01:30 PM
|
|
Iron-Fisted Programmer
Retired Moderator * Guru *
|
|
Join Date: Jul 2001
Location: Fayetteville Arkansas USA
Posts: 18,127
|
|
|
just shell the whole thing...
tmpCmd = "command.com /c Java CourseParser medium '"N:\IS\DESIGNER\Copied Files\hs\WGHT 41\coursetext\WGHT41.htm'" J:\dev\111111111111\test"
Shell tmpcmd
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
 |
|