2014-06-05 5 views
0

커맨드 라인에서 Java를 사용해야하므로 sencha 명령이라는 도구를 사용할 수 있습니다.커맨드 라인의 Java 버전이 설치된 것과 다른 것을 나타냅니다.

java 1.6 및 1.7이 설치되었지만, 이유는 무엇이든 1.4가 내 명령 행에 표시됩니다. 왜 이런 일이 일어나고 있는지, 어떻게 고쳐야하는지 아무도 모르는 사람이 있습니까? 내 컴퓨터에서이 버전을 어디에서나 검색했지만 찾지 못했습니다. 아무도 아이디어가있어. 감사합니다

첨부 된 스크린 샷을 참조하십시오. PATH 환경 변수가 자바의 이전 설치를 가리키는 것처럼

enter image description here

답변

1

는 것 같습니다.

이동 제어하려면 제어판 -> 시스템 -> 고급 시스템 설정 -> 고급 (탭) -> 환경 변수 ...

"시스템 변수"에서 헤더, 당신이 볼해야 "JAVA_HOME"환경 변수 , JRE7 설치 디렉토리를 가리키는 지 확인하십시오. 마찬가지로 "Path"환경 변수를 확인하고 JRE6 설치 경로 대신 동일한 JRE7 경로가 있는지 확인하십시오.

0

꽤 이상합니다. 먼저 Windows에서 환경 경로로 이동하여 최신 Java에 대한 올바른 경로가 있는지 확인합니다. 그렇게하면 java가 실행됩니다.

열기 환경 경로 : 윈도우 8

Drag the Mouse pointer to the Right bottom corner of the screen 
Click on the Search icon and type: Control Panel 
Click on -> Control Panel -> System -> Advanced 
Click on Environment Variables, under System Variables, find PATH, and click on it. 
In the Edit windows, modify PATH by adding the location of the new java installation. 
Close the window. 
Reopen Command prompt window, and run your java -version. 

윈도우 7

Select Computer from the Start menu 
Choose System Properties from the context menu 
Click Advanced system settings > Advanced tab 
Click on Environment Variables, under System Variables, find PATH, and click on it. 
In the Edit windows, modify PATH by adding the location of the new java installation. 
Reopen Command prompt window, and run your java -version. 

윈도우 XP

Start -> Control Panel -> System -> Advanced 
Click on Environment Variables, under System Variables, find PATH, and click on it. 
In the Edit windows, modify PATH by adding the location of the new java installation. 
Close the window. 
Reopen Command prompt window, and run your java -version. 
0

시스템이 "일반적인"방법으로 설정되었다고 가정하면 시스템 환경 변수로 이동하여 "JAVA_HOME"경로를 변경하십시오. 또한 64 비트 컴퓨터에서는 64 비트 버전의 Java를 설치해야하지만 명령 줄에서 제공하는 것을 사용하면됩니다 (명령 줄에서).

set "JAVA_HOME=c:\Program Files (x86)\Java\jdk1.7.0_07" 
관련 문제