SlideShare a Scribd company logo
Java SE 7,
そして Java SE 8
           Java in the Box
                 櫻庭 祐一
Agenda      History
          Java SE 7
          Java SE 8
         Conclusion
History
04                         05              06                               07                        08                       09                  10
                                                                                                  OpenJDK                           SE6u10   Sun 買収                            Plan A
                       6と7は    J2SE5.0                                       Java SE6
General                                                                                                                             リリース                                       Plan B
                       一緒に計画   リリース                                          リリース
                                                                                                        JavaFX 発表
             G.Hamiltion                                                                 M.Reinhold                                                                   M.Reinhold

                                         friend         JSR294Superpackage                                                                   Jigsaw
Modularity
             JAR の拡張                     NewPackaging   JSR277JAM                                                     JSR277Module
                                         Closure                              BGGA                    Closure            Closure                        Lambda
Parallel
                                                                              N.Gafter                                                       JSR166y
                                         NIO2                                            NIO2                       NIO2                     NIO2
                                                        JSR296SAF                        JSR296SAF                         SmallChanges      Coin
EoD                                                     JSR295BeansBinding               JSR295BeansBinding
                                                                                         JSR303BeanValidation
                                                                                         JSR308Annotation                                    JSR308Annotation
Misc         JSR121                      NewBytecode    JSR292                           JSR292                     JSR292                   JSR292
             Isolation                   XML リテラル                                        JSR310DateTime                                      JSR310DateTime
                                         BeanShell                                       BeanShell                  JMX2.0
7
                      Project Coin

            plan A    NIO.2
                      InvokeDynamic
                      Fork/Join Framework
                      Project Lambda
Mid 2012
                      Project Jigsaw




 7
           Project Coin
           NIO.2

            plan B
                                   8
           InvokeDynamic
           Fork/Join Framework
Mid 2011
                Project Lambda
                 Project Jigsaw
                                  Late 2012
7
                      Project Coin

            plan A    NIO.2
                      InvokeDynamic
                      Fork/Join Framework
                      Project Lambda
Mid 2012
                      Project Jigsaw




 7
           Project Coin
           NIO.2

            plan B
                                  8
           InvokeDynamic
           Fork/Join Framework
Mid 2011
                Project Lambda
                 Project Jigsaw
                              Late 2012
                            Mid 2013
Project Coin
         switch 文で文字列
         2 進数と区切り文字
         例外の multi catch
                  と safe rethrow
         ジェネリクスの省略記法
         try-with-resources
         簡潔な可変長引数メソッド
Project Coin                            従来の記述
InputStream in = null; OutputStream out = null;
try {
    in = new FileInputStream(src);
    out = new FileOutputStream(src);
    byte[] buf = new byte[1024]; int n;
    while((n = in.read(buf)) >= 0) out.write(buf, 0, n);
} catch (IOException ex) {
} finally {
    try {
        if (in != null) in.close();
        if (out != null) out.close();
    } catch (IOException ex) {}
}
Project Coin                   try-with-resources
try (InputStream in = new FileInputStream(src);
       OutputStream out = new FileOutputStream(src)) {
     byte[] buf = new byte[1024];
     int n;
     while((n = in.read(buf)) >= 0) {
         out.write(buf, 0, n);
     }
 } catch (IOException ex) {
     System.err.println(ex.getMessage());
 }
NIO.2
          New Filesystem API
                   非同期 I/O
SocketChannel のマルチキャスト
FileSystem fileSystem.getDefault();
Path src = fileSystem.getPath(”foo.txt”);
Path dest = fileSystem.getPath(”bar.txt”);

// ファイル操作
Files.copy(src, dest);
Files.move(src, dest);

// シンボリックリンクの生成
Path target = fileSystem.getPath(...);
Path link = fileSystem.getPath(...);
Files.createSymbolicLink(link, target);
Path startDir = fileSystem.getPath(".");
final String regex = "Test.java";

// ディレクトリツリーの探索
Files.walkFileTree(startDir,
                   new SimpleFileVisitor<Path>() {
    public FileVisitResult visitFile(Path path,
                           BasicFileAttributes attrs) {
          if (Pattern.matches(regex,
                       path.getFileName().toString()))   {
              System.out.println("File: " + path);
          }
          return FileVisitResult.CONTINUE;
      }
});
InvokeDynamic
      新しいバイトコード
       invokedynamic

  動的型付け言語のメソッドコール
bootstrap, MethodHandle, CallSite
Fork/Join Framework
  more cores, more tasks
 分割統治法 + Work Stealing
class FibonacciTask extends RecursiveTask<Integer> {
    private final Integer n;
    FibonacciTask(Integer n) { this.n = n; }

    protected Integer compute() {
        if (n <= 1) return n;
        // n-1 に対してフィボナッチ数を求める
        FibonacciTask f1 = new FibonacciTask(n - 1);
        f1.fork();
        // n-2 に対してフィボナッチ数を求める
        FibonacciTask f2 = new FibonacciTask(n - 2);
        // 処理結果を足し合せて、n のフィボナッチ数とする
        return f2.compute() + f1.join();
    }
}
7
           Project Coin
           NIO.2
           InvokeDynamic
Mid 2011   Fork/Join Framework



               Project Lambda
                Project Jigsaw    8
                                 Mid 2013
簡単にマルチタスク
     もちろん細粒度


 Internal Iteration
         +
Lambda Expression
List<Student> students = ...

double highestScore = 0.0;
for (Student s: students) {
    if (s.getGradYear() == 2011) {
        if (s.getScore() > highestScore) {
            highestScore = s.getScore();
        }
    }
}
List<Student> students = ...

double highestScore =
   students.filter(new Predicate<Student>() {
       public boolean op(Student s) {
           return s.getGradYear() == 2011;
       }
   }).map(new Mapper<Student、Double>() {
       public Double extract(Student s) {
           return s.getScore();
       }
   }).max();
List<Student> students = ...

double highestScore =
   students.filter(new Predicate<Student>() {
       public boolean op(Student s) {
           return s.getGradYear() == 2011;
       }
   }).map(new Mapper<Student、Double>() {
       public Double extract(Student s) {
           return s.getScore();
       }
                               青字の部分が冗長
   }).max();
List<Student> students = ...

double highestScore =
   students.filter(Student s -> s.getGradYear()
                                         == 2011)
           .map(Student s -> s.getScore())
           .max();
                          赤字の部分がラムダ式
List<Student> students = ...

double highestScore =
   students.filter(s -> s.getGradYear() == 2011)
           .map(s -> s.getScore())
           .max();
                               引数の型を省略可
List<Student> students = ...

double highestScore =
                          パラレルに処理
   students.parallel()
           .filter(s -> s.getGradYear() == 2011)
           .map(s -> s.getScore())
           .max();
Project Jigsaw
 Modularity = Grouping
              + Dependence
              + Versioning
              + Encapsulation
              + Optional modules
              + Module aliases
 Packaging = Module files
              + Libraries
              + Repositories
              + Native packages
ほかにも ...
 JavaFX 3.0
   Nashorn
     HotRockit
     Device Suport
     Annotation Type
     Coin 2
Beyond Java SE 8
 Iteroperability
 Cloud
 Ease of Use
 Advanced Optimization
 Works Everywhere
     & with Everything
Conclusion
いますぐ使える Java SE 7
 NIO.2, G1GC
 Java SE 7u4 java.com で配布

あと 1 年で Java SE 8
 Lambda, Jigsaw
 JavaFX, Nashorn
Java SE 7,
 そして Java SE 8


      Java in the Box
      櫻庭 祐一

More Related Content

Similar to Java SE 7、そしてJava SE 8

JavaOne報告会 Java SE/JavaFX 編 - JJUG CCC 2010 Fall
JavaOne報告会 Java SE/JavaFX 編 - JJUG CCC 2010 FallJavaOne報告会 Java SE/JavaFX 編 - JJUG CCC 2010 Fall
JavaOne報告会 Java SE/JavaFX 編 - JJUG CCC 2010 Fall
Yuichi Sakuraba
 
What is new and cool j2se & java
What is new and cool j2se & javaWhat is new and cool j2se & java
What is new and cool j2se & javaEugene Bogaart
 
Gf Overview For Spanish Speakers 16 October2008
Gf Overview For Spanish Speakers 16 October2008Gf Overview For Spanish Speakers 16 October2008
Gf Overview For Spanish Speakers 16 October2008
Eduardo Pelegri-Llopart
 
Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Agora Group
 
BedCon 2013 - Java Persistenz-Frameworks für MongoDB
BedCon 2013 - Java Persistenz-Frameworks für MongoDBBedCon 2013 - Java Persistenz-Frameworks für MongoDB
BedCon 2013 - Java Persistenz-Frameworks für MongoDBTobias Trelle
 
