566:
77:
1341:
323:
compatible where it makes sense, it follows that the Java calling convention should be as similar as practical to that used for other languages, especially C++, since we can think of Java as a subset of C++. CNI is just a set of helper functions and conventions built on the idea that C++ and Java have the *same* calling convention and object layout; they are binary compatible. (This is a simplification, but close enough.)
1719:
1731:
580:
322:
We use CNI because we think it is a better solution, especially for a Java implementation that is based on the idea that Java is just another programming language that can be implemented using standard compilation techniques. Given that, and the idea that languages implemented using Gcc should be
27:
1274:
1037:
267:
The compilation function in GCJ should have a faster start-up time than the equivalent bytecode launched in a JVM when compiling Java code into machine code.
939:
1769:
1240:
240:
is still in development. "Once AWT support is working then Swing support can be considered. There is at least one free-software partial implementations of
259:
on
September 30, 2016. Announcement of its removal was made with the release of the GCC 7.1, which does not contain it. GCJ remains part of GCC 6.
1754:
1267:
735:
894:
1723:
571:
1050:
244:
that may be usable.". The GNU CLASSPATH was never completed to even Java 1.2 status and now appears to have been abandoned completely.
1030:
1260:
221:
632:- GraalVM's Native Image functionality is an ahead-of-time compilation technology that produces executable binaries of class files.
1308:
987:
1601:
1214:
1759:
1671:
1581:
1566:
1162:
1023:
645:
1596:
1325:
1302:
1735:
1551:
1431:
585:
241:
159:
68:
1647:
119:
936:
1591:
1533:
1076:
648:- Kotlin/Native is a technology for compiling Kotlin to native binaries that run without any JVM. It comprises a
640:
295:
by, native applications (programs specific to a hardware and operating-system platform) and libraries written in
975:
1283:
1008:
1764:
1618:
237:
229:
163:
1657:
1523:
1380:
1355:
1224:
1081:
1543:
1472:
1199:
303:
959:
785:
699:
1518:
1411:
1370:
1360:
1297:
1046:
635:
307:
174:
833:
190:
102:
76:
820:
1662:
1652:
1462:
1452:
1063:
901:
652:-based backend for the Kotlin compiler and a native implementation of the Kotlin runtime library.
284:
214:
1209:
1184:
731:
725:
194:
1702:
1667:
1528:
1487:
1059:
256:
248:
186:
114:
90:
1340:
1692:
1401:
1130:
1122:
943:
1497:
1467:
1447:
1421:
1179:
619:
327:
CNI depends on Java classes appearing as C++ classes. For example, given a Java class,
1748:
1697:
1687:
1492:
1457:
1416:
1234:
1015:
593:
247:
As of 2015, there were no new developments announced from GCJ and the product was in
225:
206:
152:
995:
233:
182:
685:
1730:
1396:
1229:
579:
170:
937:
https://gcc.gnu.org/onlinedocs/gcj/Objects-and-Classes.html#Objects-and-Classes
700:"GCJ: The GNU Compiler for Java - GNU Project - Free Software Foundation (FSF)"
1586:
1314:
561:
220:
In 2007, a lot of work was done to implement support for Java's two graphical
34:
1556:
1320:
1135:
1107:
757:
671:
292:
288:
95:
1252:
1097:
873:
306:(Java Native Interface) framework which comes as a standard with various
178:
155:
107:
924:
809:
1626:
1561:
1502:
1482:
1477:
1426:
1365:
1330:
1219:
1194:
1156:
1140:
1071:
629:
609:
599:
252:
251:, with open-source Java toolchain development mostly happening within
1631:
1576:
1406:
1375:
1112:
979:
1004:
771:
296:
1571:
1204:
1102:
624:
614:
604:
848:
649:
1256:
1019:
26:
39:
789:
703:
967:
925:
The GCJ FAQ – GNU Project – Free
Software Foundation (FSF)
318:
The authors of CNI claim for various advantages over JNI:
874:"GCC 7 Release Series: Changes, New Features, and Fixes"
130:
727:
Introduction to
Compiler Construction in a Java World
283:), previously named "Cygnus Native Interface", is a
209:
project, but there is a code difference between the
1680:
1640:
1617:
1610:
1542:
1511:
1440:
1389:
1348:
1290:
1172:
1149:
1121:
1090:
1058:
125:
113:
101:
89:
67:
45:
33:
821:GCC Looks To Turn Off Java, Replace With Go Or ADA
205:The GCJ runtime-libraries original source is from
320:
758:"Compiling Java with GCJ | Linux Journal"
1268:
1031:
8:
786:"gcj to use Eclipse compiler as a front end"
19:
1614:
1275:
1261:
1253:
1038:
1024:
1016:
75:
18:
197:that contain bytecode into machine code.
730:. CRC Press Taylor & Francis Group.
662:
596:(Excelsior Java native code compiler)
287:for the GCJ that allows Java code to
7:
1011:from the original on August 2, 2019.
572:Free and open-source software portal
966:. GNU. Mar 30, 2007. Archived from
895:"GCJ: The GNU Static Java Compiler"
832:Andrew Haley (September 30, 2016).
1770:Discontinued Java virtual machines
217:Compiler for Java as a front-end.
14:
1005:"GCJ - past, present, and future"
670:Anthony Green, Cygnus Solutions.
1729:
1718:
1717:
1339:
578:
564:
25:
1755:Free compilers and interpreters
1736:Computer programming portal
847:Tromey, Tom (October 2, 2016).
834:"[gcc] Revision 240661"
271:Compiled Native Interface (CNI)
255:. GCJ was removed from the GCC
1441:Major third-party technologies
1003:Wielaard, Mark (Apr 6, 2005).
1:
1672:Sun Microsystems Laboratories
788:. 2007-01-08. Archived from
686:"GCC Releases - GNU Project"
433:one can use the class thus:
213:libraries. GCJ 4.3 uses the
586:Computer programming portal
1786:
1648:Apache Software Foundation
314:Comparison of language use
302:CNI closely resembles the
1715:
1534:Free Java implementations
1337:
641:Free Java implementations
277:Compiled Native Interface
160:Java programming language
85:
63:
24:
1284:Java (software platform)
935:The example comes from:
519:// Static member access.
435:
329:
189:. It could also compile
772:"GNU Compiler for Java"
724:Campbell, Bill (2013).
236:. Software support for
164:GNU Compiler Collection
1658:Java Community Process
1524:Java Community Process
325:
162:. It was part of the
51:; 26 years ago
49:September 6, 1998
1390:Platform technologies
1091:Major implementations
1047:Java virtual machines
853:The Cliffs of Inanity
849:"The Deletion of gcj"
308:Java virtual machines
145:GNU Compiler for Java
20:GNU Compiler for Java
1760:GNU Project software
1519:Java version history
1371:Java virtual machine
1361:Java Development Kit
636:Java virtual machine
175:Java virtual machine
151:) is a discontinued
1349:Oracle technologies
982:on August 22, 2016.
21:
1663:Oracle Corporation
1653:Eclipse Foundation
960:"Official website"
942:2016-10-20 at the
672:"GCJ announcement"
285:software framework
169:GCJ compiles Java
1742:
1741:
1711:
1710:
1250:
1249:
998:on July 28, 2016.
737:978-1-4398-6088-5
441:<gcj/cni.h>
187:CPU architectures
141:
140:
80:/ 26 October 2018
1777:
1734:
1733:
1721:
1720:
1703:Patrick Naughton
1668:Sun Microsystems
1615:
1529:Sun Microsystems
1422:Web Start (JNLP)
1343:
1277:
1270:
1263:
1254:
1040:
1033:
1026:
1017:
1012:
999:
994:. Archived from
983:
978:. Archived from
971:
946:
933:
927:
922:
916:
915:
913:
912:
906:
900:. Archived from
899:
891:
885:
884:
882:
880:
870:
864:
863:
861:
859:
844:
838:
837:
829:
823:
818:
812:
807:
801:
800:
798:
797:
782:
776:
775:
768:
762:
761:
754:
748:
747:
745:
744:
721:
715:
714:
712:
711:
702:. Archived from
696:
690:
689:
682:
676:
675:
667:
588:
583:
582:
574:
569:
568:
567:
553:
550:
547:
544:
541:
538:
535:
532:
529:
526:
523:
520:
517:
514:
511:
508:
505:
502:
499:
496:
493:
490:
487:
484:
481:
478:
475:
472:
469:
466:
463:
460:
457:
454:
451:
448:
445:
442:
439:
429:
426:
423:
420:
417:
414:
411:
408:
405:
402:
399:
396:
393:
390:
387:
384:
381:
378:
375:
372:
369:
366:
363:
360:
357:
354:
351:
348:
345:
342:
339:
336:
333:
249:maintenance mode
212:
185:for a number of
137:
134:
132:
91:Operating system
79:
59:
57:
52:
29:
22:
1785:
1784:
1780:
1779:
1778:
1776:
1775:
1774:
1745:
1744:
1743:
1738:
1728:
1707:
1693:Arthur van Hoff
1676:
1636:
1606:
1538:
1507:
1436:
1385:
1344:
1335:
1286:
1281:
1251:
1246:
1168:
1145:
1131:Android Runtime
1117:
1086:
1054:
1044:
1002:
986:
974:
970:on May 9, 2007.
958:
955:
950:
949:
944:Wayback Machine
934:
930:
923:
919:
910:
908:
904:
897:
893:
892:
888:
878:
876:
872:
871:
867:
857:
855:
846:
845:
841:
831:
830:
826:
819:
815:
808:
804:
795:
793:
784:
783:
779:
770:
769:
765:
756:
755:
751:
742:
740:
738:
723:
722:
718:
709:
707:
698:
697:
693:
684:
683:
679:
669:
668:
664:
659:
584:
577:
570:
565:
563:
560:
555:
554:
551:
548:
545:
542:
539:
536:
533:
530:
527:
524:
521:
518:
515:
512:
509:
506:
503:
500:
497:
494:
491:
488:
485:
482:
479:
476:
473:
470:
467:
464:
461:
458:
455:
452:
449:
446:
443:
440:
437:
431:
430:
427:
424:
421:
418:
415:
412:
409:
406:
403:
400:
397:
394:
391:
388:
385:
382:
379:
376:
373:
370:
367:
364:
361:
358:
355:
352:
349:
346:
343:
340:
337:
334:
331:
316:
273:
265:
210:
203:
129:
81:
55:
53:
50:
46:Initial release
40:The GNU Project
17:
12:
11:
5:
1783:
1781:
1773:
1772:
1767:
1765:Java compilers
1762:
1757:
1747:
1746:
1740:
1739:
1716:
1713:
1712:
1709:
1708:
1706:
1705:
1700:
1695:
1690:
1684:
1682:
1678:
1677:
1675:
1674:
1665:
1660:
1655:
1650:
1644:
1642:
1638:
1637:
1635:
1634:
1629:
1623:
1621:
1612:
1608:
1607:
1605:
1604:
1599:
1594:
1589:
1584:
1579:
1574:
1569:
1564:
1559:
1554:
1548:
1546:
1540:
1539:
1537:
1536:
1531:
1526:
1521:
1515:
1513:
1509:
1508:
1506:
1505:
1500:
1495:
1490:
1485:
1480:
1475:
1470:
1465:
1460:
1455:
1450:
1444:
1442:
1438:
1437:
1435:
1434:
1429:
1424:
1419:
1414:
1409:
1404:
1399:
1393:
1391:
1387:
1386:
1384:
1383:
1378:
1373:
1368:
1363:
1358:
1352:
1350:
1346:
1345:
1338:
1336:
1334:
1333:
1328:
1323:
1318:
1312:
1306:
1300:
1294:
1292:
1288:
1287:
1282:
1280:
1279:
1272:
1265:
1257:
1248:
1247:
1245:
1244:
1237:
1232:
1227:
1222:
1217:
1212:
1207:
1202:
1197:
1192:
1187:
1182:
1180:Apache Harmony
1176:
1174:
1170:
1169:
1167:
1166:
1159:
1153:
1151:
1147:
1146:
1144:
1143:
1138:
1133:
1127:
1125:
1119:
1118:
1116:
1115:
1110:
1105:
1100:
1094:
1092:
1088:
1087:
1085:
1084:
1079:
1074:
1068:
1066:
1056:
1055:
1045:
1043:
1042:
1035:
1028:
1020:
1014:
1013:
1000:
984:
972:
954:
953:External links
951:
948:
947:
928:
917:
886:
865:
839:
824:
813:
802:
777:
763:
749:
736:
716:
691:
677:
661:
660:
658:
655:
654:
653:
643:
638:
633:
627:
622:
620:Apache Harmony
617:
612:
607:
602:
597:
590:
589:
575:
559:
556:
436:
330:
315:
312:
272:
269:
264:
261:
202:
199:
139:
138:
127:
123:
122:
117:
111:
110:
105:
99:
98:
93:
87:
86:
83:
82:
73:
71:
65:
64:
61:
60:
47:
43:
42:
37:
31:
30:
15:
13:
10:
9:
6:
4:
3:
2:
1782:
1771:
1768:
1766:
1763:
1761:
1758:
1756:
1753:
1752:
1750:
1737:
1732:
1726:
1725:
1714:
1704:
1701:
1699:
1696:
1694:
1691:
1689:
1688:James Gosling
1686:
1685:
1683:
1679:
1673:
1669:
1666:
1664:
1661:
1659:
1656:
1654:
1651:
1649:
1646:
1645:
1643:
1641:Organizations
1639:
1633:
1630:
1628:
1625:
1624:
1622:
1620:
1616:
1613:
1609:
1603:
1600:
1598:
1595:
1593:
1590:
1588:
1585:
1583:
1580:
1578:
1575:
1573:
1570:
1568:
1565:
1563:
1560:
1558:
1555:
1553:
1550:
1549:
1547:
1545:
1544:JVM languages
1541:
1535:
1532:
1530:
1527:
1525:
1522:
1520:
1517:
1516:
1514:
1510:
1504:
1501:
1499:
1496:
1494:
1491:
1489:
1486:
1484:
1481:
1479:
1476:
1474:
1471:
1469:
1466:
1464:
1461:
1459:
1458:GNU Classpath
1456:
1454:
1451:
1449:
1446:
1445:
1443:
1439:
1433:
1430:
1428:
1425:
1423:
1420:
1418:
1415:
1413:
1410:
1408:
1405:
1403:
1400:
1398:
1395:
1394:
1392:
1388:
1382:
1379:
1377:
1374:
1372:
1369:
1367:
1364:
1362:
1359:
1357:
1354:
1353:
1351:
1347:
1342:
1332:
1329:
1327:
1324:
1322:
1319:
1316:
1313:
1310:
1307:
1304:
1301:
1299:
1296:
1295:
1293:
1289:
1285:
1278:
1273:
1271:
1266:
1264:
1259:
1258:
1255:
1243:
1242:
1238:
1236:
1235:Excelsior JET
1233:
1231:
1228:
1226:
1223:
1221:
1218:
1216:
1215:Microsoft JVM
1213:
1211:
1208:
1206:
1203:
1201:
1198:
1196:
1193:
1191:
1188:
1186:
1183:
1181:
1178:
1177:
1175:
1171:
1165:
1164:
1160:
1158:
1155:
1154:
1152:
1148:
1142:
1139:
1137:
1134:
1132:
1129:
1128:
1126:
1124:
1120:
1114:
1111:
1109:
1106:
1104:
1101:
1099:
1096:
1095:
1093:
1089:
1083:
1080:
1078:
1075:
1073:
1070:
1069:
1067:
1065:
1061:
1057:
1052:
1048:
1041:
1036:
1034:
1029:
1027:
1022:
1021:
1018:
1010:
1006:
1001:
997:
993:
989:
985:
981:
977:
973:
969:
965:
961:
957:
956:
952:
945:
941:
938:
932:
929:
926:
921:
918:
907:on 2011-06-07
903:
896:
890:
887:
875:
869:
866:
854:
850:
843:
840:
835:
828:
825:
822:
817:
814:
811:
806:
803:
792:on 2007-05-09
791:
787:
781:
778:
773:
767:
764:
759:
753:
750:
739:
733:
729:
728:
720:
717:
706:on 2007-05-09
705:
701:
695:
692:
687:
681:
678:
673:
666:
663:
656:
651:
647:
644:
642:
639:
637:
634:
631:
628:
626:
623:
621:
618:
616:
613:
611:
608:
606:
603:
601:
598:
595:
594:Excelsior JET
592:
591:
587:
581:
576:
573:
562:
557:
434:
328:
324:
319:
313:
311:
309:
305:
300:
298:
294:
290:
286:
282:
278:
270:
268:
262:
260:
258:
254:
250:
245:
243:
239:
235:
231:
227:
226:GNU Classpath
223:
218:
216:
208:
207:GNU Classpath
200:
198:
196:
192:
188:
184:
180:
176:
172:
167:
165:
161:
157:
154:
150:
146:
136:
128:
124:
121:
118:
116:
112:
109:
106:
104:
100:
97:
94:
92:
88:
84:
78:
72:
70:
69:Final release
66:
62:
48:
44:
41:
38:
36:
32:
28:
23:
16:Java compiler
1722:
1317:(Enterprise)
1239:
1189:
1173:Discontinued
1161:
996:the original
991:
980:the original
976:"GCJ Manual"
968:the original
963:
931:
920:
909:. Retrieved
902:the original
889:
877:. Retrieved
868:
856:. Retrieved
852:
842:
827:
816:
805:
794:. Retrieved
790:the original
780:
766:
752:
741:. Retrieved
726:
719:
708:. Retrieved
704:the original
694:
680:
665:
432:
326:
321:
317:
301:
280:
276:
274:
266:
246:
219:
204:
183:machine code
168:
148:
144:
142:
35:Developer(s)
1619:Conferences
1326:Android SDK
988:"About CNI"
810:The GCJ FAQ
447:<Int>
263:Performance
191:class files
171:source code
1749:Categories
1698:Urs Hölzle
1587:Processing
1315:Jakarta EE
1311:(Standard)
1051:comparison
992:GCJ Manual
911:2009-08-02
858:October 3,
796:2007-05-20
743:2014-02-06
710:2010-04-22
657:References
193:and whole
56:1998-09-06
1611:Community
1557:BeanShell
1473:Hibernate
1448:Blackdown
1381:Maxine VM
1321:Java Card
1291:Platforms
1136:JamaicaVM
1108:Jikes RVM
291:, and be
96:Unix-like
74:6.5
1724:Category
1402:Servlets
1123:Embedded
1098:IKVM.NET
1009:Archived
940:Archived
558:See also
444:#include
438:#include
179:bytecode
158:for the
156:compiler
108:Compiler
1727:
1627:JavaOne
1602:Oxygene
1562:Clojure
1512:History
1503:WildFly
1498:TopLink
1483:Jazelle
1478:IcedTea
1468:Harmony
1453:Eclipse
1432:Modules
1427:Pack200
1407:MIDlets
1397:Applets
1366:OpenJDK
1331:GraalVM
1309:Java SE
1305:(Micro)
1303:Java ME
1230:Jupiter
1220:SableVM
1195:JRockit
1157:IcedTea
1141:Mika VM
1077:HotSpot
1072:GraalVM
1007:. LWN.
630:GraalVM
610:SableVM
600:IcedTea
253:OpenJDK
215:Eclipse
201:History
126:Website
120:GNU GPL
115:License
54: (
1681:People
1632:Devoxx
1582:Kotlin
1577:Jython
1567:Groovy
1493:Struts
1488:Spring
1376:JavaFX
1356:Squawk
1225:Squawk
1185:Dalvik
1150:Others
1113:OpenJ9
1082:Maxine
1064:Oracle
879:May 9,
734:
646:Kotlin
522:return
504:return
401:static
398:public
356:public
344:public
332:public
293:called
211:libgcj
181:or to
177:(JVM)
1597:Scala
1592:Rhino
1572:JRuby
1241:more…
1205:Kaffe
1163:more…
1103:JamVM
905:(PDF)
898:(PDF)
625:Jikes
615:JamVM
605:Kaffe
537:->
335:class
257:trunk
242:Swing
234:Swing
1552:Java
881:2017
860:2016
732:ISBN
650:LLVM
513:zero
456:mult
407:zero
377:this
289:call
275:The
232:and
222:APIs
195:JARs
153:free
143:The
135:.org
133:.gnu
103:Type
1463:GWT
1417:JSF
1412:JSP
1298:JVM
1210:KVM
1190:GCJ
1060:Sun
964:GCC
528:Int
525:new
507:Int
474:int
462:Int
450:Int
416:Int
413:new
404:Int
365:int
359:Int
347:int
338:Int
304:JNI
297:C++
281:CNI
238:AWT
230:AWT
224:in
173:to
149:GCJ
131:gcc
1751::
1670:,
1200:JX
1062:,
990:.
962:.
851:.
549:);
510:::
495:==
486:if
425:);
310:.
299:.
228::
166:.
1276:e
1269:t
1262:v
1053:)
1049:(
1039:e
1032:t
1025:v
914:.
883:.
862:.
836:.
799:.
774:.
760:.
746:.
713:.
688:.
674:.
552:}
546:k
543:*
540:i
534:p
531:(
516:;
501:)
498:0
492:k
489:(
483:{
480:)
477:k
471:,
468:p
465:*
459:(
453:*
428:}
422:0
419:(
410:=
395:}
392:;
389:i
386:=
383:i
380:.
374:{
371:)
368:i
362:(
353:;
350:i
341:{
279:(
147:(
58:)
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.