简体   繁体   中英

'wsimport' is not recognized as an internal or external command

There are a few of these questions. But my PATH variable is correct

;%JAVA_HOME%\bin;

My JAVA_HOME is C:\\Program Files\\Java\\jdk1.8.0_131

When I type java -version, I get

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

echo %JAVA_HOME% and echo %PATH% return what they are supposed to. What can be the reason wsimport doesn't work?

My full PATH is

C:\Informatica\9.5.1\clients\DT\bin;C:\Informatica\9.5.1\clients\tools\datadirect;C:\Informatica\9.5.1\clients\tools\odbcdrv;C:\oracle\client_1\bin;C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%systemroot%\System32\WindowsPowerShell\v1.0\;%systemroot%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\PuTTY\;C:\Program Files (x86)\PuTTY\;%JAVA_HOME%\bin;%ZOOKEEPER_HOME%\bin;C:\Program Files\Git\cmd;C:\Program Files\apache-maven-3.5.0\bin;

Firstly, try to check javac -version . Maybe you provide some wrong path for JDK and system recognize only JRE path. What is echo %PATH% output? Is there some different path for java before ;%JAVA_HOME%\\bin ?

%JAVA_HOME%\\bin won't work in %PATH% . It should be full path without variables. There is no variable expansion when OS search for executable.

Your java executable found in some system folder.

I suppose %SystemRoot% is some sort of special case.

Solution

Replace %JAVA_HOME%\\bin by real path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM