Jump to content

Running a JAR file


IndyUK
 Share

Recommended Posts

Hi All,

I'm trying to run a batch file which calls a jar file. It also sets up environment variables. When I run it by double clicking it works. However if I call it from AutoIt using Run I get an error (as expected).

Here's the content of the batch file...

set USER_CLASSES=%USER_BASE_CLASSES%;%CLASS_DIR%\UserApplication.jar;%CLASS_DIR%\UserApplication_Stubs.jar
set CLASS_PATH="%USER_CLASSES%;%USER_LIBS%"
set PATH="%JAVA_DIR%\bin;%INSTALL_DIR%\bin"

%DRIVE_DIR%
cd %LOG_DIR%

start %JAVAW_EXE% -Djava.security.policy=%POLICY% -Djava.library.path="%JAVA_DIR%\bin;%INSTALL_DIR%\bin" -Dshowurl=1 -cp %CLASS_PATH% %PROG_NAME% %CONFIG_URL%
exit

How do I run the above?

Thanks

Link to comment
Share on other sites

Can you post you code?? Try running it like this ?

RunWait(@ComSpec & " /C " & $pathToBAT, @ScriptDir)
I'm basically running the following line..

ShellExecute("C:\Lagan\Frontline\TestV6\userstart.bat")
Edited by IndyUK
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...