Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] JNI is here to stay, isn't it?



On Wed, Jul 10, 2024 at 7:04 PM SRAVAN LAKKIMSETTI <sravankumarl@xxxxxxxxxx> wrote:
Hi Stephan,

The SWT works on JNI. If there is any restriction in JNI, we will have impact on SWT. This in turn will have impact on Eclipse GUI. https://openjdk.org/jeps/472 will definitely impact SWT as we use System.load and System.loadLibrary in SWT code see https://github.com/eclipse-platform/eclipse.platform.swt/blob/b2c03664e3ac4de6a1bc7b25292d89ee209264d4/bundles/org.eclipse.swt/Eclipse%20SWT%20PI/common/org/eclipse/swt/internal/Library.java#L227.
For now we will need to add --enable-native-access=ALL-UNNAMED by default in the eclipse launcher/ini file.

@Aleksandar Kurtakov @loskutov@xxxxxx Any comments on this one?

Are the changes in Java 24 ea builds already? I can't really comment before getting hands dirty to understand the details.

 

Thanks
Sravan
-----Original Message-----
From: cross-project-issues-dev <cross-project-issues-dev-bounces@xxxxxxxxxxx> On Behalf Of Stephan Herrmann via cross-project-issues-dev
Sent: Wednesday, July 10, 2024 7:57 PM
To: cross-project-issues-dev@xxxxxxxxxxx
Cc: Stephan Herrmann <stephan.herrmann@xxxxxxxxx>
Subject: [EXTERNAL] [cross-project-issues-dev] JNI is here to stay, isn't it?

Hi folks,

Two things are happening in the area of interfacing Java with native code:

In JDK 22 a new technology called FFM API has matured to a standard feature [1].

In JDK 24 a process is started to *restrict* the use of JNI [2]. See this recent announcement [3].

While both topics are somehow related, the current strategy does not imply that JNI will be removed in a foreseeable future, but the
*default* may eventually be shifted towards disabling JNI by default, which means at that point you'll need to supply a new command line arg to the java launcher to enable JNI. This is intended to ensure "integrity by default".

If some proposed changes could potentially break any part of Eclipse, then it would certainly be good to speak up sooner rather than later.

Right now, however, I don't see any action required. I just think it's good to keep everybody informed.

best,
Stephan

[1] https://openjdk.org/jeps/454

[2] https://openjdk.org/jeps/472

[3] https://mail.openjdk.org/pipermail/jdk-dev/2024-July/009222.html

_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cross-project-issues-dev



--
Aleksandar Kurtakov
Red Hat Eclipse Team

Back to the top