Java Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDBJava Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDBMongoDB
 
Pure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools RacePure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools Race
Baruch Sadogursky
 
How is Java / JVM built ? Adopt OpenJDK is your answer !
How is Java / JVM built ? Adopt OpenJDK is your answer !How is Java / JVM built ? Adopt OpenJDK is your answer !
How is Java / JVM built ? Adopt OpenJDK is your answer !
Mani Sarkar
 
MongoDB for Java Developers with Spring Data
MongoDB for Java Developers with Spring DataMongoDB for Java Developers with Spring Data
MongoDB for Java Developers with Spring Data
Chris Richardson
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from Oredev
Mattias Karlsson
 
Java, Up to Date
Java, Up to DateJava, Up to Date
Java, Up to Date
輝 子安
 
Florian adler minute project
Florian adler   minute projectFlorian adler   minute project
Florian adler minute projectDmitry Buzdin
 
NIG系統報表開發指南
NIG系統報表開發指南NIG系統報表開發指南
NIG系統報表開發指南Guo Albert
 
Clojure And Swing
Clojure And SwingClojure And Swing
Clojure And Swing
Skills Matter
 
What's Expected in Java 7
What's Expected in Java 7What's Expected in Java 7
What's Expected in Java 7
Gal Marder
 
Java and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystemJava and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystem
Rafael Winterhalter
 
NoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyNoSQL and JavaScript: a love story
NoSQL and JavaScript: a love story
Alexandre Morgaut
 
Java 7: Quo vadis?
Java 7: Quo vadis?Java 7: Quo vadis?
Java 7: Quo vadis?
Michal Malohlava
 

Similar to Java SE 7、そしてJava SE 8 (20)

JavaOne報告会 Java SE/JavaFX 編 - JJUG CCC 2010 Fall
JavaOne報告会 Java SE/JavaFX 編 - JJUG CCC 2010 FallJavaOne報告会 Java SE/JavaFX 編 - JJUG CCC 2010 Fall
JavaOne報告会 Java SE/JavaFX 編 - JJUG CCC 2010 Fall
 
What is new and cool j2se & java
What is new and cool j2se & javaWhat is new and cool j2se & java
What is new and cool j2se & java
 
Java 8 Lambda
Java 8 LambdaJava 8 Lambda
Java 8 Lambda
 
Gf Overview For Spanish Speakers 16 October2008
Gf Overview For Spanish Speakers 16 October2008Gf Overview For Spanish Speakers 16 October2008
Gf Overview For Spanish Speakers 16 October2008
 
Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011
 
BedCon 2013 - Java Persistenz-Frameworks für MongoDB
BedCon 2013 - Java Persistenz-Frameworks für MongoDBBedCon 2013 - Java Persistenz-Frameworks für MongoDB
BedCon 2013 - Java Persistenz-Frameworks für MongoDB
 
Java Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDBJava Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDB
 
Pure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools RacePure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools Race
 
How is Java / JVM built ? Adopt OpenJDK is your answer !
How is Java / JVM built ? Adopt OpenJDK is your answer !How is Java / JVM built ? Adopt OpenJDK is your answer !
How is Java / JVM built ? Adopt OpenJDK is your answer !
 
MongoDB for Java Developers with Spring Data
MongoDB for Java Developers with Spring DataMongoDB for Java Developers with Spring Data
MongoDB for Java Developers with Spring Data
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from Oredev
 
Java, Up to Date
Java, Up to DateJava, Up to Date
Java, Up to Date
 
Florian adler minute project
Florian adler   minute projectFlorian adler   minute project
Florian adler minute project
 
NIG系統報表開發指南
NIG系統報表開發指南NIG系統報表開發指南
NIG系統報表開發指南
 
Clojure And Swing
Clojure And SwingClojure And Swing
Clojure And Swing
 
What's Expected in Java 7
What's Expected in Java 7What's Expected in Java 7
What's Expected in Java 7
 
Java and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystemJava and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystem
 
NoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyNoSQL and JavaScript: a love story
NoSQL and JavaScript: a love story
 
Java 7: Quo vadis?
Java 7: Quo vadis?Java 7: Quo vadis?
Java 7: Quo vadis?
 
JSX Optimizer
JSX OptimizerJSX Optimizer
JSX Optimizer
 

