OpenJDK & What it means for the Java Developer
Dalibor Topić Java F/OSS Ambassador Sun Microsystems http://twitter.com/robilad
Java
2
Programming Language
3
Virtual Machine
4
Cross- platform Programming Environment
5
Community Of Communities
6
Pretty successful
7
~1B LOC
of Open Source Code written in it (acc. to ohloh.net)
8
That's just the visible space
9
What else happened in the last 10 years?
10
Open Source
11
From fringe to mainstream
12
Open Innovation across organizational boundaries
13
Remember shipping containers?
14
Changed the world
15
Radically reduced transaction costs
16
For material goods
17
Standardized measures
18
Optimization opportunities
19
Open Source does the same
20
For software components
21
Standardized Legal Containers
22
Permeable development
23
Lowered barrier to participation
24
Collaborative User Innovation
25
What else happened?
26
Linux
27
From fringe to mainstream
28
Cloud, Cluster, Server, Netbook, TV, Phone, ...
29
Anyone can create a Linux- based software platform
30 shipping yard, fleet & port
in one
31
Organic growth
32
Cambrian explosion of Linux distros
33
Selective Pressure On Development Tools on Linux
Strongly Favors Open Source
34
Manifests itself around: availability, integration, ease of use
35
Example: sudo aptitude install openjdk-6-jdk
vs.
many minutes of manual work
36
Example: sudo aptitude build-dep openjdk-6
vs.
many hours of manual work
37
Open Source + Java + Linux 38 39
OpenJDK 7
40
JDK 7
41
Open Source
42
GPL v2
43
Classpath Exception
44
2006:
From closed to open
45
First Step:
Get the code out
46
Putting the effort in perspective
47
Mozilla
1.2M SLOCs
48
Eclipse
2.2M SLOCs
49
OpenJDK
3.5M SLOCs
50
Done within one year
51
Managing expectations
52
Pessimist extremists:
Java will be forked to death!
53
Well, no.
Didn't happen.
54
Optimist extremists:
I want a feature! And I want it now! 55
Well, probably no.
You can have a go at it yourself, though.
56
Culture change
57
2007:
Cleaning up
58
Second Step:
100 % Open Source
59
Replacing encumbered third-party code
60
Removing structural barriers to innovation
61
Fully open source bootstrap
62
IcedTea
63
Gervill
Sound Synthesizer
64
64-Bit Plugin
65
Packaging
66
OpenJDK 6
67
2008:
Infrastructure & Adoption
68
Third Step:
Put it to use
69
Mercurial
70
External Committers
71
JDK 7 mainline
72
Sidestreams of development
73
Feature Projects
74
Like NIO2, MLVM & Jigsaw
75
Making JDK & JVM suitable for more problems
76
Porting Projects
77
Like Zero, Shark, BSD Port
78
Putting OpenJDK in more places
79
Gentoo, Debian, Fedora, Ubuntu, OpenSUSE, Mandriva, Simply MEPIS, Linux Mint
Red Hat Enterprise Linux, CentOS, Oracle Enterprise Linux
FreeBSD, OpenBSD, NetBSD, MacPorts
Poky Linux, Angstrom, OLPC XO 80
Removing social barriers to innovation
81
2009: JDK 7 Milestones
82
Fourth step:
Create more opportunities to innovate
83
Code going from closed to open often has a tough learning curve
84
Private conversations
85
Insider knowledge
86
Easier to learn the ropes writing new code
87
Public knowledge
88
Searchable knowledge
89
In practice:
Modularize the code base
90
Reducing complexity
91
Removing intrinsic barriers to innovation
92
Where are we now?
93
Gradually growing, diverse Community
94
Individual Developers
95
BSD Port
Landon Fuller Greg Lewis Kurt Miller Christos Zoulas 96
Academia
97
Type Annotations
Mahmood Ali Michael Ernst
98
Corporate Contributors
99
Sun, Red Hat, Google, AMD
100
Total: 180
! @Sun.com: 47
101
25 Projects
102
Both Incremental Innovation
103
XRender Pipeline
104
And Disruptive Innovation
105
Dynamic language support
106
Larger Community
107
IcedTea
108
Jalimo
109
Cacao VM
110
Maxine VM
111
JNode OS
112
IKVM.NET
113
What about the language?
114
Size matters
115
Big changes harder then small ones
116
Project Coin
117
small language changes
118
Strings in switch
119
String s = ... switch(s) { case "foo": processFoo(s); break; }
120
Improved Type Inference for Generic Instance Creation
121
AKA: Diamond
122
// type less: Map
123
Language support for JSR 292
124
Object x = InvokeDynamic.getMeSomething();
MethodHandle mh = ...; mh.invoke(); int #"strange variable name" = 42; System.out.println(#"strange variable name"); // prints 42
125
… and more
126
http://openjdk.java.net/projects/coin
127
Not so small changes
128
Type Annotations
129
JSR 308
130
Checker framework
131
@NonNull
132
@Nullable
133
javac -processor NullnessChecker MyFile.java
134
@ReadOnly
135
http://openjdk.java.net/projects/type-annotations
136
JSR 294
137
Improved modularity support in the language
138
Independent of a module system
139
Explicit Dependencies + Versioning + Accessibility
140
module-info.java
141
src/org/openjdk/SomeTool.java src/module-info.java
142
module org.openjdk.SomeTool @ 1.0 { requires module SomeLib @ 1.2; requires module AnotherLib @ 2.1; requires module jdk-swing @ 7.0; class org.openjdk.SomeTool; }
143
understood by javac
144
understood by java
145
$CLASSPATH is dead
146
Jigsaw
147
modularity for the JDK
148
Size matters
149
well-defined subsets
150
Just-enough JDK
151
simple & static
152
low level
153
native packaging
154
jpkg
155
Now: deb
156
Soon: RPM SVR4 IPS
157
Add your format: [email protected]
158
http://openjdk.java.net/projects/jigsaw/
159
JDK 7
160
8 milestones
161
M1 (finished)
162
Compressed OOPs
163
Garbage First Garbage Collector
164
M2 (finished)
165
NIO2
166
URLClassLoader.close()
167
M3 (finished)
168
InvokeDynamic
169
Stream Control Transmission Protocol
170
Sockets Direct Protocol
171
Unicode 5.1
172
ClassLoader Architecture Update
173
M4 (finished)
174
Forward-port 6u10 features
175
Type Annotations
176
M5 (ongoing)
177
Update the XML stack
178
Elliptic Curve Cryptography
179
Swing Updates
180
Concurrency & Collections Updates
181
Project Coin
182
http://openjdk.java.net/projects/jdk7/
183
Contribute
184
http://openjdk.java.net
185
Patches for JDK 7
186
http://bugs.openjdk.java.net
187
Stay up to date
188
http://planetjdk.org
189
Discuss development
190
191
192
Q & A [email protected]
193