/
JVMCapabilitiesOlder.shtml
754 lines (515 loc) · 15.7 KB
/
JVMCapabilitiesOlder.shtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.17), see www.w3.org">
<title>JMRI: Java Version-Specific Features</title>
<meta name="author" content="Bob Jacobsen">
<meta name="keywords" content="JMRI technical code road map">
<!-- Style -->
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii">
<link rel="stylesheet" type="text/css" href="/css/default.css"
media="screen">
<link rel="stylesheet" type="text/css" href="/css/print.css"
media="print">
<link rel="icon" href="/images/jmri.ico" type="image/png">
<link rel="home" title="Home" href="/">
<!-- /Style -->
</head>
<body>
<!--#include virtual="/Header.shtml" -->
<div id="mBody">
<!--#include virtual="Sidebar.shtml" -->
<div id="mainContent">
<h1>JMRI: Java Version-Specific Features (Older Page)</h1>
<p>This is the "historical page" for
the <a href="JVMCapabilities.shtml">Java Version-Specific Features</a> page.
<h2>Capabilities</h2>
<p>This section lists new Java
capabilities, and which Java version they first appeared in.
The "JDK" column shows the first Java Development Kit that
could compile the feature; the "JRE" column lists the first
runtime environment that could run the feature, including the
needed JVM and library support.
<table border="1">
<tr>
<th>Feature</th>
<th>JDK</th>
<th>JRE</th>
</tr>
<tr>
<td>HiDPI graphics support for Windows and Linux users.
Probably "just works" with JRE update, unless something
in JMRI breaks on Java 9 on Windows (Currently support
using very large fonts as a workaround, but it quickly
breaks as text overlaps widget boundaries)</td>
<td>1.8?</td>
<td>1.9</td>
</tr>
<tr>
<td>It seems that MacOS X (macOS) users will lose the use
of the OS X App menu for About, Preferences, and
(critically) Quit handling on that platform</td>
<td>1.9</td>
<td>1.9</td>
</tr>
<tr>
<td>It seems that MacOS X (macOS) users will lose
Applescript scripting</td>
<td>1.9</td>
<td>1.9</td>
</tr>
<tr>
<td>Generics for Swing classes</td>
<td>1.7</td>
<td>1.7</td>
</tr>
<tr>
<td>NIO improves .zip file access</td>
<td>1.7</td>
<td>1.7</td>
</tr>
<tr>
<td>I18N I/O improvements</td>
<td>1.7</td>
<td>1.7</td>
</tr>
<tr>
<td>Memory use and<br>
GC improvements<br>
(better performance)</td>
<td>1.7</td>
<td>1.7</td>
</tr>
<tr>
<td>Jetty Version 9</td>
<td>1.7</td>
<td>1.7</td>
</tr>
<tr>
<td>JUnit 4 and the<br>
<code>assert</code> keyword</td>
<td>1.7</td>
<td>1.7</td>
</tr>
<tr>
<td>Desktop class</td>
<td>1.6</td>
<td>1.6</td>
</tr>
<tr>
<td>JDOM2 (generics)</td>
<td>1.6</td>
<td>1.6</td>
</tr>
<tr>
<td>Toolbars</td>
<td>1.6</td>
<td>1.6</td>
</tr>
<tr>
<td>JTable Sorting</td>
<td>1.6</td>
<td>1.6</td>
</tr>
<tr>
<td>Webstart compatibility</td>
<td>1.6</td>
<td>1.6</td>
</tr>
<tr>
<td>SwingWorker</td>
<td>1.5</td>
<td>1.5 (*1.4)</td>
</tr>
<tr>
<td>JSpinner</td>
<td>1.5</td>
<td>1.5</td>
</tr>
<tr>
<td>Enums</td>
<td>1.5</td>
<td>1.5</td>
</tr>
<tr>
<td>printf, Formatter</td>
<td>1.5</td>
<td>1.5</td>
</tr>
<tr>
<td>generics</td>
<td>1.5</td>
<td>1.5</td>
</tr>
<tr>
<td>Annotations</td>
<td>1.5</td>
<td>1.3</td>
</tr>
<tr>
<td>JavaMail</td>
<td>1.5</td>
<td>1.3</td>
</tr>
<tr>
<td>JUnit 4.0</td>
<td>1.5</td>
<td>1.3</td>
</tr>
<tr>
<td>JDOM 1.0</td>
<td>1.4</td>
<td>1.3</td>
</tr>
<tr>
<td>Java regexp</td>
<td>1.4</td>
<td>1.4</td>
</tr>
<tr>
<td>Java3D</td>
<td>1.4</td>
<td>1.4</td>
</tr>
<tr>
<td>JavaHelp update</td>
<td>1.4</td>
<td>1.4</td>
</tr>
<tr>
<td>Drag and Drop</td>
<td>1.4 (additional<br>
improvements in 1.6)</td>
<td>1.4, 1.6</td>
</tr>
<tr>
<td>Logging API</td>
<td>1.4 (additional<br>
improvements in 1.6)</td>
<td>1.4, 1.6</td>
</tr>
<tr>
<td>XML catalog resolver</td>
<td>1.3?</td>
<td>1.4?</td>
</tr>
<tr>
<td>Collections</td>
<td>1.3</td>
<td>1.3</td>
</tr>
<tr>
<td>Java2D</td>
<td>1.3</td>
<td>1.3</td>
</tr>
<tr>
<td>Printing update</td>
<td>1.3</td>
<td>1.3</td>
</tr>
<tr>
<td>JUnit 3.8</td>
<td>1.3</td>
<td>1.3</td>
</tr>
</table>(* indicates that a compatibility library is used in
the early version)
<h2>JRE availability</h2>
<p>This section lists the most recent
Java Runtime version available for various operating system
versions. Please note that not all users of that operating
system will have updated to this Java version; many will be
using an older one.
<p><a href=
"http://www.oracle.com/technetwork/java/javase/config-417990.html">
Oracle's page on Java 1.7 requirements</a> which says "Note:
As of April 8, 2014 Microsoft stopped supporting Windows XP
and therefore it is no longer a supported platform." Google
finds numerous pages that show how to install Java 1.7 on XP
or XP SP2.</p>
<table border="1">
<tr>
<th>OS and platform</th>
<th>Last JRE</th>
</tr>
<tr>
<td>Linux</td>
<td>(depends?)</td>
</tr>
<tr>
<td>Win 8 (32-bit)</td>
<td>1.8</td>
</tr>
<tr>
<td>Win 7 (32-bit)</td>
<td>1.8</td>
</tr>
<tr>
<td>Win Vista (32-bit)</td>
<td>1.8</td>
</tr>
<tr>
<td>Win Server 2008 (32-bit)</td>
<td>1.8</td>
</tr>
<tr>
<td>Win Web Server 2008 (32-bit)</td>
<td>1.6</td>
</tr>
<tr>
<td>Win 2000 (32-bit)</td>
<td>1.6</td>
</tr>
<tr>
<td>Win Server 2003 (32-bit)</td>
<td>1.6</td>
</tr>
<tr>
<td>Win 8 (64-bit)</td>
<td>1.8</td>
</tr>
<tr>
<td>Win Server 2012 (64-bit)</td>
<td>1.8</td>
</tr>
<tr>
<td>Win Server 2012 R2 (64-bit)</td>
<td>1.8</td>
</tr>
<tr>
<td>Win 7 (64-bit)</td>
<td>1.8</td>
</tr>
<tr>
<td>Win Server 2008 R2 (64-bit)</td>
<td>1.8</td>
</tr>
<tr>
<td>Win Server 2008 (64-bit)</td>
<td>1.7</td>
</tr>
<tr>
<td>Win Web Server 2008 R2 (64-bit)</td>
<td>1.6</td>
</tr>
<tr>
<td>Win Vista (64-bit)</td>
<td>1.8</td>
</tr>
<tr>
<td>Win 2003 (64-bit)</td>
<td>1.6</td>
</tr>
<tr>
<td>Windows XP</td>
<td>1.8<br>
<a href=
"https://www.java.com/en/download/faq/winxp.xml">Unofficial<br>
Support</a></td>
</tr>
<tr>
<td>Windows 98 (2nd Ed)</td>
<td>1.5-11</td>
</tr>
<tr>
<td>Windows 98</td>
<td>1.4.2_14</td>
</tr>
<tr>
<td>Windows 95</td>
<td>1.3.1_20</td>
</tr>
<tr>
<td>Mac OS X 10.8.3 and later on Intel</td>
<td>1.8</td>
</tr>
<tr>
<td>Mac OS X 10.7.3 and later on Intel</td>
<td>1.7</td>
</tr>
<tr>
<td>Mac OS X 10.5.8 and later on Intel</td>
<td>1.6 (Apple JVM)</td>
</tr>
<tr>
<td>Mac OS X 10.5.7 and earlier on Intel</td>
<td>1.5 (Apple JVM)</td>
</tr>
<tr>
<td>Mac OS X 10.3 and later on PowerPC</td>
<td>1.5 (Apple JVM)</td>
</tr>
<tr>
<td>MacOS "Classic"</td>
<td>1.1.8</td>
</tr>
<tr>
<td>OS/2</td>
<td>1.3</td>
</tr>
</table>
<p>See the <a href=
"http://java.com/en/download/manual.jsp">Java.com download
page for all Operating Systems</a> and<br>
information on <a href=
"https://www.java.com/en/download/help/sysreq.xml">Java
versions and hardware requirements</a>.</p>
<h2 id="sysreq">System Requirements</h2>
<p>The following combination of JMRI - Java - Platform/OS
versions was based on Oracle and OS developers sources. It's
translated to the OS install instructions (follow hyperlink
in OS headers):</p>
<table border="1">
<tbody>
<tr>
<th>JMRI</th>
<th>Java</th>
<th><a href=
"https://jmri.org/install/MacOSX.shtml#sysreq">OS
X</a></th>
<th><a href=
"https://jmri.org/install/WindowsNew.shtml#sysreq">Windows</a></th>
<th><a href=
"https://jmri.org/install/Linux.shtml#sysreq">Linux</a></th>
<th><a href=
"https://jmri.org/install/Ubuntu.shtml#sysreq">Ubuntu</a></th>
<th><a href=
"https://jmri.org/install/Raspbian.shtml#sysreq">Raspbian</a></th>
</tr>
<tr>
<td>4.2</td>
<td>1.8</td>
<td>10.8.3+ Mountain Lion</td>
<td>Win7 SP1/8/10, Vista SP2, (XP)</td>
<td>5.5+</td>
<td>12.04+</td>
<td>14.04LTS</td>
</tr>
<tr>
<td>3.10.1</td>
<td>1.7</td>
<td>10.7.3 Lion</td>
<td>Win7 SP1/8/10, Vista SP2, (XP)</td>
<td>5.5+</td>
<td>12.04</td>
<td>12.04</td>
</tr>
<tr>
<td>3.10.1</td>
<td>1.6</td>
<td>10.6 Snow Leopard (JVM6)</td>
<td>Win2003, Win2000 (x86)</td>
<td>5.5</td>
<td>10.4</td>
<td>N/A</td>
</tr>
<tr>
<td>2.14.1</td>
<td>1.5</td>
<td>10.5.7 Leopard (JVM5)</td>
<td>Vista SP1, Win2000 SP3, Win8.x (x64)</td>
<td></td>
<td>9.04</td>
<td>N/A</td>
</tr>
<tr>
<td>2.8</td>
<td>1.5</td>
<td>10.4 Tiger</td>
<td>Win98 (2nd Ed), XP, ME</td>
<td></td>
<td></td>
<td>N/A</td>
</tr>
<tr>
<td>2.2</td>
<td>1.5</td>
<td>10.3 Panther</td>
<td>Win98, ME</td>
<td>N/A</td>
<td>N/A</td>
<td>N/A</td>
</tr>
<tr>
<td></td>
<td>1.3.1</td>
<td>10.3 Panther</td>
<td>Win95, Win98</td>
<td>N/A</td>
<td>N/A</td>
<td>N/A</td>
</tr>
<tr>
<td>1.6</td>
<td>1.1.8</td>
<td>MacOS9.1 (MRJ)</td>
<td>Win95, Win98</td>
<td>N/A</td>
<td>N/A</td>
<td>N/A</td>
</tr>
</tbody>
</table>
<h2 id="JDK8">Moving to Java 1.8 from 1.6</h2>This section
discusses, roughly in order of decreasing importance, the
process of migrating from Java 1.6 to Java 1.8.
<h3>Generics, Swing and JComboBox</h3>Java 1.8 introduces
generics for Swing objects. The most common one is JComboBox.
This Java 1.6 line:
<pre style="font-family: monospace;">
JComboBox box = new JComboBox();
</pre>describes the creation of a JComboBox that selects generic
(Object) items.<br>
In Java 1.8, the JComboBox holds and selects objects of a
specific type, usually String. It's written:
<pre style="font-family: monospace;">
JComboBox<String> box = new JComboBox<>();
</pre>The most common code for getting the selected item still
includes a cast:
<pre style="font-family: monospace;">
String result = (String)box.getSelectedItem();
</pre>because the JComboBox can actually contain objects of other
types (How can this happen? If the box is editable, and somebody
enters some other type).<br>
To avoid the case, a more robust idiom is:
<pre style="font-family: monospace;">
String result = box.getItemAt(progBox.getSelectedIndex());
</pre>
<h3>Javadoc and doclint</h3>Java 1.8 by default runs the
<a href=
"https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javadoc.html#CHDFDACB">
doclint</a> doclet when making Javadoc. By default, it is
<a href=
"http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html">
very aggressive</a> on possible errors. The default Ant-based
builds turn off some of the checking terms with
<pre style="font-family: monospace;">
-Xdoclint:all,-missing,-accessibility,-html,-syntax
</pre>to drop tests for missing Javadoc tags and certain benign
HTML errors. (For now) <a name="extension" id="extension"></a>
<h2>JVM and JDK Extensions</h2>It's possible to extend the
JVM and/or JDK installed on your machine via <a href=
"http://docs.oracle.com/javase/8/docs/technotes/guides/standards/index.html">
the endorsed-standards override mechanism</a> and the
<a href="http://docs.oracle.com/javase/8/docs/technotes/guides/extensions/index.html">
extension mechanism</a>. Those extensions, if present, take
precedence over code shipped with applications like JMRI.
Unfortunately, these can cause problems if the installed
extensions interfere with a JMRI component. For example, an
older (or younger) version might not be compatible, etc. It
is very unusual for this to cause a problem with JMRI. You
should investigate other possible causes before looking into
this one! To check for this, execute the following from the
command line: <code>java -XX:+CheckEndorsedAndExtDirs</code>
If you get a message about a specific directory, look there
for conflicting Jar files. You should probably consult the
JMRIusers or jmri-developers mailing list for help before
changing that directory! <!--#include virtual="/Footer.shtml" -->
</div><!-- closes #mainContent-->
</div><!-- closes #mBody-->
</body>
</html>