Skip to content

Commit ca20304

Browse files
authored
Merge pull request #77 from Pi4J/feature/java21
Prepare content for bump to Java 21
2 parents c3591c5 + eda00e2 commit ca20304

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+252
-178
lines changed

config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ weight = 20
124124
[[menu.shortcuts]]
125125
name = "<i class='fab more-tag fa-github'></i> Pi4J V2 Discussions"
126126
identifier = "discussions"
127-
url = "https://github.com/Pi4J/pi4j-v2/discussions"
127+
url = "https://github.com/Pi4J/pi4j/discussions"
128128
weight = 30
129129

130130
[[menu.shortcuts]]

content/_index.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ title: Welcome to Pi4J
44

55
## Welcome to Pi4J
66

7+
{{% notice warning %}}
8+
Pi4J is moving to Java version 21! Please [read this blog post for more info](/blog/2025/20250205-welcome-java-21/).
9+
{{% /notice %}}
10+
711
**Latest release: V2.8.0 (2025-01-28, see [Release Notes](/about/release-notes/)).**
812

913
This project is intended to provide **a friendly object-oriented I/O API and implementation libraries for Java Programmers** to access the **full I/O capabilities of the Raspberry Pi platform**. This project abstracts the low-level native integration and interrupt monitoring to enable Java programmers to **focus on implementing their application business logic**.
@@ -36,17 +40,9 @@ capabilities of embedded platforms such as the Raspberry Pi.
3640

3741
The Pi4j project has evolved in all these years as the whole Java eco-system and Raspberry Pi systems have been evolving.
3842

39-
This resulted in two main versions.
40-
41-
#### Version 1
42-
43-
The original library which started in 2012 and got a last release in 2021. Up till **version 1.3 the library targets Java 8**, while **version 1.4 relies on Java 11**.
44-
45-
More info is provided on ["Previous versions (V.1)"](/about/previous-version-v1/).
46-
47-
#### Version 2
43+
This resulted in the following main versions:
4844

49-
As of Version 2.0, Pi4J **no longer includes support for peripheral devices and
50-
add-on chipsets/boards** as part of the core project. A new plugin model has been introduced in version 2.0 that helps to enable third-party development and support third-party add-ons which can be developed and maintained independently of the core Pi4J project.
45+
* [V1.X.X](/about/info-v1): Deprecated, based on Java 8, later Java 11.
46+
* [V2.X.X](/about/info-v2): Completely reworked code base, based on Java 11.
47+
* [V3.X.X](/about/info-v3): Based on latest V2 and Java 21.
5148

52-
More info is provided on ["What's New (V.2)"](/about/new-in-v2/).

content/about/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ weight: 10
55

66
## Project Status/Summary
77

8-
Pi4J V.2 is a complete re-write and **does not maintain API compatibility** with previous
9-
versions. It is not intended to be a drop-in replacement for previous versions of Pi4J. Pi4J V.2 is
8+
Pi4J V2+ is a complete re-write and **does not maintain API compatibility** with previous
9+
versions. It is not intended to be a drop-in replacement for previous versions of Pi4J. Pi4J V2+ is
1010
a completely new **design bringing modern conventions, development practices, extensibility support
1111
and simplified integration experience** for Pi4J users.
1212

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
---
2-
title: 'Previous versions (V.1)'
2+
title: 'Info about V1'
33
weight: 20
44
---
55

