CoreJava - Chapter 2: The java Programming Environment

2.1 Installing he Java Development Kit

  • Java Jargons
    • Java Development Kit (JDK): The software for programmers who want to write Java programs
    • Java Runtime Environment (JRE): The software for consumers who wnat to run Java programs
    • Server (JRE): The software for running Java program on servers
    • Standard Edition (SE): The Java platform for use on desktops and simple server applications
    • Enterprise Edition (EE): The Java platfrom for complex server applications
    • Micro Edition (ME): The Java platfrom for use on small devices
    • JavaFX: An alternate toolkit for graphical user interface that is incldued with certain Java SE distributions prior to Java 11
    • OpenJDK: A free and open soure implementation of Java SE
    • Java 2 (J2): An outdated term that described Java versions from 1998 util 2006
    • Software Development Kit (SDK): An outdated term that described the JDK from 1998 until 2006
    • Update (u): Oracle's term for a bug fix release up to Java 8
    • NetBeans: Oracle's integrated development environment
  • Setting up the JDK
    • On the Mac, it installs the sofware into /Library/Java/JavaVirtualMachines/jdk-11.0/Contents/Home

2.2 Using the Command-Line Tools

  • Compile and run your first java program through the terminal
    • javac Welcome.java
    • java Welcome
  • The javac program is the Java compiler. It compiles the file Welcome.java into the file Welcome.class
  • The java program launches the Java virtual machine. It executes the bytecodes that the compiler placed in the class file
  • Cautions
    • If you type in the program by hand, make sure you correlty enter the uppercase and lowercase letters, as case matters in Java
    • If you get a complaint about Welcome/java, it means you accidentally typed java Welcome.java. Reissue the command as java Welcome

2.3 Using an Integrated Development Environment

2.4 JShell

  • The JShell program provides a "read-evaluate-print" loop, or REPL. You type a Java expression; JShell evaluates your input, prints the result, and waits for your next input
  • Examples: "Core Java".length(), Math.PI, Math.[TAB] (to get avalable followings)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值