You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "raboof (via GitHub)" <gi...@apache.org> on 2025/05/09 11:08:24 UTC
[I] document how to run on recent Java versions [pekko]
raboof opened a new issue, #1840:
URL: https://github.com/apache/pekko/issues/1840
We've recently seen a couple of questions around running Pekko with recent versions of Java.
Even though Pekko does use sun.misc.Unsafe in some places, Pekko can be used on Java 21 and such just fine as long as you pass the relevant JDK flags.
We should probably add a section to the documentation about that (or at least I couldn't find it)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [I] document how to run on recent Java versions [pekko]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on issue #1840:
URL: https://github.com/apache/pekko/issues/1840#issuecomment-2866396940
We are adding something like these below when running real application in production:
```
SERVICE_OPTS="${SERVICE_OPTS} --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-exports java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-exports java.base/sun.util.calendar=ALL-UNNAMED --add-exports java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/sun.net.util=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/sun.security.action=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens java.sql/java.sql=ALL-UNNAMED --add-opens java.base/java.util.regex=ALL-UNNAMED --add-opens jdk.unsupported/sun.misc=ALL-UNNAMED"
```
Not totally related with pekko.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [I] document how to run on recent Java versions [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on issue #1840:
URL: https://github.com/apache/pekko/issues/1840#issuecomment-3167423839
I think Java 23+ users will need to add this to their java commands that used to run Pekko.
```
--sun-misc-unsafe-memory-access=allow
```
So far, this just silences a warning. In future Java versions this might be needed to allow sun.misc.Unsafe to be used at all.
Warnings look like
```
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
...
WARNING: sun.misc.Unsafe::allocateMemory will be removed in a future release
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [I] document how to run on recent Java versions [pekko]
Posted by "wolf8334 (via GitHub)" <gi...@apache.org>.
wolf8334 commented on issue #1840:
URL: https://github.com/apache/pekko/issues/1840#issuecomment-4514659919
yes.all these code related to sun.misc.unsafe may be removed in the future release JDK.
So,shall we use ffm or some other API.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [I] document how to run on recent Java versions [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on issue #1840:
URL: https://github.com/apache/pekko/issues/1840#issuecomment-4730348562
Actually, it seems like pekko-remote has its own direct use of Agrona classes and has a dependency on Agrona lib.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [I] document how to run on recent Java versions [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on issue #1840:
URL: https://github.com/apache/pekko/issues/1840#issuecomment-4518951968
We removed most of the uses of sun.misc.Unsafe in the main branch which has been used to release 2.0.0-M1 and 2.0.0-M2.
There is one still but it is in a cleanup task that won't fail if sun.misc.Unsafe is not accessible.
We have a lib dependency on Agrona and it uses sun.misc.Unsafe. You only need this if you are using Aeron UDP for remote/cluster comms.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [I] document how to run on recent Java versions [pekko]
Posted by "mkurz (via GitHub)" <gi...@apache.org>.
mkurz commented on issue #1840:
URL: https://github.com/apache/pekko/issues/1840#issuecomment-4728933670
> We have a lib dependency on Agrona and it uses sun.misc.Unsafe.
Without knowing any details: is it possible to remove Agrona and replace it with 1) either another library, or 2) replace the `sun.misc.Unsafe` parts that pekko-remote uses with homegrown code?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [I] document how to run on recent Java versions [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on issue #1840:
URL: https://github.com/apache/pekko/issues/1840#issuecomment-4729008476
Agrona is a transitive dependency via Aeron. You only need Aeron if you use Artery and UDP comms for Pekko remote/cluster.
There are alternatives for for Artery clustering like TCP and TLS-TCP that avoid Aeron/Agrona.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org