Running an exe from the command line

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
johnaaronrose
Level 2
Level 2
Posts: 22
Joined: Tue Dec 01, 2009 8:49 am

Running an exe from the command line

Post by johnaaronrose »

I bring up the command line (i.e. MS-DOS prompt) by double clicking cmd.exe in Wine's Windows\System32 folder. I key 'path' and I see the path i.e. PATH=C:\windows\system32;C:\windows;C:\windows\system32\wbem;C:\Program Files\Java\jdk1.6.0_26\bin

I try to run java.exe (which is in the last folder) and it says 'File not found'. Therefore, it seems that 'PATH' does not work the same as in Windows i.e allows the finding & execution of a program which is held in any folder specified by the 'PATH'. Is this known behaviour? If so, is there a workaround?

PS Keying C:\Program Files\Java\jdk1.6.0_26\bin\java.exe finds java.exe & runs it.
KenJackson
Level 2
Level 2
Posts: 24
Joined: Mon Apr 14, 2008 11:01 am

Post by KenJackson »

I don't have java on my path for some reason, but when I added it, your experiment worked for me on my Fedora Linux system running wine-1.3.33.

From Linux bash, I execute
.wine/drive_c/windows/system32/cmd.exe

From the C:\> prompt, I execute
set PATH=C:\bin;C:\windows\system32;C:\windows;C:\Program Files\Java\j6re\bin
java -version


Java reports version 1.6.0_26.
Locked