JVM, byte codes & jvm languages

download JVM, byte codes & jvm languages

of 12

  • date post

    15-Jan-2015
  • Category

    Technology

  • view

    1.135
  • download

    4

Embed Size (px)

description

 

Transcript of JVM, byte codes & jvm languages

  • 1. JVM, Byte Codes & Languages

2. Agenda

  • The Java Virtual Machine
    • Architecture neutral
    • Interpreted and Dynamic
    • Secure
    • Multithreading
    • Implementations
  • Byte Code Manipulation
  • New Language and DSL

3. JVM: Architecture Neutral

  • Byte codes
  • Portable
  • Robust

4. JVM : Interpreted and Dynamic

  • Dynamic Loading and Binding
    • The Fragile Superclass Problem
    • Solving the Fragile Superclass Problem
    • Run-time Representations

5. JVM : Secure

  • Memory Allocation and Layout
  • Security Checks in the Class Loader
  • The Byte Code Verification Process

Bootstrap + Extension System Java Application Bootstrap + Extension System Tomcat Application Common/Shared Web App A Web App B 6. JVM : Multithreading

  • Threads at the Java Language Level
  • Integrated Thread Synchronization

7. JVM : Implementations

  • Java Virtual Machine Reference Implementation (Oracle)
  • Open SDK (Oracle)
  • JRockit (Oracle)
  • Apache Harmony (Apache)
  • IBM JVM (IBM)
  • Zing (Azul System)
  • The Da Vinci Machine (Java 7/8, Oracle)

8. Byte Code Manipulation

  • Low Level API
    • ASM (ObjectWeb)
    • Javassist (JBoss)
    • BCEL (Apache)
  • High Level API
    • CGLib
    • The Compiler API (Java 6)
    • AOP: Aspect J, java.lang.reflect.Proxy

9. Byte Code Manipulation: Hooks

  • ClassLoader
  • java.lang.instrument: Java Agent, premain method, ClassFileTransformer.

10. New Language and DSL

  • New Languages
    • Clojure, Groovy, Scala, JRuby, Jython, Rhino, Ceylon, Kotlin
  • Domain-Specific Language
    • HQL, JPQL
    • Drools
    • Custom

11. New Language and DSL: Implementation

  • Write a parser/compiler/interpreter with:
    • ANTLR, JavaCC, xText, Parboiled
  • Write a AST (Abstract Syntax Tree) for:
    • Analysis and error reporting
    • Transform the AST to one target platform (SQL, Java Source Code, Byte Code).

12. Questions?