Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 17 deprecated SecurityManager #71

Closed
VidTu opened this issue Oct 21, 2021 · 5 comments
Closed

Java 17 deprecated SecurityManager #71

VidTu opened this issue Oct 21, 2021 · 5 comments
Assignees
Labels
type: bug Something isn't working

Comments

@VidTu
Copy link

VidTu commented Oct 21, 2021

Java 17 warning

Caused by JEP 411

WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by space.vectrix.ignite.applaunch.service.PaperclipBootstrapService (file:/D:/Server/ignitetest/srv_ignite.jar)
WARNING: Please consider reporting this to the maintainers of space.vectrix.ignite.applaunch.service.PaperclipBootstrapService
WARNING: System::setSecurityManager will be removed in a future release

Server loads normally, but this warning says 'consider reporting this to the maintainers'

Info

Java: 17 (Temurin 17 build 35 64-bit)
OS: Windows 11 Pro x64
Server: Paper 1.17.1 (Using 'Paperclip' launch mode)
Mods: none
Plugins: none

@vectrixdevelops vectrixdevelops added the type: bug Something isn't working label Oct 22, 2021
@vectrixdevelops vectrixdevelops self-assigned this Oct 22, 2021
@vectrixdevelops
Copy link
Member

Until the JDK adds a new way to intercept the system exit calls this cannot be addressed. Pending https://bugs.openjdk.java.net/browse/JDK-8199704

@astei
Copy link

astei commented Oct 26, 2021

You can work around this by using bytecode patching to modify the Paperclip launcher class and rewriting any code that attempts to call java/lang/System;exit(I) with a return statement. However the existing code for handling Paperclip launching doesn't handle errors properly, so now is a good time to fix that.

@vectrixdevelops
Copy link
Member

Good idea actually. I'll see if I can get something like that going.

@astei
Copy link

astei commented Oct 26, 2021

One crude method you could use to handle errors - only rewrite java/lang/System;exit(I) when the parameter is 0.

@vectrixdevelops
Copy link
Member

Fixed in https://github.com/vectrix-space/ignite/releases/tag/v0.7.0 for 1.18+ use the paperclip service. On earlier versions use legacy_paperclip, however the warning will still persist. I'm not going to make the same change on legacy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants