"리눅스 JDK 버전 확인"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(사용자 2명의 중간 판 12개는 보이지 않습니다)
3번째 줄: 3번째 줄:


==방법 1: javac==
==방법 1: javac==
;명령어
{{소스헤더|명령어}}
<source lang='bash'>
<syntaxhighlight lang='bash'>
javac -version
javac -version
</source>
</syntaxhighlight>


;실행예시 (설치됨)
{{소스헤더|실행예시 (설치됨)}}
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# javac -version
[root@zetawiki ~]# javac -version
javac 1.6.0_22
javac 1.6.0_22
</source>
</syntaxhighlight>


;실행예시 (설치안됨)
{{소스헤더|실행예시 (설치안됨)}}
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# javac -version
[root@zetawiki ~]# javac -version
-bash: javac: command not found
-bash: javac: command not found
</source>
</syntaxhighlight>


==방법 2: rpm==
==방법 2: rpm==
;명령어
{{소스헤더|명령어}}
<source lang='bash'>
<syntaxhighlight lang='bash'>
rpm -qa | grep jdk
rpm -qa | grep jdk
</source>
</syntaxhighlight>


;실행예시 (설치됨)
{{소스헤더|실행예시 (설치됨)}}
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# rpm -qa | grep jdk
[root@zetawiki ~]# rpm -qa | grep jdk
java-1.6.0-openjdk-src-1.6.0.0-1.28.1.10.10.el5_8
java-1.6.0-openjdk-devel-1.6.0.0-1.28.1.10.10.el5_8
java-1.6.0-openjdk-devel-1.6.0.0-1.28.1.10.10.el5_8
java-1.6.0-openjdk-1.6.0.0-1.28.1.10.10.el5_8
java-1.6.0-openjdk-1.6.0.0-1.28.1.10.10.el5_8
</source>
</syntaxhighlight>


;실행예시 (설치안됨)
{{소스헤더|실행예시 (설치안됨)}}
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# rpm -qa | grep jdk
[root@zetawiki ~]# rpm -qa | grep jdk
</source>
</syntaxhighlight>


==방법 3: yum==
==방법 3: yum==
java-1.X.0-openjdk 와 java-1.X.0-openjdk-devel 패키지가 설치되었는지 확인해보자.
java-1.X.0-openjdk-devel 패키지가 설치되었는지 확인해보자.
;명령어
{{소스헤더|명령어}}
<source lang='bash'>
<syntaxhighlight lang='bash'>
yum info java*jdk-devel | egrep "(Name|Release|Repo)"
yum list installed *jdk-devel
</source>
</syntaxhighlight>


;실행예시 (설치됨)
{{소스헤더|실행예시 (설치됨)}}
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# yum info java*jdk-devel | egrep "(Name|Release|Repo)"
[root@zetawiki ~]# yum list installed *jdk-devel
Name      : java-1.6.0-openjdk-devel
Loaded plugins: fastestmirror
Release    : 1.25.1.10.6.el5_8
Loading mirror speeds from cached hostfile
Repo      : installed
* addons: centos.mirror.cdnetworks.com
Name      : java-1.6.0-openjdk-devel
* base: centos.mirror.cdnetworks.com
Release    : 1.30.1.11.5.el5
* extras: centos.mirror.cdnetworks.com
Repo      : base
* updates: mirror.yongbok.net
Name      : java-1.7.0-openjdk-devel
Installed Packages
Release    : 2.3.4.el5_9.1
java-1.6.0-openjdk-devel.i386                                                                      1:1.6.0.0-1.25.1.10.6.el5_8
Repo      : updates
</syntaxhighlight>
</source>
:→ java-1.6.0-openjdk-devel.i386 패키지가 설치되어 있음
:→ JDK 1.6.0 버전이 설치<ref>Repo : installed로 보임</ref>되어 있다. (1.7.0 버전으로 업데이트할 수 있다.)


;실행예시 (설치안됨)
{{소스헤더|실행예시 (설치안됨)}}
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# yum info java*jdk-devel | egrep "(Name|Release|Repo)"
[root@zetawiki ~]# yum list installed *jdk-devel
Name      : java-1.6.0-openjdk-devel
Loaded plugins: fastestmirror
Release    : 1.30.1.11.5.el5
Loading mirror speeds from cached hostfile
Repo      : Daum
Error: No matching Packages to list
Name      : java-1.7.0-openjdk-devel
</syntaxhighlight>
Release    : 2.3.3.el5.1
Repo      : Daum
</source>
:→ 설치된 것이 없음. 1.6.0이나 1.7.0 버전을 설치할  있음.


==같이 보기==
==같이 보기==
*[[리눅스 JRE 버전 확인]]
*[[리눅스 JDK 설치]]
*[[리눅스 JDK 설치]]
*[[윈도우에서 JDK 버전 확인하기]]
*[[윈도우에서 JDK 버전 확인하기]]
 
*[[리눅스 버전 확인]]
==주석==
<references/>


[[분류:리눅스]]
[[분류:리눅스]]
[[분류:JDK]]
[[분류:JDK]]
[[분류:버전 확인]]

2020년 11월 2일 (월) 02:50 기준 최신판

리눅스에 설치된 JDK 버전 확인하기
리눅스 JDK 설치 확인

1 방법 1: javac[ | ]

명령어
javac -version
실행예시 (설치됨)
[root@zetawiki ~]# javac -version
javac 1.6.0_22
실행예시 (설치안됨)
[root@zetawiki ~]# javac -version
-bash: javac: command not found

2 방법 2: rpm[ | ]

명령어
rpm -qa | grep jdk
실행예시 (설치됨)
[root@zetawiki ~]# rpm -qa | grep jdk
java-1.6.0-openjdk-devel-1.6.0.0-1.28.1.10.10.el5_8
java-1.6.0-openjdk-1.6.0.0-1.28.1.10.10.el5_8
실행예시 (설치안됨)
[root@zetawiki ~]# rpm -qa | grep jdk

3 방법 3: yum[ | ]

java-1.X.0-openjdk-devel 패키지가 설치되었는지 확인해보자.

명령어
yum list installed *jdk-devel
실행예시 (설치됨)
[root@zetawiki ~]# yum list installed *jdk-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: centos.mirror.cdnetworks.com
 * base: centos.mirror.cdnetworks.com
 * extras: centos.mirror.cdnetworks.com
 * updates: mirror.yongbok.net
Installed Packages
java-1.6.0-openjdk-devel.i386                                                                      1:1.6.0.0-1.25.1.10.6.el5_8
→ java-1.6.0-openjdk-devel.i386 패키지가 설치되어 있음
실행예시 (설치안됨)
[root@zetawiki ~]# yum list installed *jdk-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Error: No matching Packages to list

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}