shell command woes :-(

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

jamielawjen

Thread Starter
Joined
Jan 11, 2006
Messages
2
hi there

i have written an add in in outlook. when called the add in calls a bat file passing the location of a file, which in turn calls some java classes thta encrypt it, and passes the location of the encrypted fiel back to outlook add in

i call the bat file,

path = "C:\runtime\CommandLine\runCmLn.bat c:\runtime\myfile.msg"

dtaskID = Shell(path, vbNormalFocus)

now this works fine, the bat file recievs the location of the file.

in the bat file i have the following (dont worry about this too much, it is irrelevant)this registers the locations of the classes to use

----
java -classpath entuser.jar;entp7.jar;entbase.jar;.\ SealantSystem.SealantApplicationUI.SealantInitialiser C:\singlepoint\SealedMessage.msg
----

now, when i run the add in, i get the following error on the command line

C:\Program Files\Common Files\System\MAPI\1033\nt>java -classpath entuser.jar;entp7.jar;entbase.jar;.\ SealantSy
alantInitialiser C:\singlepoint\SealedMessage.msg
Exception in thread "main" java.lang.NoClassDefFoundError: SealantSystem/SealantApplicationUI/SealantInitialiser

looking at the error, it is running the bat file, from the C:\Program Files\Common Files\System\MAPI\1033\nt directory. i thought it would run the bat from ITS directory, not where the vb is running from.

my question is, how can i get the command line to change directory to the location of the

bat file (C:\runtime\CommandLine\runCmLn.bat), and then run it.

i am absolutely stuck

any help would be great

many thanks

Jamie
 
Joined
Jul 29, 2004
Messages
6,650
hi jamielawjen,

Welcome to TSG ! :)

In your bat file, you should give the full path of the jar's after the -classpath option and the SealantSystem/SealantApplicationUI/SealantInitialiser class.
 

jamielawjen

Thread Starter
Joined
Jan 11, 2006
Messages
2
thnaks for the response,

we solved the problem by putting the cd command in the bat file itself, simple solution really! just wish it had come sooner!

jamie
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top