Icedtea and Icedtea-Web

Total Page:16

File Type:pdf, Size:1020Kb

Icedtea and Icedtea-Web IcedTea and IcedTea-Web Andrew Overholt Principal Software Engineer Red Hat Canada 2011-11-03 1 ● IcedTea Persistent index will always show current point ● OpenJDK vs JDK ● What? ● Who? ● Why? JavaOne Slide Template Title ● Future ● IcedTea-Web Agenda ● What? ● History ● Why? ● Features ● Future ● Questions This presentation is designed to be used with audio as a primary mode of content delivery. If you have downloaded it, see notes section for rough notes on applicable slides (draft quality). For pdf, it should be at the end of the slide deck. OpenJDK vs JDK ● IcedTea ● OpenJDK vs JDK ● Deployment tools ● What? ● Serviceability tools ● Who? ● Why? ● HotSpot Virtual machine ● Future ● Interpreter ● JIT compiler ● IcedTea-Web JDK ● What? ● Tools (javac, javadoc, etc.) ● History OpenJDK ● Why? ● Class libraries ● Features Closed ● ● Future Public API 95%+ 5%+ ● Questions + Last heard, for OpenJDK7 and JDK7 What is IcedTea? ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? …... ● Future ● IcedTea-Web ● What? ● History ● Why? ● Features IcedTea ● Future ● Questions Image sources: http://www.openclipart.org/detail/22436 http://www.openclipart.org/detail/22712 Some of the users... ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Future ● IcedTea-Web ● What? ● History ● Why? (IcedTea-Web only) ● Features ● Future ● Questions Some of the contributors... ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Future ● IcedTea-Web ● What? ● History ● Why? (IcedTea-Web only) ● Features ● Future (Indirectly through OpenJDK) ● Questions All logos are copyright by their respective owners Why was IcedTea created? ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Future ● IcedTea-Web Build ● What? ● History ● Why? ● Features (For the first release...) ● Future ● Questions Image sources: http://www.openclipart.org/detail/30223 To fix the build... ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Future ● IcedTea-Web ● What? Build ● History ● Why? ● Features ● Future ● Questions Image sources: http://www.openclipart.org/detail/30217 To fill what's missing... ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Deployment tools ● Future ● IcedTea-Web Implemented independently ● What? ● Deployment tools ● History ● HotSpot Virtual machine ● Why? ● Interpreter ● Features ● JIT compiler JDK ● Future ● Tools (javac, javadoc, etc.) ● Questions ● Class libraries ... To back patch fixes... ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Deployment tools ● Future ● IcedTea-Web Implemented independently ● What? ● Deployment tools ● History ● HotSpot Virtual machine ● Why? ● Interpreter ● Features ● JIT compiler JDK ● Future ● Tools (javac, javadoc, etc.) ● Questions ● Class libraries ... To support additional architectures... ● IcedTea ● OpenJDK vs JDK ● What? ● Who? Shark/Zero ● Why? ● Deployment tools ● Future ● IcedTea-Web Implemented independently ● What? ● Deployment tools ● History ● HotSpot Virtual machine ● Why? ● Interpreter ● Features ● JIT compiler JDK ● Future ● Tools (javac, javadoc, etc.) ● Questions ● Class libraries ... Image sources: http://www.openclipart.org/detail/132973 To support additional tools... ● IcedTea ● OpenJDK vs JDK ● What? ● Who? Shark/Zero ● Why? ● Deployment tools ● Future ● IcedTea-Web Implemented independently ● What? ● Deployment tools ● History ● HotSpot Virtual machine ● Why? ● Interpreter ● Features ● JIT compiler JDK ● Future ● Tools (javac, javadoc, etc.) ● Questions ● Class libraries ... To keep OpenJDK6 up-to-date ● IcedTea ● OpenJDK vs JDK JDK6 (closed) ● What? ● Who? ● Why? JDK7 ● Future ● IcedTea-Web OpenJDK (7) ● What? ● History ● Why? OpenJDK6 ● Features ● Future ● Questions Proprietary Semi-open (Development in open + some proprietary patches) Open OpenJDK6 involvement ● IcedTea ● OpenJDK7 OpenJDK6 ● OpenJDK vs JDK ● What? ● Who? ● Majority of the OpenJDK6 commits are ● Why? backports ● Future ● IcedTea-Web ● Red Hat is the primary backporter ● What? ● History ● Why? ● Features ● Future ● Questions Co-ordinated security ● IcedTea ● OpenJDK vs JDK Update Patches Distros ● What? Public release planned sent notified ● Who? ● Why? JDK ● Future ● IcedTea-Web OpenJDK ● What? ● History IcedTea ● Why? ● Features ● Future Distros ● Questions Not in code base In code base, not public In code base, public All company logos are copyright by their respective owners Current structure ● IcedTea ● OpenJDK vs JDK ● What? hg.openjdk.java.net/hg/jdk6/jdk6-gate ● Who? ● Why? ● Future + patches, autotools, JamVM support, etc. ● IcedTea-Web ● What? IcedTea ● History ● Why? ● Features Use by distros ● Future ● Questions Future ● IcedTea ● OpenJDK vs JDK hg.openjdk.java.net/hg/jdkN/jdkN-gate ● What? ● Who? ● Why? + patches ● Future ● IcedTea-Web ● What? icedtea.classpath.org/hg/jdkN-gate ● History ● Why? ● Features + autotools, JamVM, Direct use by distros possible ● Future etc. ● Questions IcedTea Distros can also use IcedTea IcedTea-Web ● IcedTea ● OpenJDK vs JDK Web Browser Plug-in ● What? ● Who? ● Why? ● Future Web Start (javaws) ● IcedTea-Web ● What? ● History ● Why? ● Features Settings tool (itweb-settings) ● Future ● Questions Image sources: http://www.openclipart.org/detail/25999 http://www.openclipart.org/detail/86059 http://www.openclipart.org/detail/112249 Why is this needed? ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Future “this software may not be modified, decompiled or reverse engineered” ● IcedTea-Web ● What? - paraphrased from the BCL+ ● History ● Why? ● Features ● Future ● Questions + BCL is the Binary Code License under which the proprietary JDK is released Fully Open Source ● IcedTea ● OpenJDK vs JDK ● What? ● Who? LGPL ● Why? ● Future ● IcedTea-Web GPL ● What? ● History ● Why? + ● Features Classpath Exception ● Future ● Questions + GPL stands for GNU General Public License ++ LGPL stands for GNU Lesser General Public License Image source: http://www.gnu.org/graphics/official%20gnu.svg plug-in features ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Future ● IcedTea-Web JavaScript ● What? ● History ● Why? ● Features ● Future Full LiveConnect support (with testsuite to ensure adherence) ● Questions All logos are copyright by their respective owners. Other image sources: http://www.openclipart.org/detail/100267 plug-in features ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Future ● IcedTea-Web ● What? ● History ● Why? ● Features ● Future ● Questions ... (anything that supports NPAPI) ... Multi-browser support plug-in features ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Future ● IcedTea-Web ● What? ● History ● Why? ● Features … and any others where Shark/Zero will work ... ● Future ● Questions Extended architecture support All logos are copyright by their respective owners. plug-in features ● IcedTea ● OpenJDK vs JDK ● What? ● Who? JVM ● Why? ● Future Applet 1 Applet 2 …...... ● IcedTea-Web ● What? ● History Plug-in Thr. 1 Plug-in Thr. 2 …...... ● Why? ● Features Browser ● Future Single JVM design ● Questions 'javaws' features ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Future ● IcedTea-Web ● What? ● History ● Why? ● Features … and any others where Shark/Zero will work ... ● Future ● Questions Extended architecture support All logos are copyright by their respective owners 'javaws' features ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Future ● IcedTea-Web ● What? ● History ● Why? Headless (command-line) support ● Features ● Future ● Questions All logos are copyright by their respective owners. Other image sources: http://www.openclipart.org/detail/140431 'javaws' features ● IcedTea ● OpenJDK vs JDK Application Classloader ● What? ● Who? j1 policy j2 policy ● Why? j1.jar j2.jar ... ● Future ● IcedTea-Web ● What? ● History ● Why? JNLPSecurityManager ● Features ● Future ● Questions Application Per-jar policy, even with jnlp hrefs 'itweb-settings' features ● IcedTea ● OpenJDK vs JDK Certificate management ● What? ● Who? ● Why? ● Future Proxy configuration ● IcedTea-Web ● What? ● History Cache management ● Why? ● Features ● Future ● Questions Security configuration Image sources: http://www.openclipart.org/detail/25557 http://www.openclipart.org/detail/35311 http://www.openclipart.org/detail/152407 http://www.openclipart.org/detail/134449 Future ● IcedTea ● OpenJDK vs JDK ● Full LWJGL support ● What? ● Who? ● Why? ● JNLP_HREF support ● Future ● IcedTea-Web ● Per site security policies configurable via ● What? ● History GUI ● Why? ● Features ● Cache management improvements ● Future ● Questions Questions? ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why ? Contact: ● Future Name: Deepak Bhole ● IcedTea-Web Email: [email protected] ● What? IRC: dbhole on #openjdk on irc.oftc.net Blog: http://dbhole.wordpress.com ● History ● Why? IcedTea: http://icedtea.classpath.org/ ● Features IcedTea-Web: http://icedtea.classpath.org/wiki/IcedTea-Web ● Future ● Demos ● Questions .
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]
  • WEP12 Writing TINE Servers in Java
    Proceedings of PCaPAC2005, Hayama, Japan WRITING TINE SERVERS IN JAVA Philip Duval and Josef Wilgen Deutsches Elektronen Synchrotron /MST Abstract that the TINE protocol does not deal so much with ‘puts’ The TINE Control System [1] is used to some degree in and ‘gets’ as with data ‘links’. all accelerator facilities at DESY (Hamburg and Zeuthen) One’s first inclination when offering Java in the and plays a major role in HERA. It supports a wide Control System’s portfolio is to say that we don’t need to variety of platforms, which enables engineers and worry about a Java Server API since front-end servers machine physicists as well as professional programmers will always have to access their hardware and that is best to develop and integrate front-end server software into the left to code written in C. Furthermore, if there are real- control system using the operating system and platform of time requirements, Java would not be an acceptable their choice. User applications have largely been written platform owing to Java’s garbage collection kicking in at for Windows platforms (often in Visual Basic). In the next indeterminate intervals. generation of accelerators at DESY (PETRA III and Nevertheless, Java is a powerful language and offers VUV-FEL), it is planned to write the TINE user- numerous features and a wonderful framework for applications primarily in Java. Java control applications avoiding and catching nagging program errors. Thus have indeed enjoyed widespread acceptance within the there does in fact exist a strong desire to develop control controls community. The next step is then to offer Java as system servers using Java.
    [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]
  • A Post-Apocalyptic Sun.Misc.Unsafe World
    A Post-Apocalyptic sun.misc.Unsafe World http://www.superbwallpapers.com/fantasy/post-apocalyptic-tower-bridge-london-26546/ Chris Engelbert Twitter: @noctarius2k Jatumba! 2014, 2015, 2016, … Disclaimer This talk is not going to be negative! Disclaimer But certain things are highly speculative and APIs or ideas might change by tomorrow! sun.misc.Scissors http://www.underwhelmedcomic.com/wp-content/uploads/2012/03/runningdude.jpg sun.misc.Unsafe - What you (don’t) know sun.misc.Unsafe - What you (don’t) know • Internal class (sun.misc Package) sun.misc.Unsafe - What you (don’t) know • Internal class (sun.misc Package) sun.misc.Unsafe - What you (don’t) know • Internal class (sun.misc Package) • Used inside the JVM / JRE sun.misc.Unsafe - What you (don’t) know • Internal class (sun.misc Package) • Used inside the JVM / JRE // Unsafe mechanics private static final sun.misc.Unsafe U; private static final long QBASE; private static final long QLOCK; private static final int ABASE; private static final int ASHIFT; static { try { U = sun.misc.Unsafe.getUnsafe(); Class<?> k = WorkQueue.class; Class<?> ak = ForkJoinTask[].class; example: QBASE = U.objectFieldOffset (k.getDeclaredField("base")); java.util.concurrent.ForkJoinPool QLOCK = U.objectFieldOffset (k.getDeclaredField("qlock")); ABASE = U.arrayBaseOffset(ak); int scale = U.arrayIndexScale(ak); if ((scale & (scale - 1)) != 0) throw new Error("data type scale not a power of two"); ASHIFT = 31 - Integer.numberOfLeadingZeros(scale); } catch (Exception e) { throw new Error(e); } } } sun.misc.Unsafe
    [Show full text]
  • Free Java Developer Room
    Room: AW1.121 Free Java Developer Room Saturday 2008-02-23 14:00-15:00 Welcome to the Free Java Meeting Welcome and introduction to the projects, people and themes that make Rich Sands – Mark Reinhold – Mark up the Free Java Meeting at Fosdem. ~ GNU Classpath ~ OpenJDK Wielaard – Tom Marble 15:00-16:00 Mobile Java Take your freedom to the max! Make your Free Java mobile. Christian Thalinger - Guillaume ~ CACAO Embedded ~ PhoneME ~ Midpath Legris - Ray Gans 16:00-16:40 Women in Java Technology Female programmers are rare. Female Java programmers are even more Clara Ko - Linda van der Pal rare. ~ Duchess, Ladies in Java Break 17:00-17:30 Hacking OpenJDK & Friends Hear about directions in hacking Free Java from the front lines. Roman Kennke - Andrew Hughes ~ OpenJDK ~ BrandWeg ~ IcePick 17:30-19:00 VM Rumble, Porting and Architectures Dalibor Topic - Robert Lougher - There are lots of runtimes able to execute your java byte code. But which Peter Kessler - Ian Rogers - one is the best, coolest, smartest, easiest portable or just simply the most fun? ~ Kaffe ~ JamVM ~ HotSpot ~ JikesRVM ~ CACAO ~ ikvm ~ Zero- Christian Thalinger - Jeroen Frijters assembler Port ~ Mika - Gary Benson - Chris Gray Sunday 2008-02-24 9:00-10:00 Distro Rumble So which GNU/Linux distribution integrates java packages best? Find out Petteri Raty - Tom Fitzsimmons - during this distro shootout! ~ Gentoo ~ Fedora ~ Debian ~ Ubuntu Matthias Klose 10:00-11:30 The Free Java Factory OpenJDK and IcedTea, how are they made and how do you test them? David Herron - Lillian Angel - Tom ~ OpenJDK ~ IcedTea Fitzsimmons 11:30-13:00 JIT Session: Discussion Topics Dynamically Loaded Want to hear about -- or talk about -- something the Free Java world and don't see a topic on the agenda? This time is reserved for late binding Tom Marble discussion.
    [Show full text]
  • Fedora Core, Java™ and You
    Fedora Core, Java™ and You Gary Benson Software Engineer What is Java? The word ªJavaº is used to describe three things: The Java programming language The Java virtual machine The Java platform To support Java applications Fedora needs all three. What Fedora uses: GCJ and ECJ GCJ is the core of Fedora©s Java support: GCJ includes gcj, a compiler for the Java programming language. GCJ also has a runtime and class library, collectively called libgcj. The class library is separately known as GNU Classpath. ECJ is the Eclipse Compiler for Java: GCJ©s compiler gcj is not used for ªtraditionalº Java compilation. More on that later... Why libgcj? There are many free Java Virtual machines: Cacao, IKVM, JamVM, Jikes RVM, Kaffe, libgcj, Sable VM, ... There are two main reasons Fedora uses libgcj: Availability on many platforms. Ability to use precompiled native code. GNU Classpath Free core class library for Java virtual machines and compilers. The JPackage Project A collection of some 1,600 Java software packages for Linux: Distribution-agnostic RPM packages. Both runtimes/development kits and applications. Segregation between free and non-free packages. All free packages built entirely from source. Multiple runtimes/development kits may be installed. Fedora includes: JPackage-compatible runtime and development kit packages. A whole bunch of applications. JPackage JOnAS Fedora©s Java Compilers gcj can operate in several modes: Java source (.java) to Java bytecode (.class) Java source (.java) to native machine code (.o) Java bytecode (.class, .jar) to native machine code (.o) In Fedora: ECJ compiles Java source to bytecode. gcj compiles that bytecode to native machine code.
    [Show full text]
  • Towards Architectural Programming of Embedded Systems
    Towards Architectural Programming of Embedded Systems Arne Haber, Jan O. Ringert, Bernhard Rumpe Software Engineering, RWTH Aachen University, Germany http://www.se-rwth.de/ Abstract: Integrating architectural elements with a modern programming language is essential to ensure a smooth combination of architectural design and programming. In this position statement, we motivate a combination of architectural description for distributed, asynchronously communicating systems and Java as an example for such an integration. The result is an ordinary programming language, that exhibits archi- tecture, data structure and behavior within one view. Mappings or tracing between different views is unnecessary. A prototypical implementation of a compiler demon- strates the possibilities and challenges of architectural programming. 1 Java with Architectural Elements As stated in [MT00] there are a number of languages that support design, analysis, and further development of software-system-architectures. These languages are commonly known as Architecture Description Languages (ADL) and allow a high level description of software systems of a specific domain. Using an ADL enables reasoning about specific system properties in an early development stage [GMW97]. Furthermore, there are quite often mappings from architecture to a General Purpose Language (GPL), producing code frames for the GPL. This helps ensuring the architectural consistency initially, but when the code evolves the architecture becomes implicitly polluted or when the architecture shall be evolved this needs to be done on the code level. Tracing is therefore important to keep architecture and code aligned. However, it would be much better to integrate both, architecture and code into one single artifact such that tracing is not necessary anymore.
    [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 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]
  • Virtual Machines Due Date: 6/3 Demo Date: 6/4
    INF 212 Analysis of Programming Languages Project 8 – Virtual Machines Due date: 6/3 Demo date: 6/4 Goal: Get acquainted with a virtual machine. Similarly to the type checking homework, the concrete task in this homework is very simple, but it requires you to analyze and understand an existing Java VM implementation. The task is just a means to the end goal, and not the goal in itself. In process of achieving the goal, students with Windows machines will get the extra benefit of getting acquainted with another kind of virtual machine: an entire operating system virtual machine. For this one, you will not be looking inside, you will only install and use it. Students with Macs and Linux will not need this (and hence miss the opportunity to use it...). Description You will be using JamVM, an open source Java virtual machine (http://jamvm.sourceforge.net/). Start by downloading the latest release. In this project you will create new Opcodes for JamVM. Opcodes 248-255 are unused by JamVM and thus are the Opcodes that you will be adding additional functionality for. A testcase is provided for you (here). Since the compiler will not be aware of your new opcodes, you will need to edit your .class files manually using a binary/hex editor if you wish to create different test cases. The new opcodes will replace the IADD opcode during a standard arithmetic expression. For an expression x + y you need to replace the byte representing IADD (60 in hexadecimal) with the value of the new opcode.
    [Show full text]