More from Yuichi Sakuraba

Vector API - Javaによるベクターコンピューティング
Vector API - JavaによるベクターコンピューティングVector API - Javaによるベクターコンピューティング
Vector API - Javaによるベクターコンピューティング
Yuichi Sakuraba
 
Oracle Code One - Java KeynoteとJava SE
Oracle Code One - Java KeynoteとJava SEOracle Code One - Java KeynoteとJava SE
Oracle Code One - Java KeynoteとJava SE
Yuichi Sakuraba
 
Project Loom + Project Panama
Project Loom + Project PanamaProject Loom + Project Panama
Project Loom + Project Panama
Yuichi Sakuraba
 
Project Loom - 限定継続と軽量スレッド -
Project Loom - 限定継続と軽量スレッド - Project Loom - 限定継続と軽量スレッド -
Project Loom - 限定継続と軽量スレッド -
Yuichi Sakuraba
 
Oracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE UpdateOracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE Update
Yuichi Sakuraba
 
今こそStream API入門
今こそStream API入門今こそStream API入門
今こそStream API入門
Yuichi Sakuraba
 
Oracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE UpdateOracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE Update
Yuichi Sakuraba
 
Learn Language 2018 Java Language Update
Learn Language 2018 Java Language Update Learn Language 2018 Java Language Update
Learn Language 2018 Java Language Update
Yuichi Sakuraba
 
Dockerに向けて、Javaもダイエット
Dockerに向けて、JavaもダイエットDockerに向けて、Javaもダイエット
Dockerに向けて、Javaもダイエット
Yuichi Sakuraba
 
What's New in Java
What's New in JavaWhat's New in Java
What's New in Java
Yuichi Sakuraba
 
Migration Guide to Java SE 10, and also Java SE 11
Migration Guide to Java SE 10, and also Java SE 11Migration Guide to Java SE 10, and also Java SE 11
Migration Guide to Java SE 10, and also Java SE 11
Yuichi Sakuraba
 
琥珀色のJava - Project Amber -
琥珀色のJava - Project Amber -琥珀色のJava - Project Amber -
琥珀色のJava - Project Amber -
Yuichi Sakuraba
 
Moving to Module: Issues & Solutions
Moving to Module: Issues & SolutionsMoving to Module: Issues & Solutions
Moving to Module: Issues & Solutions
Yuichi Sakuraba
 
モジュール移行の課題と対策
モジュール移行の課題と対策モジュール移行の課題と対策
モジュール移行の課題と対策
Yuichi Sakuraba
 
Project Jigsawと、ちょっとだけVector API
Project Jigsawと、ちょっとだけVector APIProject Jigsawと、ちょっとだけVector API
Project Jigsawと、ちょっとだけVector API
Yuichi Sakuraba
 
Java SE 9の全貌
Java SE 9の全貌Java SE 9の全貌
Java SE 9の全貌
Yuichi Sakuraba
 
Java SEの現在、過去 そして未来
Java SEの現在、過去 そして未来Java SEの現在、過去 そして未来
Java SEの現在、過去 そして未来
Yuichi Sakuraba
 
Java SE 9 のススメ
Java SE 9 のススメJava SE 9 のススメ
Java SE 9 のススメ
Yuichi Sakuraba
 
Introduction of Project Jigsaw
Introduction of Project JigsawIntroduction of Project Jigsaw
Introduction of Project Jigsaw
Yuichi Sakuraba
 
Encouragement of Java SE 9
Encouragement of Java SE 9Encouragement of Java SE 9
Encouragement of Java SE 9
Yuichi Sakuraba
 

More from Yuichi Sakuraba (20)

Vector API - Javaによるベクターコンピューティング
Vector API - JavaによるベクターコンピューティングVector API - Javaによるベクターコンピューティング
Vector API - Javaによるベクターコンピューティング
 
Oracle Code One - Java KeynoteとJava SE
Oracle Code One - Java KeynoteとJava SEOracle Code One - Java KeynoteとJava SE
Oracle Code One - Java KeynoteとJava SE
 
Project Loom + Project Panama
Project Loom + Project PanamaProject Loom + Project Panama
Project Loom + Project Panama
 
Project Loom - 限定継続と軽量スレッド -
Project Loom - 限定継続と軽量スレッド - Project Loom - 限定継続と軽量スレッド -
Project Loom - 限定継続と軽量スレッド -
 
Oracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE UpdateOracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE Update
 
今こそStream API入門
今こそStream API入門今こそStream API入門
今こそStream API入門
 
Oracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE UpdateOracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE Update
 
Learn Language 2018 Java Language Update
Learn Language 2018 Java Language Update Learn Language 2018 Java Language Update
Learn Language 2018 Java Language Update
 
Dockerに向けて、Javaもダイエット
Dockerに向けて、JavaもダイエットDockerに向けて、Javaもダイエット
Dockerに向けて、Javaもダイエット
 
What's New in Java
What's New in JavaWhat's New in Java
What's New in Java
 
Migration Guide to Java SE 10, and also Java SE 11
Migration Guide to Java SE 10, and also Java SE 11Migration Guide to Java SE 10, and also Java SE 11
Migration Guide to Java SE 10, and also Java SE 11
 
琥珀色のJava - Project Amber -
琥珀色のJava - Project Amber -琥珀色のJava - Project Amber -
琥珀色のJava - Project Amber -
 
Moving to Module: Issues & Solutions
Moving to Module: Issues & SolutionsMoving to Module: Issues & Solutions
Moving to Module: Issues & Solutions
 
モジュール移行の課題と対策
モジュール移行の課題と対策モジュール移行の課題と対策
モジュール移行の課題と対策
 
Project Jigsawと、ちょっとだけVector API
Project Jigsawと、ちょっとだけVector APIProject Jigsawと、ちょっとだけVector API
Project Jigsawと、ちょっとだけVector API
 
Java SE 9の全貌
Java SE 9の全貌Java SE 9の全貌
Java SE 9の全貌
 
Java SEの現在、過去 そして未来
Java SEの現在、過去 そして未来Java SEの現在、過去 そして未来
Java SEの現在、過去 そして未来
 
Java SE 9 のススメ
Java SE 9 のススメJava SE 9 のススメ
Java SE 9 のススメ
 
Introduction of Project Jigsaw
Introduction of Project JigsawIntroduction of Project Jigsaw
Introduction of Project Jigsaw
 
Encouragement of Java SE 9
Encouragement of Java SE 9Encouragement of Java SE 9
Encouragement of Java SE 9
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 

