Jump to content

Java (programming language)

This is a fully translated article. Click here for more information.
From DawoumWiki, the free Mathematics self-learning
Java
ParadigmMulti-paradigm: generic, object-oriented (class-based), functional, imperative, reflective, concurrent
Designed byJames Gosling
DeveloperOracle Corporation
First appearedMay 23, 1995; 29 years ago (1995-05-23)[1]
Stable release
Java SE 17 / September 14, 2021; 2 years ago (2021-09-14)
Typing disciplineStatic, strong, safe, nominative, manifest
Filename extensions.java, .class, .jar, .jmod
Websiteoracle.com/java/, www.java.com
Influenced by
CLU,[2] Simula67,[2] Lisp,[2] Smalltalk,[2] Ada 83, C++,[3] C#,[4] Eiffel,[5] Mesa,[6] Modula-3,[7] Oberon,[8] Objective-C,[9] UCSD Pascal,[10][11] Object Pascal[12]
Influenced
Ada 2005, BeanShell, C#, Chapel,[13] Clojure, ECMAScript, Fantom, Gambas,[14] Groovy, Hack,[15] Haxe, J#, Kotlin, PHP, Python, Scala, Seed7, Vala, JavaScript, JS++

Java는 가능한 한 적은 구현 종속성을 갖도록 설계된 높은-수준 클래스-기반 객체-지향 프로그래밍 언어입니다. 그것은 프로그래머에게 한번 작성하고, 어디에서나 실행 (WORA)을 허용하려는 의도된 일반적인-목적 프로그래밍 언어로,[16] 컴파일된 Java 코드가 재컴파일될 필요없이 Java를 지원하는 모든 플랫폼에서 실행될 수 있음을 의미합니다.[17] Java 응용 프로그램은 전형적으로 놓여있는 컴퓨터 아키텍처에 관계없이 임의의 자바 가상 기계 (JVM)에서 실행될 수 있는 |바이트코드로 컴파일됩니다. Java의 구문CC++와 유사하지만, 둘 중 어떤 것보다 더 적은 낮은-수준 기능을 가집니다. Java 런타임은 전형적으로 기존의 컴파일된 언어에서 사용할 수 없는 동적 능력 (예를 들어, 리플렉션과 런타임 코드 수정)을 제공합니다. 2019년 당시, Java는 GitHub에 따르면 특히 클라이언트-서버응용-프로그램사용되는 가장 인기 있는 프로그래밍 언어 중 하나였으며,[18][19] 보고된 9백만 명의 개발자를 가집니다.[20]

Java는 원래 Sun MicrosystemsJames Gosling에 의해 개발되었고 1995년 5월 Sun Microsystems Java 플랫폼의 핵심 구성 요소로 출시되었습니다. 원래 및 참조 구현 Java 컴파일러, 가상 기계, 및 클래스 라이브러리는 원래 독점 라이센스 아래에서 Sun에 의해 출시되었습니다. 2007년 5월 당시, Sun은 Java Community Process의 사양에 따라 대부분의 Java 기술을 GPL-2.0-전용 라이센스 아래에서 재라이선스했습니다. Oracle은 자체 HotSpot 자바 가상 기계를 제공하며, 어쨌든 공식 참조 구현은 자유 오픈-소스 소프트웨어이고 대부분의 개발자가 사용하고 거의 모든 리눅스 배포판의 기본 JVM인 OpenJDK JVM입니다.

2022년 3월 기준, Java 18이 최신 버전이고 Java 17, 11, 및 8이 현재 장기 지원 (LTS) 버전입니다. 오라클은 2019년 1월에 상업용으로 레거시 버전 Java 8 LTS에 대한 마지막 무료 공개 업데이트를 출시했지만, 그렇지 않으면 여전히 개인용 공개 업데이트와 함께 Java 8을 무기한 지원하게 될 것입니다. 다른 공급업체는 여전히 보안과 기타 업그레이드를 받고 있는 OpenJDK 8과 11의 영-비용 빌드를 제공하기 시작했습니다.

오라클 (및 다른 업체)은 이전 버전의 해결되지 않은 보안 문제로 인해 오래되고 지원되지 않는 Java 버전을 제거할 것을 적극 권장합니다.[21] 오라클은 사용자에게 LTS 버전 (8, 11, 17) 중 하나와 같은 지원되는 버전으로 즉시 전환할 것을 권장합니다.

Installations

보통 저장소에서 설치할 수 있습니다:

  • sudo apt install openjdk-8-jre-headless
  • sudo apt install openjdk-11-jre-headless

간혹, 특정 배포판에서 지원하지 않는 버전을 시스템에 설치할 필요가 있습니다:

데비안 12부터 버전 8과 11을 지원하지 않지만, 여전히 자바 8, 11은 시드 버전이 있으므로, 이를 컴파일해서 설치할 수 있습니다. 반드시 버전 8이 필요할 경우에는 이 정보에 따라 설치를 시도할 수 있습니다. 버전 8에 관한 데비안 시드 정보도 얻을 수 있습니다.

from Oracle Java

먼저 시스템에 설치된 자바 버전을 확인하십시오:

  • sudo update-alternatives --config java

만약 0번의 하나가 설치되어 있으면 아래와 같이 진행하십시오:

Oracle jre 다운로드 페이지에서 최근 버전을 받습니다:

  • sudo mkdir -p /usr/lib/jvm/
  • sudo tar -zxvf jre-8u301-linux-x64.tar.gz -C /usr/lib/jvm/
  • sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.8.*/bin/java 1
  • sudo update-alternatives --config java
Priority 1번을 선택하십시오.
  • java -version
정확한 버전이 선택되었는지 확인을 하십시오.

Configurations

JAVA_HOME
개별적은 프로그램에서 설정할 수 있지만, 시스템 전체에 걸쳐 /etc/profile 파일에 적을 수 있습니다:
  • JAVA_HOME=/usr/lib/jvm/jre1.8.0_333/
JVM options
해당되는 버전에서 파일을 찾을 수 있습니다:
  • dpkg -l | grep openjdk
  • dpkg -L openjdk-8-jre-headless | grep jvm.cfg
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jvm.cfg-default
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jvm.cfg
이 파일은 설정 디렉토리 내부에서 볼 수 있습니다:
  • ls /etc/java-8-openjdk/jvm-amd64.cfg
현재 옵션 확인 방법은 다음입니다:
  • java -XX:+PrintFlagsFinal -version | grep -iE 'HeapSize|PermSize|ThreadStackSize'
전체를 다 보고 싶으면,
  • ps aux | grep "java"
Version change
  • sudo update-alternatives --config java

See also

Comparison of Java with other languages

