Log of study session participation.
Java 9
| Java 9 Features | |
|---|---|
| Module System | jigsaw,Suitable for Cloud deployment, Docker, module-info.Defined in java | 
| The Modular JDK | |
| jShell | |
| Encapsulate Internal APIs | |
| jlink | tool, Linker can produce custom runtime image(Regular, JVM specific memory images, fast exec) | 
| Ahead of Time (AOT) Compilation | statically compile java classes,Static and dynamic compilation integration | 
| G1 Garbage Collector as the Default | Divide the heap space into fixed sizes, E, S,Mark O | 
Modularization method
module com.foo.bar{
  require com.foo.bar
  exports com.foo.bar
}
Modular Development
| Modularization is possible in each layer | 
|---|
| Modular Application | 
| Modular Link | 
| Modular JDK | 
| Accessibility | Java 9 Accessibility | 
|---|---|
| public | public to everyone | 
| public but only ... | |
| public only within a module | |
| protected | protected | 
| private | private | 
src/module-info.java
module hello.world{
exports com.example.hello; // Externally published packages requires java.base; }
| hello.world | 
|---|
| com.example.hello public | 
| (No concealed packages)hiding | 
Migrating from the top down
Third-party library dependencies -> Extract dependencies with the jdeps command
Automatic Modules Auto-modular (when you want to use a third-party lib for modularization) JAR file name is module name Publish everything
    module hello.world{
      exports com.example.hello to myapp;
requires java.base; // added by default requires jackson-core; opens com.myapp.domain to jackson.databind // Behavior only when using reflection
        uses javax.print.PrintServiceLookup
      }
      module printlib{
        provides javax.print.PrintServiceLookup with groovy.backend.CodeEvaluatetionEngineFactory;
      }
JDK layout assumptions Directory change, rt.jar
Class loader assumptions Class load order
System property changes
Reference material JEP 261
Avoiding module circular dependencies
httpClient.java (depends on logging.api) | > loging.apis interface LogSPI < | logging.impl (depends on logging.api) class HTTPLogger implements LogSPI
| Java Future | The future of Java | 
|---|---|
| uniform model | object, Array, value, types, methods | 
| post-threaded | Confined/immutable data | 
| Data Layout | Codes like a class, works like an int! | 
Data Layout
class Point {
  final int x;
  final int y;
}
 Point[] pts = |x|y|x|y|x|y|I want to make it an image of
now,|x|y| |x|y| |x|y|Image with a gap like Less efficient with GC
Java EE 8
| Java EE 8 | |
|---|---|
| JAX-RX2.1 | |
| Servlet 4.0 | HTTP/2 performance, server push | 
| JSON-B 1.0 | JSON <-> Java binding | 
| JSON-P 1.1 | |
| CDI 2.0 | |
| Bean Validation | |
| JSF 2.3 | |
| Security 1.0 | 
Deep Learning
deepleaning4j
Recommended Posts