Next2Dで始めるゲーム開発 - Game Development Starting with Next2DToshiyuki Ienaga
?
CEDEC2022に応募したのですが、見事に落選しました。
が、折角作った資料なので公開します。
I applied for CEDEC2022, but was not selected.
However, I am publishing this document because I made it at an opportunity.
Head toward Java 14 and Java 15 #LINE_DMYuji Kubota
?
Java 14 and 15 introduced several new features and changes including records, pattern matching, text blocks, and updates to the garbage collector. Some notable changes were the addition of records as a new data type, enabling pattern matching for instanceof, and deprecating biased locking and the CMS garbage collector. Tools were also improved with the packaging tool to create installers and event streaming to collect JVM events.
This document discusses new features and changes in Java 14 and previews for Java 15. For Java 14, it outlines 16 JEPs including helpful null pointer exceptions, NUMA-aware memory allocation, and removing legacy garbage collectors. It also covers new tools like JFR event streaming and the packaging tool. For Java 15, hidden classes, removing Nashorn, and low-latency garbage collectors like ZGC and Shenandoah are previewed. Overall it provides a concise yet informative summary of major changes and previews for Java 14 and 15.
JavaOne 2017 報告会 at Japan Java User Group
デモのコード:https://github.com/ykubota/jigsaw-sample_jp
イベントページ:https://jjug.doorkeeper.jp/events/66256
Stream: https://www.youtube.com/watch?v=XT2tIh9r6Eo
slideshareが自動的にPDFに変換するように仕様変更されていたため、ノート付きでアップロードができませんでした。お手数をおかけしますが、原稿(簡単ですが…)を読んでみたい方は筆者までTwitterでDMかメールなどでご連絡お願いします。
Secrets of Rock Star Developers (and How to Become One!) [CON7615] (Yuji KUBO...Yuji Kubota
?
Kubota Yuji is a Java technical support engineer at NTT and a hard-of-hearing open source developer. He recommends reading code and writing code through trial and error. Maintaining documentation and comments is important to help others. Conversation through chat, mailing lists, and tweets from conferences help hard-of-hearing developers. Written knowledge from articles and books also provide assistance, as do watching sessions on YouTube with subtitles. Attending JUGs can introduce developers to professionals. With helpful accessibility options and kind communities, hard-of-hearing people need not give up on becoming good developers.
The document discusses using jcmd to troubleshoot Java applications. It provides an overview of the jcmd command and describes the various domains and suffixes that can be used with jcmd to obtain diagnostic information or control the JVM. These include getting thread dumps, heap details, JIT compiler data, and configuring Java logging. The document also demonstrates some example jcmd commands.
JavaOne 2016 Java SE Feedback #jjug #j1jpYuji Kubota
?
狠狠撸 for reporting Java SE Feedback of JavaOne 2016 at Japan Java User Group. Especially, this slide introduces the changes required for Java 9.
https://jjug.doorkeeper.jp/events/52639
Java 女子部 講義資料
https://javajo.doorkeeper.jp/events/21337
This presentation is used to lecture about the introduction of Java Virtual Machine at Java Japan User Group (Girls).
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...Yuji Kubota
?
The document discusses a new runtime monitoring tool called HeapStats that provides a lightweight Java agent for collecting troubleshooting information from a Java application. It summarizes problems with current troubleshooting approaches like insufficient logging and complicated settings. HeapStats aims to collect required information continuously with low overhead, and provide easy-to-use visualization of the collected data to help with troubleshooting memory and performance issues. The document demonstrates how HeapStats hooks into garbage collection to gather heap statistics without extra stop-the-world pauses.
6. Additionalincompabilitiyexample
No. #now() returnsnanosecondspartbyJDK-8068730(Java9)
# Version 14.0.2
jshell> var now = java.time.LocalDateTime.now()
now ==> 2020-10-08T16:19:01.738366
# Version 15
jshell> var now = java.time.LocalDateTime.now()
now ==> 2020-10-08T16:19:08.485590579
jshell> var now = java.time.LocalDateTime.now()
...> .truncatedTo(java.time.temporal.ChronoUnit.MICROS)
now ==> 2020-10-08T16:19:12.943847
6
7. Additionalincompabilitiyexample(Cont.)
#now() returnsnanosecondspartbyJDK-8068730(Java9)
# Version 15, Linux
jshell> var now = java.time.LocalDateTime.now()
now ==> 2020-10-08T16:30:29.534948147
jshell> System.getProperty("os.name")
$2 ==> "Linux"
# Version 15, macOS
jshell> var now = java.time.LocalDateTime.now()
now ==> 2020-10-08T16:31:26.815258
jshell> System.getProperty("os.name")
$2 ==> "Mac OS X"
Windowsはもっと前(環境がないので未確認)
7
12. (Drafting)thesamewayon switch
別JEPでswitch?でも利?できるようになる予定です。ただし時期未詳
switch (obj) {
case Integer i:
// uses i here.
case Double d:
// uses d here.
}
public double area(Shape shape) {
return switch(shape) {
case Circle c -> Math.PI * c.radius() * c.radius();
case Rectangle r -> r.length() * r.width();
case Square s -> s.length() * s.width();
default -> 0;
}
}
12
15. 15:384:Records(SecondPreview)(Cont.)
//?番シンプルな書き?
public record TestRecord(String s, int i) {}
public final class TestRecord(String s, int i)
extends java.lang.Record {
private final String s;
private final int i;
String s() { return s; }
int i() {return i;}
TestRecord(String s, int i) {
this.s = s;
this.i = i;
}
// toString(), equals(), hashCode()
}
15
16. 15:384:Records(SecondPreview)(Cont.)
public final class TestRecord(String s, int i)
extends java.lang.Record {
Immutable
recordは常に final クラス
(java.lang.Recordを拡張しているので)recordはインターフェースを実装できるがクラ
スを拡張はできない
(同じ理由で)Objectクラスが持つ以下の3つのメソッドが暗黙的に実装されている
// toString(), equals(), hashCode()
equals() はrecordが持つフィールドが同値であれば常に true
16
17. 15:384:Records(SecondPreview)(Cont.)
private final String s;
private final int i;
Immutable
フィールドは private final でsetterもなし
Reflectionを使っても変更は不可
やったら IllegalAccessException が投げられる
String s() { return s; }
int i() {return i;}
FluentgetterAPI, getS や getI のように getXX は追加できない
17
18. 15:384:Records(SecondPreview)(Cont.)
// ?般的な?成されたコンストラクタ
TestRecord(String s, int i) {
this.s = s;
this.i = i;
}
下記のようにコンストラクタで検証(validate)や値の?成も可能
public record TestRecord(String s, int i) {
public TestRecord() {
this("Default S", 1000);
}
public TestRecord(String s, int i) {
if (s.isEmpty()) {
throw new IllegalArgumentException();
}
this.s = s;
this.i = i;
}
}
18