References

  1. ^ Binstock, Andrew (May 20, 2015). "Java's 20 Years of Innovation". Forbes. Archived from the original on March 14, 2016. Retrieved March 18, 2016.
  2. ^ a b c d Barbara Liskov with John Guttag (2000). Program Development in Java - Abstraction, Specification, and Object-Oriented Design. USA, Addison Wesley. ISBN 9780201657685.
  3. ^ Chaudhary, Harry H. (2014-07-28). "Cracking The Java Programming Interview :: 2000+ Java Interview Que/Ans". Retrieved 2016-05-29.
  4. ^ Java 5.0 added several new language features (the enhanced for loop, autoboxing, varargs and annotations), after they were introduced in the similar (and competing) C# language. [1] Archived March 19, 2011, at the Wayback Machine [2] Archived January 7, 2006, at the Wayback Machine
  5. ^ Gosling, James; McGilton, Henry (May 1996). "The Java Language Environment". Archived from the original on May 6, 2014. Retrieved May 6, 2014.
  6. ^ Gosling, James; Joy, Bill; Steele, Guy; Bracha, Gilad. "The Java Language Specification, 2nd Edition". Archived from the original on August 5, 2011. Retrieved February 8, 2008.
  7. ^ "The A-Z of Programming Languages: Modula-3". Computerworld.com.au. Archived from the original on January 5, 2009. Retrieved June 9, 2010.
  8. ^ Niklaus Wirth stated on a number of public occasions, e.g. in a lecture at the Polytechnic Museum, Moscow in September 2005 (several independent first-hand accounts in Russian exist, e.g. one with an audio recording: Filippova, Elena (September 22, 2005). "Niklaus Wirth's lecture at the Polytechnic Museum in Moscow". Archived from the original on December 1, 2020. Retrieved November 20, 2011.), that the Sun Java design team licensed the Oberon compiler sources a number of years prior to the release of Java and examined it: a (relative) compactness, type safety, garbage collection, no multiple inheritance for classes – all these key overall design features are shared by Java and Oberon.
  9. ^ Patrick Naughton cites Objective-C as a strong influence on the design of the Java programming language, stating that notable direct derivatives include Java interfaces (derived from Objective-C's protocol) and primitive wrapper classes. [3] Archived July 13, 2011, at the Wayback Machine
  10. ^ TechMetrix Research (1999). "History of Java" (PDF). Java Application Servers Report. Archived from the original (PDF) on December 29, 2010. The project went ahead under the name green and the language was based on an old model of UCSD Pascal, which makes it possible to generate interpretive code.
  11. ^ "A Conversation with James Gosling – ACM Queue". Queue.acm.org. August 31, 2004. Archived from the original on July 16, 2015. Retrieved June 9, 2010.
  12. ^ In the summer of 1996, Sun was designing the precursor to what is now the event model of the AWT and the JavaBeans component architecture. Borland contributed greatly to this process. We looked very carefully at Delphi Object Pascal and built a working prototype of bound method references in order to understand their interaction with the Java programming language and its APIs.White Paper About Microsoft's Delegates
  13. ^ "Chapel spec (Acknowledgements)" (PDF). Cray Inc. October 1, 2015. Archived (PDF) from the original on February 5, 2016. Retrieved January 14, 2016.
  14. ^ "Gambas Documentation Introduction". Gambas Website. Archived from the original on October 9, 2017. Retrieved October 9, 2017.
  15. ^ "Facebook Q&A: Hack brings static typing to PHP world". InfoWorld. March 26, 2014. Archived from the original on February 13, 2015. Retrieved January 11, 2015.
  16. ^ "Write once, run anywhere?". Computer Weekly. May 2, 2002. Archived from the original on August 13, 2021. Retrieved 2009-07-27.
  17. ^ "1.2 Design Goals of the Java™ Programming Language". Oracle. January 1, 1999. Archived from the original on January 23, 2013. Retrieved January 14, 2013.
  18. ^ McMillan, Robert (August 1, 2013). "Is Java Losing Its Mojo?". wired.com. Archived from the original on February 15, 2017. Retrieved March 8, 2017. Java is on the wane, at least according to one outfit that keeps on eye on the ever-changing world of computer programming languages. For more than a decade, it has dominated the TIOBE Programming Community Index, and is back on top – a snapshot of software developer enthusiasm that looks at things like internet search results to measure how much buzz different languages have. But lately, Java has been slipping.
  19. ^ Chan, Rosalie (January 22, 2019). "The 10 most popular programming languages, according to the 'Facebook for programmers'". Business Insider. Archived from the original on June 29, 2019. Retrieved June 29, 2019.
  20. ^ "JavaOne 2013 Review: Java Takes on the Internet of Things". www.oracle.com. Archived from the original on April 19, 2016. Retrieved June 19, 2016. Alt URL
  21. ^ "Why should I uninstall older versions of Java from my system?". Oracle. Archived from the original on February 12, 2018. Retrieved 2021-09-24.

Works cited

External links