user1569574
user1569574

Reputation: 21

How to execute .jar file in TCL

I'm trying to execute a .exe file through a TCL program I'm writing. The line is

exec "C:\Users\owner\Desktop\folder\jarfile.exe"

The error I am getting is

couldn't execute "C:UsersownerDesktopfolderjarfile.exe": no such file or directory
while executing
    "exec "C:\Users\owner\Desktop\folder\jarfile.exe""
(file "C:\Users\owner\workspace\Test\connectiontest.tcl" line 53)

I am using Eclipse to write the program in; I have Eclipse set up with TCL environment so the program does work. It's just that I can't get the .exe file to execute.

EDIT: I'm sorry, I didn't realize the file is jarfile.jar, not jarfile.exe. I still get the same error

Upvotes: 1

Views: 554

Answers (1)

Lorenzo Marcon
Lorenzo Marcon

Reputation: 8169

Escape the slashes:

exec "C:\\Users\\owner\\Desktop\\folder\\jarfile.exe"

Upvotes: 0

Related Questions