'
'
' A simple script to run a Java application using wjview 
'
' Using the Windows scripting host avoids that we have to switch to an MSDOS window.
'
' Created: 2001 Martin Hepperle
'
Dim PathName
Dim ClassName

ClassName = "MH.JavaFoil.JavaFoil"

Set oArgs = WScript.Arguments

' the first argument contains the drive on which JavaFoil is installed
If oArgs.Count > 0 Then
   DriveName = oArgs(0)
Else
   DriveName = "C:"
End If

' the second argument contains the full path to the installation directory with a sub-dir "java"
If oArgs.Count > 1 Then
   PathName = oArgs(1)
Else
   PathName = ".\"
End If

'
' 1) Define and create a Shell object first
'

Dim WShell
Set WShell = WScript.CreateObject("WScript.Shell")


'
' 2) Use the Run method of the Shell object
'
' the following example sets the country using the "Country" parameter:
'
'
Const winHidden = 0

WShell.Run "cmd.exe /C java.exe -cp """+PathName+"java\mhclasses.jar"" -jar """+PathName+"java\javafoil.jar""", winHidden