6+
The original library which started in 2012 and got a last release in 2021. Up till **version 1.3.0 the library targets Java 8**, while **version 1.4.0 relies on Java 11**.
7+
8+
[The sources of V1 can be found in the read-only GitHub repository `pi4j/pi4j-v1`](https://github.com/Pi4J/pi4j-v1).
9+
610
## Documentation of the 1.X versions
711

812
### Pi4J Version 1.4
@@ -15,7 +19,7 @@ weight: 20
1519
* Removed pi4j-device and pi4j-gpio-extension library
1620
* Removed platform support for Odroid, BananaPi, BPi, NanoPi, OrangePi
1721
* Various improvements and bug fixes listed here: [GitHub Issues (v1.4)](https://github.com/Pi4J/pi4j-v1/milestone/9?closed=1)
18-
* Not using Java-modules yet, this will be part of the V.2
22+
* Not using Java-modules yet, this will be part of the V2
1923
* [Documentation website V1.4](/1.4/index.html)
2024

2125
### Pi4J Version 1.3
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
---
2-
title: 'What''s New (V.2)'
3-
weight: 30
2+
title: 'What''s New in V2'
3+
weight: 21
44
---
55

6+
As of versions 2.X.X, Pi4J **no longer includes support for peripheral devices and add-on chipsets/boards** as part of the core project. A new plugin model has been introduced in version 2.0 that helps to enable third-party development and support third-party add-ons which can be developed and maintained independently of the core Pi4J project. **V2-versions of Pi4J require Java 11** or higher.
7+
8+
[The sources of V2+ can be found in the GitHub repository `pi4j/pi4j`](https://github.com/Pi4J/pi4j).
9+
610
## What's New in 2.0?
711

812
Pi4J version 2.0 brings with it many new features, and an entirely new architecture that focuses on
@@ -33,7 +37,7 @@ Pi4J version 2.0 will no longer be based on WiringPi and has moved to using the
3337
With this move, we will also support the remote I/O features (via TCP socket) offered by the PIGPIO daemon
3438
([http://abyz.me.uk/rpi/pigpio/pigpiod.html](http://abyz.me.uk/rpi/pigpio/pigpiod.html)).
3539

36-
## What are the differences compared to V.1?
40+
## What are the differences compared to V1?
3741

3842
Starting with the Pi4J 2.0 builds, the Pi4J project is prioritizing focus on providing Java programs access,
3943
control and communication with the core I/O capabilities of the Raspberry Pi platform. Earlier versions of Pi4J were
@@ -50,12 +54,12 @@ The following features have been removed from the Pi4J library:
5054

5155
## Sources
5256

53-
The Pi4J V.2 source code is available in this GitHub repository: [Pi4J V.2 GitHub Repository](https://github.com/Pi4J/pi4j-v2)
57+
The Pi4J V2+ source code is available in this GitHub repository: [`pi4j/pi4j` GitHub Repository](https://github.com/Pi4J/pi4j)
5458

5559
```shell
56-
git clone https://github.com/Pi4J/pi4j-v2
60+
git clone https://github.com/Pi4J/pi4j
5761
```
5862

59-
Pi4J V.2 had the first release in August 2021. Rework from V.1 to V.2 took quit some time and will never be finished, but
63+
Pi4J V2 had the first release in August 2021. Rework from V1 to V2 took quit some time and will never be finished, but
6064
we are confident this is a great library to develop Java application on the Raspberry Pi. Any remarks and contributions
61-
are welcome as either bug reports or discussions in the [GitHub repository](https://github.com/Pi4J/pi4j-v2).
65+
are welcome as either bug reports or discussions in the [GitHub repository](https://github.com/Pi4J/pi4j).

content/about/info-v3.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: 'What''s New in V3'
3+
weight: 22
4+
---
5+
6+
Versions 3.0.0 is based on 2.8.0 (released in January 2025), but bumps the **Java version to 21** or newer! We [asked our users](https://github.com/Pi4J/pi4j/discussions/409) which minimal Java version we should use, but there was no one clear answer, as expected ;-)
7+
8+
The current/latest Long Term Support (LTS) version of Java is version 21. So it makes sense to jump forward from 11 to 21. This will also prepare us for a the next LTS, which will be Java 25 in September 2025. Bumping to the latest LTS makes it possible to make use of many newer Java language and runtime improvements, simplify some of the code, etc.
9+
10+
We would like to move to Java 22 as this would allow us to easier call C code to interact with the GPIOs, thanks to [JEP 454: Foreign Function & Memory API](https://openjdk.org/jeps/454). Unfortanelty, 22 is not a LTS, so it would force us to bump the version every six months with each new release, up till 25.
11+
12+
[The sources of V3 can be found in the GitHub repository `pi4j/pi4j`](https://github.com/Pi4J/pi4j).
13+
14+
## What's New in 3.0?
15+
16+
Pi4J version 3.0.0 is a continuation of 2.8.0, but bumps the minimal Java version to 21.
17+
18+
## Sources
19+
20+
The Pi4J V3 source code is available in this GitHub repository: [`pi4j/pi4j` GitHub Repository](https://github.com/Pi4J/pi4j)
21+
22+
```shell
23+
git clone https://github.com/Pi4J/pi4j
24+
```
25+
26+
Pi4J V3 is not yet released, but can already use version `3.0.0-SNAPSHOT` for testing if you add the snapshot Maven repository to your pom-file.
27+
28+
```xml
29+
<repositories>
30+
<repository>
31+
<id>oss-snapshots-repo</id>
32+
<name>Sonatype OSS Maven Repository</name>
33+
<url>https://oss.sonatype.org/content/groups/public</url>
34+
<releases>
35+
<enabled>false</enabled>
36+
</releases>
37+
<snapshots>
38+
<enabled>true</enabled>
39+
</snapshots>
40+
</repository>
41+
</repositories>
42+
```

content/about/license.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The Pi4J Version 2.0 project is distributed and licensed under the **Apache Lice
77
(_A business-friendly OSS license_).
88

99
* [apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)
10-
* [github.com/Pi4J/pi4j-v2/blob/master/LICENSE.txt](https://github.com/Pi4J/pi4j-v2/blob/master/LICENSE.txt)
10+
* [github.com/Pi4J/pi4j/blob/master/LICENSE.txt](https://github.com/Pi4J/pi4j/blob/master/LICENSE.txt)
1111

1212
<div style="max-width: 650px; margin-left: auto; margin-right: auto;" >
1313
<pre>

0 commit comments

Comments
 (0)