The Eclipse Openj9 JVM a Deep Dive! Tobi Ajila Tobi [email protected] Disclaimer

Total Page:16

File Type:pdf, Size:1020Kb

The Eclipse Openj9 JVM a Deep Dive! Tobi Ajila Tobi Ajila@Ca.Ibm.Com Disclaimer The Eclipse OpenJ9 JVM A deep dive! Tobi Ajila [email protected] Disclaimer • THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. • WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. • ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR INFRASTRUCTURE DIFFERENCES. • ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE. • IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE. • IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. • NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF: • - CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR SUPPLIERS AND/OR LICENSORS 2 About the speaker • Developer on the OpenJ9 VM team • Worked on: • VM support for Lambda expressions • Java multitenancy incubator • Project Panama experts group Tobi Ajila [email protected] 3 Agenda • What is a JVM? • What is OpenJ9? • How does OpenJ9 work? • What are some interesting features of OpenJ9? 4 5 Compiling a Java application Java source file Java class file JAVAC javac HelloWorld.java 6 Java Class File 7 Java bytecode Java source code Java bytecode JAVAC HelloWorld.class HelloWorld.java 8 kotlinc 9 Running a Java application HelloWorld. Java source file Java class file class JAVAC JAVA Java Runtime Environment Operatiing System javac HelloWorld.java java HelloWorld 10 Launching the jvm java HelloWorld // create the VM JNI_CreateJavaVM(JavaVM **p_vm, JNIEnv **env, . .) // find main class, ‘HelloWorld’ cls = (*env)->FindClass(env, . .); // get main(String[]…) method mid = (*env)->GetStaticMethodID(env, cls, . .); // call it! (*env)->CallStaticVoidMethod(env, cls, mid. .); //shutdown p_vm->DestroyJavaVM(); 11 The JRE Java Runtime Environment (JRE) Java Class Libraries Java Virtual Machine 12 The JRE Java Runtime Environment (JRE) Java Virtual Machine (JVM) Java Class Libraries JCL natives Java Virtual Machine 13 The JRE Java Runtime Environment (JRE) Java Virtual Machine (JVM) Java Class Libraries JCL natives Verifier Classloader Java Virtual Machine 14 The JRE Java Runtime Environment (JRE) Java Virtual Machine (JVM) Java Class Libraries JCL natives Verifier Classloader Interpreter + Garbage JIT collector Java Virtual Machine 15 The JRE Java Runtime Environment (JRE) Java Virtual Machine (JVM) Java Class Libraries JCL natives Verifier Classloader Interpreter + Garbage JIT collector Java Virtual Machine Port/Thread Library 16 Eclipse OpenJ9 Created Sept 2017 http://www.eclipse.org/openj9 https://github.com/eclipse/openj9 Dual License: Eclipse Public License v2.0 Apache 2.0 Users and contributors very welcome https://github.com/eclipse/openj9/blob/master/CONTRIBUTING.md 17 OpenJDK Java language Tools JDK UI Toolkits Base Libraries JRE JVM 18 Building OpenJDK with OpenJ9 OpenJDK OpenJDK Hotspot HotSpot 19 Building OpenJDK with OpenJ9 $ git clone https://github.com/ibmruntimes/openj9-openjdk-jdk9 $ cd openj9-openjdk-jdk9 $ bash ./get_source.sh $ bash ./configure --with-freemarker-jar=freemarker.jar $ make images $ cd build/linux-x86_64-normal-server-release/images/ $ ./jdk/bin/java -version Øhttps://www.eclipse.org/openj9/oj9_build.html 20 The place to get OpenJDK builds For both: • OpenJDK & • OpenJDK with Eclipse OpenJ9 https://adoptopenjdk.net/releases.html?va riant=openjdk9-openj9 21 How does OpenJ9 work? Java class libraries OpenJ9 Core JCL Core Java class libraries • Includes classes that are closely tied to the JCL Natives JVM implementation • These include Verifier Classloader j.l.Object, j.l.Class, j.l.Thread, … Interpreter RAS JIT GC Port/Thread Library 22 How does OpenJ9 work? Java class libraries Reliability, Availability and Serviceability (RAS) OpenJ9 Core JCL • Tools to simplify JVM and application debugging • Trace engine JCL Natives • Verification checking utilities Verifier Classloader Interpreter RAS JIT GC Port/Thread Library 23 OpenJ9 and OMR OpenJ9 VM Classloader Verifier JCL natives Interpreter JAVA RAS JAVA GC JAVA JIT OMR OMR GC OMR JIT OMR RAS Port/Thread Library 24 Eclipse OMR Created March 2016 http://www.eclipse.org/omr https://github.com/eclipse/omr https://developer.ibm.com/open/omr/ Dual License: Eclipse Public License v2.0 Apache 2.0 Users and contributors very welcome https://github.com/eclipse/omr/blob/master/CONTRIBUTING.md 25 OpenJ9: Classloading 26 OpenJ9: Classloading 27 OpenJ9: ROMClass • Keep all the symbolic info from a classfile • Remove variability (where possible) • Position independent: map anywhere in the address space • ROM: written once, only read after • Learn from the Smalltalk/Embedded past ROM Class 28 typedef struct J9ROMClass { U_32 romSize; U_32 singleScalarStaticCount; J9SRP className; J9SRP superclassName; J9ROMClass U_32 modifiers; U_32 extraModifiers; ROM U_32 interfaceCount; Constant pool J9SRP interfaces; U_32 romMethodCount; interfaces J9SRP romMethods; U_32 romFieldCount; J9ROMMethods J9SRP romFields; U_32 objectStaticCount; U_32 doubleScalarStaticCount; . U_32 ramConstantPoolCount; U_32 romConstantPoolCount; ... } J9ROMClass; 29 OpenJ9: Self relative pointers Address of slot + value = target address 0x20 0x20 0x28 0x28 0x30 0x50 0x30 0x20 0x38 0x38 0x40 0x40 0x48 0x48 0x50 0x50 0x58 0x58 0x60 0x60 0x30 + *(0x30) = 0x30 + 0x20 = 0x50 Regular pointer Self relative pointer 30 OpenJ9: Self relative pointers Need to update pointer 0x20 0x70 0x28 0x78 0x30 0x50 0x80 0x50 0x38 0x88 0x40 New address space 0x90 0x48 0x98 0x50 0xA0 0x58 0xA8 0x60 0xB0 Regular pointer 31 OpenJ9: Self relative pointers 0x20 0x70 0x28 0x78 0x30 0x20 0x80 0x20 0x38 0x88 0x40 New address space 0x90 0x48 0x98 0x50 0xA0 0x58 0xA8 0x60 0xB0 self relative pointer 32 Java’s late bound… Isn’t it slow to resolve the fields / methods every time? public static void main(java.lang.String[]) 0 JBgetstatic 2 System.out LPrintStream; 3 JBldc 3 (java.lang.String) "HelloWorld” 5 JBinvokevirtual 4 PrintStream.println(LString;)V 8 JBreturn 33 OpenJ9: ROM to RAM ROMClass Load superclases J9RAMClass Load superinterfaces Calculate vtable Calculate field offsets https://github.com/eclipse/openj9/blob/master/runtime/vm/createramclass.cpp 34 OpenJ9: RamClass typedef struct J9Class { UDATA eyecatcher; struct J9ROMClass* romClass; struct J9Class** superclasses; UDATA classDepthAndFlags; JIT VTable RAM struct J9ClassLoader* classLoader; Constant pool j9object_t classObject; UDATA volatile initializeStatus; struct J9Method* ramMethods; J9Class UDATA* ramStatics; struct J9Class* arrayClass; UDATA totalInstanceSize; VTable UDATA* instanceDescription; UDATA packageID; J9Methods void** iTable; void** jniIDs; struct J9Class* replacedClass; UDATA* ramConstantPool; . } J9Class; 35 OpenJ9: Classloading java.lang.Class java.lang.ClassLoader Heap Native J9ClassLoader ROMClass J9RAMClass 36 OpenJ9: Threading Heap java.lang.Thread java.lang.Thread java.lang.Thread Native J9JavaVM J9VMThread J9VMThread J9VMThread omrthread_t omrthread_t omrthread_t 37 OpenJ9: Threading • Cooperative threading model • Thread states • VM access • Exclusive access • Wait, Sleep, Blocked • Halted (exclusive) 38 • Written in C++ • Switch statement / computed goto • Executes: • bytecodes • INLs • builds stack frames • Transition to the JIT OpenJ9: Interpreter 39 OpenJ9: Interpreter state java.lang.Thread SP A0 PC Method J9VMThread omrthread_t 40 OpenJ9: Interpreter state java.lang.Thread SP A0 PC ROMMethod Method J9VMThread Bytecodes J9Method omrthread_t 41 OpenJ9: Interpreter state 0 Java stack Pending Frame Temps java.lang.Thread Args SP A0 PC ROMMethod Method J9VMThread Bytecodes J9Method omrthread_t 42 OpenJ9: Testarossa JIT 4 3 OpenJ9: Testarossa JIT compiler Profiler Interpreter Profile Info Sampling Thread Profile Manager Hardware counters JIT Profile Info 44 OpenJ9: Testarossa JIT compiler Profiler Interpreter Profile Info Runtime Environment/ Configuration Sampling Thread •Options Profile Manager •Object Model Hardware counters •Memory •Threading •Tracing JIT Profile Info 45 OpenJ9: Testarossa JIT compiler IL Generation Profiler Interpreter Profile Info Runtime Environment/ Configuration Sampling Thread •Options Profile Manager •Object Model Hardware counters •Memory •Threading •Tracing JIT Profile Info 46 ILGen a += b; iload a iload b iadd istore a iload a iload b isub bipush 2 imul istore a 47 ILGen a += b; iload a iload b iadd istore a iadd iload a istore a iload a iload b iload b isub bipush 2 imul istore a 48 ILGen a += b; iload a iload b iadd istore a iadd iload a istore a iload a iload b iload b isub bipush 2 imul istore a 49 IL Generator a += b; iload a iload b iadd treetop istore a iadd iload a istore a iload a iload b iload b isub bipush 2 imul istore a 50 IL Generator treetop treetop treetop treetop treetop treetop treetop treetop treetop treetop treetop 51 OpenJ9: Testarossa JIT compiler IL Generation Profiler Interpreter Profile Info Runtime Optimizer Environment/ cold warm hot very hot profiling scorching AOT FSD Configuration Analyses and Optimizations Sampling Thread •Options Profile Manager •Object Model Hardware counters •Memory •Threading •Tracing
Recommended publications
  • 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]
  • It's Always Sunny with Openj9
    It’s always sunny with OpenJ9 Dan Heidinga, Eclipse OpenJ9 Project Lead VM Architect, IBM Runtimes @danheidinga DanHeidinga 2 https://upload.wikimedia.org/wikipedia/commons/9/98/Storm_clouds.jpg cjohnson7 from Rochester, Minnesota / CC BY (https://creativecommons.org/licenses/by/2.0) My Day Job http://docs.oracle.com/javase/8/docs/index.html Eclipse OpenJ9 Created Sept 2017 http://www.eclipse.org/openj9 https://github.com/eclipse/openj9 Dual License: Eclipse Public License v2.0 Apache 2.0 Users and contributors very welcome https://github.com/eclipse/openj9/blob/master/CO NTRIBUTING.md 6 A JVM for the cloud 7 Built with the Class Libraries you know and love JDK JDK JDK JDK 8 11 14 next Single source stream at OpenJ9 No (LTS) JDK left behind! 8 Right, the cloud 9 Cloud requirements on Java ▪ Fast startup –Faster scaling for increased demand ▪ Small footprint –Improves density on servers –Improves cost for applications ▪ Quick / immediate rampup –GB/hr is key, if you run for less time you pay less money 10 OpenJ9 helps… … containers out of the box 11 Automatically detect if running in a container ▪ Based on the container limits: – Tune the GC Heap – Limit GC & active JIT threads – Constrain Runtime.availableProcessors() to cgroup quotas – Out of the box idle tuning 12 Avoid rebuilding containers just to adjust heap size ▪ -XX:InitialRAMPercentage=N – Set initial heap size as a percentage of total memory ▪ -XX:MaxRAMPercentage=N – Set maximum heap size as a percentage of total memory ▪ Running in containers with set memory limits? – OpenJ9
    [Show full text]
  • Solution Brief JVM Performance Monitoring
    Solution Brief Monitoring the Health & Performance of Java Virtual Machines (JVM) Total Performance Visibility JVM: The Cornerstone of Java Enterprise Applications The Java Virtual Machine (JVM) forms the core of the Java application architecture. It plays the crucial role of interpreting and translating Java byte code into operations on the host platform. Since Java middleware (application servers such as Tomcat, JBoss EAP, JBoss AS, WildFly, WebSphere, and WebLogic) runs on the JVM, a performance issue at the JVM level has a major impact on business services supported by it. Monitoring of the JVM must be an integral part of any Java application performance monitoring strategy. IT Ops and DevOps teams use JVM Key Benefits performance metrics to troubleshoot server-side bottlenecks. Developers and architects can also benefit from JVM monitoring by uncovering code- Proactively detect and resolve level issues. Java application problems to ensure high service uptime and business continuity Key JVM Performance Questions to Answer Troubleshoot faster: Real-time • Is there any runaway thread hogging the CPU? Which line of code is it alerts pinpoint the exact line executing, in which class, and which method? of code that is impacting Java • Is the JVM heap and non-heap memory sized correctly? applications • Are there any out-of-memory-exceptions or memory leaks? In-depth analytics enable architects to optimize Java • When does garbage collection happen, and how much memory is applications to scale and support freed up each time? additional users • Are there any thread deadlocks happening that are causing Single pane of glass to monitor application processing to be hung? everything Java—from application server, JVM and database, all the way down to server and storage End-to-End JVM Monitoring with eG Enterprise infrastructure eG Enterprise is a comprehensive performance monitoring, diagnosis and reporting solution for Java application infrastructures.
    [Show full text]
  • A Study of Cache Performance in Java Virtual Machines, the University of Texas at Austin, 2002
    Cache Performance in Java Virtual Machines: A Study of Constituent Phases Anand S. Rajan, Juan Rubio and Lizy K. John Laboratory for Computer Architecture Department of Electrical & Computer Engineering The University of Texas at Austin (arajan, jrubio,[email protected]) Abstract This paper studies the cache performance of Java programs in the interpreted and just-in- time (JIT) modes by analyzing memory reference traces of the SPECjvm98 applications with the Latte JVM. Specifically, we study the cache performance of the different components of the JVM (class loader, the execution engine and the garbage collector). Poor data cache performance in JITs is caused by code installation, and the data write miss rate can be as high as 70% in the execution engine. In addition, this code installation also causes deterioration in performance of the instruction cache during execution of translated code. We also believe that there is considerable interference between data accesses of the garbage collector and that of the compiler-translator execution engine of the JIT mode. We observe that the miss percentages in the garbage collection phase are of the order of 60% for the JIT mode; we believe that interference between data accesses of the garbage collector and the JIT execution engine lead to further deterioration of the data cache performance wherever the contribution of the garbage collector is significant. We observe that an increase in cache sizes does not substantially improve performance in the case of data cache writes, which is identified to be the principal performance bottleneck in JITs. 1 1. Introduction Java[1] is a widely used programming language due to the machine independent nature of bytecodes.
    [Show full text]
  • Oracle Utilities Testing Accelerator Licensing Information User Manual Release 6.0.0.3.0 F35952-01
    Oracle Utilities Testing Accelerator Licensing Information User Manual Release 6.0.0.3.0 F35952-01 June 2021 Oracle Utilities Testing Accelerator Licensing Information User Manual, Release 6.0.0.3.0 Copyright © 2019, 2021 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 embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or "commercial computer software documentation"
    [Show full text]
  • Java and C I CSE 351 Autumn 2016
    L26: JVM CSE351, Spring 2018 Java Virtual Machine CSE 351 Spring 2018 Model of a Computer “Showing the Weather” Pencil and Crayon on Paper Matai Feldacker-Grossman, Age 4 May 22, 2018 L26: JVM CSE351, Spring 2018 Roadmap C: Java: Memory & data Integers & floats car *c = malloc(sizeof(car)); Car c = new Car(); x86 assembly c->miles = 100; c.setMiles(100); c->gals = 17; c.setGals(17); Procedures & stacks float mpg = get_mpg(c); float mpg = Executables free(c); c.getMPG(); Arrays & structs Memory & caches Assembly get_mpg: Processes language: pushq %rbp Virtual memory movq %rsp, %rbp ... Memory allocation popq %rbp Java vs. C ret OS: Machine 0111010000011000 code: 100011010000010000000010 1000100111000010 110000011111101000011111 Computer system: 2 L26: JVM CSE351, Spring 2018 Implementing Programming Languages Many choices in how to implement programming models We’ve talked about compilation, can also interpret Interpreting languages has a long history . Lisp, an early programming language, was interpreted Interpreters are still in common use: . Python, Javascript, Ruby, Matlab, PHP, Perl, … Interpreter Your source code implementation Your source code Binary executable Interpreter binary Hardware Hardware 3 L26: JVM CSE351, Spring 2018 An Interpreter is a Program Execute (something close to) the source code directly Simpler/no compiler – less translation More transparent to debug – less translation Easier to run on different architectures – runs in a simulated environment that exists only inside the interpreter process . Just port the interpreter (program), not the program-intepreted Slower and harder to optimize 4 L26: JVM CSE351, Spring 2018 Interpreter vs. Compiler An aspect of a language implementation . A language can have multiple implementations . Some might be compilers and other interpreters “Compiled languages” vs.
    [Show full text]
  • Current State of EA and Its Uses in The
    Jfokus 2020 Current state of EA and Charlie Gracie Java Engineering Group at Microsoft its uses in the JVM Overview • Escape Analysis and Consuming Optimizations • Current State of Escape Analysis in JVM JITs • Escape Analysis and Allocation Elimination in Practice • Stack allocation 2 Escape Analysis and Consuming Optimizations 3 What is Escape Analysis? • Escape Analysis is a method for determining the dynamic scope of objects -- where in the program an object can be accessed. • Escape Analysis determines all the places where an object can be stored and whether the lifetime of the object can be proven to be restricted only to the current method and/or thread. 4 https://en.wikipedia.org/wiki/Escape_analysis Partial Escape Analysis • A variant of Escape Analysis which tracks object lifetime along different control flow paths of a method. • An object can be marked as not escaping along one path even though it escapes along a different path. 5 https://en.wikipedia.org/wiki/Escape_analysis EA Consuming Optimizations 1. Monitor elision • If an object does not escape the current method or thread, then operations can be performed on this object without synchronization 2. Stack allocation • If an object does not escape the current method, it may be allocated in stack memory instead of heap memory 3. Scalar replacement • Improvement to (2) by breaking an object up into its scalar parts which are just stored as locals 6 Current State of Escape Analysis in JVM JITs 7 HotSpot C2 EA and optimizations • Flow-insensitive1 implementation based on the
    [Show full text]
  • Java Virtual Machine Is a Virtual Machine, an Abstract Computer That Has Its Own ISA, Own Memory, Stack, Heap, Etc
    Java Virtual Machine i Java Virtual Machine About the Tutorial Java Virtual Machine is a virtual machine, an abstract computer that has its own ISA, own memory, stack, heap, etc. It is an engine that manages system memory and drives Java code or applications in run-time environment. It runs on the host Operating system and places its demands for resources to it. Audience This tutorial is designed for software professionals who want to run their Java code and other applications on any operating system or device, and to optimize and manage program memory. Prerequisites Before you start to learn this tutorial, we assume that you have a basic understanding of Java Programming. If you are new to these concepts, we suggest you to go through the Java programming tutorial first to get a hold on the topics mentioned in this tutorial. Copyright & Disclaimer Copyright 2019 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at [email protected] ii Java Virtual Machine Table of Contents About the Tutorial ..........................................................................................................................................
    [Show full text]
  • Java Virtual Machine Guide
    Java Platform, Standard Edition Java Virtual Machine Guide Release 14 F23572-02 May 2021 Java Platform, Standard Edition Java Virtual Machine Guide, Release 14 F23572-02 Copyright © 1993, 2021, Oracle and/or its affiliates. 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 embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or "commercial computer software documentation" pursuant to the applicable Federal Acquisition
    [Show full text]
  • UV Mapping Textures to Shapes
    Exploring JavaFX 8 Stephen Chin (@steveonjava) Java Technology Ambassador JavaOne Content Chair ♯jdt2014_A3 1 JavaFX Platform Immersive Application Experience • Cross-platform Animation, Video, Charting • Integrate Java, JavaScript, and HTML5 in the same application • New graphics stack takes advantage of hardware acceleration for 2D and 3D applications • Bidirectional integration with Swing applications using JFXPanel and SwingNode 2 How to Get JavaFX . Step 1: Download Java 8 3 How to Develop JavaFX Use Your Favorite IDE 4 Architecture of JavaFX 8 JavaFX Public API Quantum Toolkit Glass Media Web Prism WinTk Engine Engine Java2D Open GL D3D Java Virtual Machine 5 Package Your Application Applets, Web Start, and Native Packaging Good Better Best 6 New Features in JavaFX 8 7 Controls DatePicker . Allows selection of dates and ranges . Can use custom formats and calendars . Supports Cascading Style Sheets 9 TreeTableView . Combines a TreeView and a TableView . Optional menu for hiding and showing columns . Root can be hidden . Supports multiple selection . Supports CSS 10 New Modena UI Theme 11 12 Build Applications Visually JavaFX Scene Builder 2 13 14 Displaying HTML in JavaFX public class WebViewTest extends Application { public static void main(String[] args) { launch(WebViewTest.class, args); } @Override public void start(Stage stage) { WebView webView = new WebView(); webView.getEngine().load("http://google.com"); Scene scene = new Scene(webView); stage.setScene(scene); stage.setTitle("Web Test"); stage.show(); }} 15 Displaying HTML in JavaFX 16 Calling Javascript from JavaFX String script = "alert('We have got a message, Houston!');”; eng.executeScript(script); 17 JavaScript to Java Type Conversion JavaScript Java null null undefined “undefined” number java.lang.Number (Integer or Double) string java.lang.String boolean java.lang.Boolean object netscape.javascript.JSObject 18 Responding to Browser Events .
    [Show full text]
  • Tutorial I: STM in Managed Runtimes
    Schedule of IISWC Tutorials and Workshops Morning Session, September 29 (Saturday) Tutorial I: STM in Managed Runtimes The influential article "The Landscape of Parallel Computing Research: A View From Berkeley” suggests the only path toward significantly faster CPUs is chip multiprocessing. Programmers will simply have to adapt by writing concurrent code, regardless of any consequential problems with threads. An important trend in application development is that new applications are being developed based on a Managed Runtime Environment (MRTE) such as Java or .NET. These languages provide features such as garbage collection and dynamic class loading that require a managed runtime system (i.e. the Java Virtual Machine (JVM) for Java and .NET for C#). Software transactional memory (STM) promises to alleviate the difficulty of programming using conventional mechanisms such as locks in a threaded environment. In this tutorial we will describe the various mechanisms that are available for software developers to implement transactional applications in Managed Runtimes. We will then use a case study to delve into the workload characteristics when run under a Software Transactional memory system. The case study will be based on workloads and a runtime developed using the Apache Harmony Environment and the High Performance McRT (Multicore Runtime) STM. Apache Harmony (http://harmony.apache.org) is the open source Java SE implementation done under Apache License v2. McRT STM is a high performance runtime environment. The workloads we will characterize and demonstrate include simple micros as well as large multithreaded Java applications. Speakers: Suresh Srinivas is a Principal Engineer in the Software Solutions Group within Intel Corporation where he is currently focused on new technology development using open source technologies.
    [Show full text]
  • Java (Software Platform) from Wikipedia, the Free Encyclopedia Not to Be Confused with Javascript
    Java (software platform) From Wikipedia, the free encyclopedia Not to be confused with JavaScript. This article may require copy editing for grammar, style, cohesion, tone , or spelling. You can assist by editing it. (February 2016) Java (software platform) Dukesource125.gif The Java technology logo Original author(s) James Gosling, Sun Microsystems Developer(s) Oracle Corporation Initial release 23 January 1996; 20 years ago[1][2] Stable release 8 Update 73 (1.8.0_73) (February 5, 2016; 34 days ago) [±][3] Preview release 9 Build b90 (November 2, 2015; 4 months ago) [±][4] Written in Java, C++[5] Operating system Windows, Solaris, Linux, OS X[6] Platform Cross-platform Available in 30+ languages List of languages [show] Type Software platform License Freeware, mostly open-source,[8] with a few proprietary[9] compo nents[10] Website www.java.com Java is a set of computer software and specifications developed by Sun Microsyst ems, later acquired by Oracle Corporation, that provides a system for developing application software and deploying it in a cross-platform computing environment . Java is used in a wide variety of computing platforms from embedded devices an d mobile phones to enterprise servers and supercomputers. While less common, Jav a applets run in secure, sandboxed environments to provide many features of nati ve applications and can be embedded in HTML pages. Writing in the Java programming language is the primary way to produce code that will be deployed as byte code in a Java Virtual Machine (JVM); byte code compil ers are also available for other languages, including Ada, JavaScript, Python, a nd Ruby.
    [Show full text]