Installing the Java Development Kit

Total Page:16

File Type:pdf, Size:1020Kb

Installing the Java Development Kit 1 Installing the Java Development Kit If you run Windows, Linux or Solaris, then you can get the kit at the oracle.com website. Macintosh users have a few other possibilities. Java for Windows, Linux and Solaris As I write this chapter, the exact URL for downloading the Java Development Kit for Windows, Linux or Solaris is www.oracle.com/technetwork/java/javase/downloads. I don't expect that URL to work forever and ever, but if you visit oracle.com and poke around for Java, you'll certainly reach the Java Development Kit download page. One way or another, you should keep a few things in mind: * Java comes in three separate editions. A programming language is a bunch of rules describing the way you can write instructions for the computer to follow. An application programming interface (API) is a bunch of reusable code for performing common tasks in a particular language. (Another name for an API is a library.) There's only one Java language, but the Java language has three official APIs. When you download Java from oracle.com, you download some Java language tools and one of the three Java APIs. Taken together, the big bundle containing the language tools and one of the three APIs is called an edition. The three available editions are as follows: * Java Platform, Standard Edition (Java SE) The Standard Edition has code for anything you can imagine doing on a single desktop computer, and much more. This edition does text-handling, mathematical calculations, input/output, collections of objects, and much more. To create this book's examples, you want the Java Platform, Standard Edition. * Java Platform, Enterprise Edition (Java EE) The Enterprise Edition has code for things you do on an industrial- strength server. The edition includes web server tools, sophisticated database tools, messaging between servers and clients, management of systems, and the entire kitchen sink. * Java Platform, Micro Edition (Java ME) The Micro Edition has code for small devices, such as phones, TV set-top boxes, and Blu-ray players. This edition has limited capabilities that fit nicely into special-purpose devices that aren't as powerful as today's computers. © 2011 John Wiley & Sons, Inc. 2 <Remember> To develop this book's Java programs, you want the Java Platform, Standard Edition. If you already have Java's Enterprise Edition, and you don't want more stuff on your hard drive, the Enterprise Edition is okay. But the Enterprise Edition has much more than you need. * Java comes in several different versions, with several updates to each version. Java's version numbering demonstrates what can happen when the marketing department disrupts the timeline in the space-time continuum. Java's earliest releases were numbered "1.0." Next came version "1.1", then the strangely named "Java 2, version 1.2." The extraneous digit 2 hung around through "Java 2, version 1.3", "Java 2, version 1.4" and finally "Java 2, version 5.0." (The spontaneous jump from 1.4 to 5.0 was lots of fun.) Next up was "Java 6" (with no extra 2 and no ".0"). After that is Java 7. Each version is updated often, so a visit to oracle.com may offer Java SE 7 Update 13 for download. Any version of Java, starting with 5.0 and onward, is fine. Versions such as 1.4 are not sufficient. * Java has two kinds of downloads. When you visit oracle.com, you see two acronyms floating around. You see JRE (Java Runtime Environment) and JDK (Java Development Kit). The JRE has everything you need in order to run existing Java programs. Whether you know it or not, your desktop computer probably has a version of the JRE. The JDK has everything you need in order to run existing Java programs and everything you need in order to create new Java programs. The JDK has the entire JRE and more. The download that you want is the JDK, which includes the JRE. You do not want the JRE alone. <Remember> Download and install the Java JDK, not the Java JRE. * Java might come with other tools. A glance at the Java download page shows several options -- options to download Java with NetBeans, JavaFX, the Java source code, the Java SE documentation, and some other stuff. You might find the Java SE documentation helpful, especially if you don't want to repeatedly visit Oracle's online Java documentation. But the rest of the options (JavaFX and others) don't help with plain, old Java development. After you've downloaded the Java SE JDK, follow the instructions at oracle.com for installing the software. On Windows, you normally double- © 2011 John Wiley & Sons, Inc. 3 click a file with the .exe extension. On Linux, you install an .rpm file or run a self-extracting .bin file. (I've never met a Linux geek who didn't know what to do with these files.) Those pesky filename extensions On a Windows computer, the filenames displayed in My Computer or in Windows Explorer can be misleading. You may visit your Downloads directory and see the name jdk-7u13- windows-x64. Instead of just jdk-7u13-windows-x64, the file’s full name is jdk-7u13-windows- x64.exe. In other directories you may see two MyProgram files. What you don’t see is that one file’s real name is MyProgram.java, and the other file’s real name is MyProgram.class. The ugly truth is that My Computer and Windows Explorer can hide a file’s extensions. This awful feature tends to confuse people. So, if you don’t want to be confused, modify the Windows Hide Extensions feature. To do this, you have to open the Folder Options dialog box. Here’s how: * In Windows XP with the control panel’s default (category) view: Choose Start-->Control Panel-->Appearance and Themes-->Folder Options. * In Windows Vista or Windows 7 with the control panel’s default (category) view: Choose Start-->Control Panel-->Appearance and Personalization-->Folder Options. * In Windows XP, Windows Vista or Windows 7 with the control panel’s classic view: Choose Start-->Control Panel-->Folder Options. In the Folder Options dialog box, click the View tab. Then look for the Hide File Extensions For Known File Types option. Make sure that this check box is not selected. Java for Macintosh The first step is finding out if your system already has the Java Development Kit. You have two choices: * You can trust me on the subject of OS X version numbers. Macintosh OS X 10.5 (codenamed "Leopard") and OS X 10.6 (codenamed "Snow Leopard") have the Java Development Kit pre- installed. If you have either version of OS X (possibly with more dots in the version numbers, such as 10.6.4) then from the Java point of view, you're good to go. Macintosh OS X 10.7 (codenamed "Lion") comes without the Java Development Kit. In fact, no version of the Java Development Kit is formally blessed by Apple for OS X 10.7. So if you purchased OS X 10.7 thinking that you'd have the latest and the best, then you may have gotten the latest, but (depending on your needs) you may not have gotten the best. But don't despair. Instead, keep reading. If you don't trust me about OS X version numbers (and frankly, you shouldn't trust everything you find in print), you have another alternative: © 2011 John Wiley & Sons, Inc. 4 * You can perform tests on your development computer to discover the presence of a Java Development Kit, and of a development kit's version number. You have several choices for these tests. I list two choices in this chapter. Run Java Preferences to determine your JDK version Here's how you run the utility: 1. In the dock, select the Finder. A Finder window opens. 2. In the Finder window's sidebar, select Applications. A list of applications appears in the Finder window's main panel. 3. In the Finder window's main panel, double-click Utilities. A list of utilities appears in the Finder window's main panel. 4. In the list of utilities, look for a Java Preferences entry. If you don't find a Java Preferences entry, then don't fret (... not yet, anyway). You might still have a Java Development Kit. Skip to the test described in the next section. 5. If you have a Java Preferences entry, then double-click that entry. After an uncomfortable delay, your computer displays a window showing information about your computer's Java Development Kit. My Mac displays the name Java SE 6 (along with the more cryptic version number 1.6.0_22-b04-307). That's just fine. <Remember> To develop this book's sample progrems you need Java SE 5 (also known as version number 1.5.0) or higher. If the Java Preferences utility doesn't satisfy your needs, you can poke around in Macintosh's UNIX command window. The next session tells you how. Issue a Terminal command to determine your JDK version 1. In the Spotlight search field, type the word Terminal. 2. When Terminal shows up as the Spotlight's top hit, press Enter. A Terminal window opens (usually with plain black text on a plain white background). 3. In the Terminal window type the following text, and then press Enter: javac -version © 2011 John Wiley & Sons, Inc. 5 On my computer, the Terminal window responds with the following text: javac 1.6.0_22 If your computer responds with the number 1.5.0 or higher, then you can pop open the champagne and look forward to some good times developing Java programs.
Recommended publications
  • Introduction to Java
    Introduction to Java James Brucker What is Java? Java is a language for writing computer programs. it runs on almost any "computer". desktop mobile phones game box web server & web apps smart devices What Uses Java? OpenOffice & LibreOffice (like Microsoft Office) Firefox Google App Engine Android MindCraft & Greenfoot IDE: Eclipse, IntelliJ, NetBeans How Java Works: Compiling 1. You (programmer) write source code in Java. 2. A compiler (javac) checks the code and translates it into "byte code" for a "virtual machine". Java Java source Hello.java javac Hello.class byte code code compiler public class Hello { public Hello(); aload_0 public static void main( String [ ] args ) { invokespecial #1; //Method java/ System.out.println( "I LOVE programming" ); lang/Object."<init>":()V return } main(java.lang.String[]); } getstatic #2; //Field ... How Java Works: Run the Bytecode 3. Run the byte code in a Java Virtual Machine (JVM). 4. The JVM (java command) interprets the byte code and loads other code from libraries as needed. Java I LOVE programming byte Hello.class java code java virtual public Hello(); aload_0 machine invokespecial #1; //Method java/lang/Object."<init>":()V return main(java.lang.String[]); Other java classes, getstatic #2; //Field ... saved in libraries. Summary: How Java Works 1. You (programmer) write program source code in Java. 2. Java compiler checks the code and translates it into "byte code". 3. A Java virtual machine (JVM) runs the byte code. Libraries Hello, javac Hello.class java Hello.java World! Java compiler byte code JVM: Program source - load byte code execution program - verify the code - runs byte code - enforce security model How to Write Source Code? You can use any editor to write the Java source code.
    [Show full text]
  • Glassfish Server Open Source Edition 3.1 Installation Guide
    GlassFish Server Open Source Edition 3.1 Installation Guide Part No: 821–2453 Feburary 2011 Copyright © 2010, 2011, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related software documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are “commercial computer software” or “commercial technical data” pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms setforth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
    [Show full text]
  • Configuring & Using Apache Tomcat 4 a Tutorial on Installing and Using
    Configuring & Using Apache Tomcat 4 A Tutorial on Installing and Using Tomcat for Servlet and JSP Development Taken from Using-Tomcat-4 found on http://courses.coreservlets.com Following is a summary of installing and configuring Apache Tomcat 4 for use as a standalone Web server that supports servlets 2.3 and JSP 1.2. Integrating Tomcat as a plugin within the regular Apache server or a commercial Web server is more complicated (for details, see http://jakarta.apache.org/tomcat/tomcat-4.0-doc/). Integrating Tomcat with a regular Web server is valuable for a deployment scenario, but my goal here is to show how to use Tomcat as a development server on your desktop. Regardless of what deployment server you use, you'll want a standalone server on your desktop to use for development. (Note: Tomcat is sometimes referred to as Jakarta Tomcat since the Apache Java effort is known as "The Jakarta Project"). The examples here assume you are using Windows, but they can be easily adapted for Solaris, Linux, and other versions of Unix. I've gotten reports of successful use on MacOS X, but don't know the setup details. Except when I refer to specific Windows paths (e.g., C:\blah\blah), I use URL-style forward slashes for path separators (e.g., install_dir/webapps/ROOT). Adapt as necessary. The information here is adapted from More Servlets and JavaServer Pages from Sun Microsystems Press. For the book table of contents, index, source code, etc., please see http://www.moreservlets.com/. For information on servlet and JSP training courses (either at public venues or on-site at your company), please see http://courses.coreservlets.com.
    [Show full text]
  • Solutions to Exercises
    533 Appendix Solutions to Exercises Chapters 1 through 10 close with an “Exercises” section that tests your understanding of the chapter’s material through various exercises. Solutions to these exercises are presented in this appendix. Chapter 1: Getting Started with Java 1. Java is a language and a platform. The language is partly patterned after the C and C++ languages to shorten the learning curve for C/C++ developers. The platform consists of a virtual machine and associated execution environment. 2. A virtual machine is a software-based processor that presents its own instruction set. 3. The purpose of the Java compiler is to translate source code into instructions (and associated data) that are executed by the virtual machine. 4. The answer is true: a classfile’s instructions are commonly referred to as bytecode. 5. When the virtual machine’s interpreter learns that a sequence of bytecode instructions is being executed repeatedly, it informs the virtual machine’s Just In Time (JIT) compiler to compile these instructions into native code. 6. The Java platform promotes portability by providing an abstraction over the underlying platform. As a result, the same bytecode runs unchanged on Windows-based, Linux-based, Mac OS X–based, and other platforms. 7. The Java platform promotes security by providing a secure environment in which code executes. It accomplishes this task in part by using a bytecode verifier to make sure that the classfile’s bytecode is valid. 8. The answer is false: Java SE is the platform for developing applications and applets. 533 534 APPENDIX: Solutions to Exercises 9.
    [Show full text]
  • Apache Harmony Project Tim Ellison Geir Magnusson Jr
    The Apache Harmony Project Tim Ellison Geir Magnusson Jr. Apache Harmony Project http://harmony.apache.org TS-7820 2007 JavaOneSM Conference | Session TS-7820 | Goal of This Talk In the next 45 minutes you will... Learn about the motivations, current status, and future plans of the Apache Harmony project 2007 JavaOneSM Conference | Session TS-7820 | 2 Agenda Project History Development Model Modularity VM Interface How Are We Doing? Relevance in the Age of OpenJDK Summary 2007 JavaOneSM Conference | Session TS-7820 | 3 Agenda Project History Development Model Modularity VM Interface How Are We Doing? Relevance in the Age of OpenJDK Summary 2007 JavaOneSM Conference | Session TS-7820 | 4 Apache Harmony In the Beginning May 2005—founded in the Apache Incubator Primary Goals 1. Compatible, independent implementation of Java™ Platform, Standard Edition (Java SE platform) under the Apache License 2. Community-developed, modular architecture allowing sharing and independent innovation 3. Protect IP rights of ecosystem 2007 JavaOneSM Conference | Session TS-7820 | 5 Apache Harmony Early history: 2005 Broad community discussion • Technical issues • Legal and IP issues • Project governance issues Goal: Consolidation and Consensus 2007 JavaOneSM Conference | Session TS-7820 | 6 Early History Early history: 2005/2006 Initial Code Contributions • Three Virtual machines ● JCHEVM, BootVM, DRLVM • Class Libraries ● Core classes, VM interface, test cases ● Security, beans, regex, Swing, AWT ● RMI and math 2007 JavaOneSM Conference | Session TS-7820 |
    [Show full text]
  • Installing Open Java Development Kit – Ojdkbuild for Windows
    Installing Open Java Development Kit – ojdkbuild for Windows © IZUM, 2019 IZUM, COBISS, COMARC, COBIB, COLIB, CONOR, SICRIS, E-CRIS are registered trademarks owned by IZUM. CONTENTS 1 Introduction ......................................................................................................... 1 2 OpenJDK distribution .......................................................................................... 1 3 Removing Oracle Java ......................................................................................... 2 4 Installing OJDK – 32bit or 64bit, IcedTea Java .................................................. 3 5 Installing the COBISS3 interface ........................................................................ 7 6 Launching the COBISS3 interface .................................................................... 11 7 COBISS3 interface as a trusted source in IcedTea ojdkbuild ........................... 11 © IZUM, 16. 7. 2019, VOS-NA-EN-380, V1.0 i VOS Installing Open Java Development Kit – ojdkbuild for Windows 1 Introduction At the end of 2018 Oracle announced a new business policy for Java SE which entered into force in April 2019. That is why when you install Java a notification and warning window appears. All versions of Java from 8 u201 onwards not intended for personal use are payable. For this reason, we suggest you do not update Java 8 to a newer version for work purposes. If you want a newer version of Java 8, install OpenJDK 8 and IcedTea. Also, do not install Java 8 on new computers (clients), but install OpenJDK 8 with IcedTea support. 2 OpenJDK distribution OpenJDK 1.8. build for Windows and Linux is available at the link https://github.com/ojdkbuild/ojdkbuild. There you will find versions for the installation. The newest version is always at the top, example from 7 May 2019: © IZUM, 16. 7. 2019, VOS-NA-EN-380, V1.0 1/11 Installing Open Java Development Kit – ojdkbuild for Windows VOS 3 Removing Oracle Java First remove the Oracle Java 1.8 software in Control Panel, Programs and Features.
    [Show full text]
  • Java JDK Install Instructions
    Copyright 2013 – 2018+ by CompuScholar, Inc. Download and Installation Instructions for Java JDK Software for Windows Updated November 2018 The CompuScholar Java Programming and Android Programming courses use the Java Development Kit (JDK) software. This software is a free download specifically created for programming Java applications. This document will guide you through the download and installation procedure for setting up the JDK on your computer. This software is required for students in order to complete the course. Teachers who wish to view activity solutions or projects on their own computer are also encouraged to install this software. Changes to 3rd Party Websites 3rd parties such as Oracle, Inc. may change their websites without notice. Your download experience may not match the exact screen shots shown below in minor cosmetic ways. If you encounter significant changes, please contact us for updated instructions. Copyright Notices: Java, Java Development Kit (JDK) and related terms are all copyright by Oracle Corporation. Please see http://www.oracle.com for more details. This document is copyright by CompuScholar, Inc. This document may not be transmitted or reproduced without written permission except under terms of your purchased course license. http://www.compuscholar.com/ Page 1 Copyright 2013 – 2018+ by CompuScholar, Inc. Disclaimer: CompuScholar, Inc, and their officers and shareholders, assume no liability for damage to personal computers or loss of data residing on personal computers arising due to the use or misuse of this course material. Always follow instructions provided by the manufacturer of 3rd party programs that may be included or referenced by our courses. http://www.compuscholar.com/ Page 2 Copyright 2013 – 2018+ by CompuScholar, Inc.
    [Show full text]
  • Intro to Java
    Introduction to Java 1 / 10 Java I Developed for home appliances - cross-platform VM a key feature I Originally called Oak I Gained notariety with HotJava web browser that could run “programs over the internet” called applets I Gained popularity when Netscape included Java VM in Navigator web browser I JavaScript is purely a marketing label meant to capitalize on Java hype - there is no relationship between Java and JavaScript I Java is a general-purpose application programming language. I Java applets are now very rare. The bulk of Java code runs on (web) servers. 2 / 10 The Java Programming Language I Java is part of the C family. Same syntax for variable declarations, control structures I Java came at a time when C++ was king. C++ was a notoriously complex object-oriented extension to C. I Java improved on several key aspects of C++, greatly simplifying software development I Two most compelling features of Java were cross-platform deployablility (“write once, run anwhere”) and autoatic garbage collection I These two advantages, especially garbage collection, drove Java adoption 3 / 10 The Java Platform Three components of the Java platform: I The Java programming language I The Java Virtual Machine (JVM) I The Java standard library Java is both compiled and interpreted: I Java source files (ending in .java) are compiled to java bytecode files (ending in .class) I Java bytecode is then interpreted (run) by the JVM I Compiling and running can be done on different machines – bytecode is portable (more precisely, the JVM on each platform accepts the same bytecode).
    [Show full text]
  • Java Programming 24-Hour Trainer, Second Edition
    11 Introducing Java During the last two decades Java has maintained its status as one of the most popular programming languages for everything from programming games to creating mission-critical applications, such as those for trading on Wall Street or controlling Mars rovers. For the current popularity chart see the Tiobe Index at http:// www.tiobe.com/index.php/content/paperinfo/tpci/index.html. In this lesson you are intro‐ duced to some of the very basic Java terms. You also download and install the Java Development Kit (JDK) and compile your first program. WHY LEARN JAVA? The Java programming language was originally created in 1995 by James Gosling from Sun Microsystems (acquired by Oracle Corporation in 2010). The goal was to provide a simpler and platform-independent alter‐ native to C++. Java programs run inside the Java Virtual Machine (JVM), which is the same on every platform from the application programmer’s perspective. You find out what platform independence means a little later, in the section “The Life Cycle of a Java Program”. For now, let’s look at some of the reasons why Java can be your language of choice. Java is a general-purpose programming language that’s used in all industries for almost any type of application. If you master it, your chancesCOPYRIGHTED of getting employed as a software MATERIAL developer will be higher than if you specialize in some domain-specific programming languages. There are more than nine million professional Java developers in the world, and the majority of them are ready to share their knowledge by posting blogs and articles or simply answering technical questions online.
    [Show full text]
  • [1 ] Oracle Glassfish Server
    Oracle[1] GlassFish Server Release Notes Release 3.1.2 and 3.1.2.2 E24939-10 April 2015 These Release Notes provide late-breaking information about GlassFish Server 3.1.2 and 3.1.2.2 software and documentation. These Release Notes include summaries of supported hardware, operating environments, and JDK and JDBC/RDBMS requirements. Also included are a summary of new product features in the 3.1.2 and 3.1.2.2 releases, and descriptions and workarounds for known issues and limitations. Oracle GlassFish Server Release Notes, Release 3.1.2 and 3.1.2.2 E24939-10 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S.
    [Show full text]
  • Best Practices for Moving to Openjdk-10-18
    TECHNOLOGY WHITE PAPER Best Practices for Moving to OpenJDK Best Practices for Moving to OpenJDK Since Java SE 7, the OpenJDK has been the reference implementation (RI) of the Java SE standard, as dened by the relevant Java Specication Request (JSR). A project was also created for OpenJDK 6 to allow an open-source implementation of Java SE 6 to be built. Azul Systems is the project lead for OpenJDK 6. OpenJDK is licensed under the GNU Public License (GPL) version 2 with classpath exception (CPE). The CPE eliminates the viral nature of the GPL from affecting applications running on the OpenJDK. Changes to JDK Binary Distribution and Updates In September 2017, Oracle announced a series of changes to the way the JDK would be developed, This whitepaper explains what Zulu is and how to migrate distributed and updated. These changes can be applications from the Oracle JDK to the Zulu builds of summarized as follows: OpenJDK. • The release of the JDK has changed to a time-based model with two releases every year, in March and September. • Oracle has started to produce a second binary distribution of the JDK, built using only the OpenJDK Introduction source code. This is released under the GPLv2 with How the Java Development Kit (JDK) is delivered is classpath exception license, which is less restrictive changing, and these changes will impact many Java than the Oracle Binary Code License for Java SE users. From JDK 11 (to be released in September 2018) used for the Oracle JDK binary. it will no longer be possible to use the Oracle JDK in • From JDK 11, there are no functional differences production without a commercial support agreement.
    [Show full text]
  • 1 Compiling Java Programs
    CS 61B P. N. Hilfinger Basic Compilation: javac, gcc, g++ 1 Compiling Java Programs [The discussion in this section applies to Java 1.2 tools from Sun Microsystems. Tools from other manufac- turers and earlier tools from Sun differ in various details.] Programming languages do not exist in a vacuum; any actual programming done in any language one does within a programming environment that comprises the various programs, libraries, editors, debuggers, and other tools needed to actually convert program text into action. The Scheme environment that you used in CS61A was particularly simple. It provided a component called the reader, which read in Scheme-program text from files or command lines and converted it into internal Scheme data structures. Then a component called the interpreter operated on these translated pro- grams or statements, performing the actions they denoted. You probably weren’t much aware of the reader; it doesn’t amount to much because of Scheme’s very simple syntax. Java’s more complex syntax and its static type structure (as discussed in lecture) require that you be a bit more aware of the reader—or compiler, as it is called in the context of Java and most other “production” programming languages. The Java compiler supplied by Sun Microsystems is a program called javac on our systems. You first prepare programs in files (called source files) using any appropriate text editor (Emacs, for example), giving them names that end in ‘.java’. Next you compile them with the java compiler to create new, translated files, called class files, one for each class, with names ending in ‘.class’.
    [Show full text]