컴퓨터 엑셀 워드 포토샵 구글어스 WINDOWS JAVASCRIPT JAVA C++

 
Sunday, September 17, 2006

[자바] 자바가상머신/자바컴파일러 버전 도움말 옵션 보기 - java.exe javac.exe Version


자바 버전 출력


우선 JRE 를 설치해야 하고, 자바프로그래밍을 한다면 JDK도 설치해야 합니다. (▶▶ [Java] 자바 런타임과 JDK(개발도구; 컴파일러) 파일 다운로드하는 곳은? / 자바의 종류는? [QnA] 참고)


도스창(명령 프롬프트)에서,
java -version
이라고 하면, 자바가상머신의 버전이 나옵니다. (java.exe 는 정확하게 말하자면, 자바 실행기 즉 Java Application Launcher 입니다.)

javac -version
이라고 하면, 자바 컴파일러의 버전이 나옵니다. (JDK를 설치해야 javac가 있습니다.)

다음 화면과 같습니다. "1.5.0_08" 이라는 버전이 나오는데, 자바 버전은 1.5 이고, 8번째 업데이트라는 뜻입니다. (자바 1.5는 자바 5.0이라고도 불립니다.)

D:\Z>java -version
java version "1.5.0_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)

D:\Z>javac -version
javac 1.5.0_08
javac: no source files
Usage: javac <options> <source files>
where possible options include:
  -g                         Generate all debugging info
  -g:none                    Generate no debugging info
  -g:{lines,vars,source}     Generate only some debugging info
  -nowarn                    Generate no warnings
  -verbose                   Output messages about what the compiler is doing
  -deprecation               Output source locations where deprecated APIs are u
sed
  -classpath <path>          Specify where to find user class files
  -cp <path>                 Specify where to find user class files
  -sourcepath <path>         Specify where to find input source files
  -bootclasspath <path>      Override location of bootstrap class files
  -extdirs <dirs>            Override location of installed extensions
  -endorseddirs <dirs>       Override location of endorsed standards path
  -d <directory>             Specify where to place generated class files
  -encoding <encoding>       Specify character encoding used by source files
  -source <release>          Provide source compatibility with specified release

  -target <release>          Generate class files for specific VM version
  -version                   Version information
  -help                      Print a synopsis of standard options
  -X                         Print a synopsis of nonstandard options
  -J<flag>                   Pass <flag> directly to the runtime system


D:\Z>




자바 도움말(옵션) 출력


java -help
라고 하면, 자바 실행기의 도움말이 나옵니다.

javac -help
라고 하면, 자바 컴파일러의 도움말이 나옵니다.



도스 명령어들과 달리 /? 라는 옵션으로는 도움말이 나오지 않습니다.

☞ 자바

2 Comments:
At November 1, 2007 at 10:56 AM, Blogger Namo said...

-? 하면 됩니다. "/?에 대한 코멘트"

 
At November 1, 2007 at 12:16 PM, Blogger mwultong said...

좋은 정보 감사합니다.

^_^

 

Post a Comment

<< Home RSS 2.0 feed

구글 Google 에서 제공하는 무료 블로그 서비스인 블로거 Blogger 의 인터넷 주소는 www.blogger.com 입니다. Blogger 에 블로그를 만들면, blogspot.com 이라는 주소에 블로그가 생성됩니다.
블로그를 직접 방문하지 않고도 최신 게시물을 구독하려면 RSS 2.0 feed 주소를 리더기에 등록하시면 됩니다.
Previous Posts
Monthly Archives
Top