Java SE 7、そしてJava SE 8

  • 1. Java SE 7, そして Java SE 8 Java in the Box 櫻庭 祐一
  • 2. Agenda History Java SE 7 Java SE 8 Conclusion
  • 4. 04 05 06 07 08 09 10 OpenJDK SE6u10 Sun 買収 Plan A 6と7は J2SE5.0 Java SE6 General リリース Plan B 一緒に計画 リリース リリース JavaFX 発表 G.Hamiltion M.Reinhold M.Reinhold friend JSR294Superpackage Jigsaw Modularity JAR の拡張 NewPackaging JSR277JAM JSR277Module Closure BGGA Closure Closure Lambda Parallel N.Gafter JSR166y NIO2 NIO2 NIO2 NIO2 JSR296SAF JSR296SAF SmallChanges Coin EoD JSR295BeansBinding JSR295BeansBinding JSR303BeanValidation JSR308Annotation JSR308Annotation Misc JSR121 NewBytecode JSR292 JSR292 JSR292 JSR292 Isolation XML リテラル JSR310DateTime JSR310DateTime BeanShell BeanShell JMX2.0
  • 5. 7 Project Coin plan A NIO.2 InvokeDynamic Fork/Join Framework Project Lambda Mid 2012 Project Jigsaw 7 Project Coin NIO.2 plan B 8 InvokeDynamic Fork/Join Framework Mid 2011 Project Lambda Project Jigsaw Late 2012
  • 6. 7 Project Coin plan A NIO.2 InvokeDynamic Fork/Join Framework Project Lambda Mid 2012 Project Jigsaw 7 Project Coin NIO.2 plan B 8 InvokeDynamic Fork/Join Framework Mid 2011 Project Lambda Project Jigsaw Late 2012 Mid 2013
  • 7. Project Coin switch 文で文字列 2 進数と区切り文字 例外の multi catch と safe rethrow ジェネリクスの省略記法 try-with-resources 簡潔な可変長引数メソッド
  • 8. Project Coin 従来の記述 InputStream in = null; OutputStream out = null; try { in = new FileInputStream(src); out = new FileOutputStream(src); byte[] buf = new byte[1024]; int n; while((n = in.read(buf)) >= 0) out.write(buf, 0, n); } catch (IOException ex) { } finally { try { if (in != null) in.close(); if (out != null) out.close(); } catch (IOException ex) {} }
  • 9. Project Coin try-with-resources try (InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(src)) { byte[] buf = new byte[1024]; int n; while((n = in.read(buf)) >= 0) { out.write(buf, 0, n); } } catch (IOException ex) { System.err.println(ex.getMessage()); }
  • 10. NIO.2 New Filesystem API 非同期 I/O SocketChannel のマルチキャスト
  • 11. FileSystem fileSystem.getDefault(); Path src = fileSystem.getPath(”foo.txt”); Path dest = fileSystem.getPath(”bar.txt”); // ファイル操作 Files.copy(src, dest); Files.move(src, dest); // シンボリックリンクの生成 Path target = fileSystem.getPath(...); Path link = fileSystem.getPath(...); Files.createSymbolicLink(link, target);
  • 12. Path startDir = fileSystem.getPath("."); final String regex = "Test.java"; // ディレクトリツリーの探索 Files.walkFileTree(startDir, new SimpleFileVisitor<Path>() { public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) { if (Pattern.matches(regex, path.getFileName().toString())) { System.out.println("File: " + path); } return FileVisitResult.CONTINUE; } });
  • 13. InvokeDynamic 新しいバイトコード invokedynamic 動的型付け言語のメソッドコール bootstrap, MethodHandle, CallSite
  • 14. Fork/Join Framework more cores, more tasks 分割統治法 + Work Stealing
  • 15. class FibonacciTask extends RecursiveTask<Integer> { private final Integer n; FibonacciTask(Integer n) { this.n = n; } protected Integer compute() { if (n <= 1) return n; // n-1 に対してフィボナッチ数を求める FibonacciTask f1 = new FibonacciTask(n - 1); f1.fork(); // n-2 に対してフィボナッチ数を求める FibonacciTask f2 = new FibonacciTask(n - 2); // 処理結果を足し合せて、n のフィボナッチ数とする return f2.compute() + f1.join(); } }
  • 16. 7 Project Coin NIO.2 InvokeDynamic Mid 2011 Fork/Join Framework Project Lambda Project Jigsaw 8 Mid 2013
  • 17. 簡単にマルチタスク もちろん細粒度 Internal Iteration + Lambda Expression
  • 18. List<Student> students = ... double highestScore = 0.0; for (Student s: students) { if (s.getGradYear() == 2011) { if (s.getScore() > highestScore) { highestScore = s.getScore(); } } }
  • 19. List<Student> students = ... double highestScore = students.filter(new Predicate<Student>() { public boolean op(Student s) { return s.getGradYear() == 2011; } }).map(new Mapper<Student、Double>() { public Double extract(Student s) { return s.getScore(); } }).max();
  • 20. List<Student> students = ... double highestScore = students.filter(new Predicate<Student>() { public boolean op(Student s) { return s.getGradYear() == 2011; } }).map(new Mapper<Student、Double>() { public Double extract(Student s) { return s.getScore(); } 青字の部分が冗長 }).max();
  • 21. List<Student> students = ... double highestScore = students.filter(Student s -> s.getGradYear() == 2011) .map(Student s -> s.getScore()) .max(); 赤字の部分がラムダ式
  • 22. List<Student> students = ... double highestScore = students.filter(s -> s.getGradYear() == 2011) .map(s -> s.getScore()) .max(); 引数の型を省略可
  • 23. List<Student> students = ... double highestScore = パラレルに処理 students.parallel() .filter(s -> s.getGradYear() == 2011) .map(s -> s.getScore()) .max();
  • 24. Project Jigsaw Modularity = Grouping + Dependence + Versioning + Encapsulation + Optional modules + Module aliases Packaging = Module files + Libraries + Repositories + Native packages
  • 25. ほかにも ... JavaFX 3.0 Nashorn HotRockit Device Suport Annotation Type Coin 2
  • 26. Beyond Java SE 8 Iteroperability Cloud Ease of Use Advanced Optimization Works Everywhere & with Everything
  • 27. Conclusion いますぐ使える Java SE 7 NIO.2, G1GC Java SE 7u4 java.com で配布 あと 1 年で Java SE 8 Lambda, Jigsaw JavaFX, Nashorn
  • 28. Java SE 7, そして Java SE 8 Java in the Box 櫻庭 祐一