diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9e5b75ebcdc2..55b09190cae1 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -229,7 +229,7 @@ jobs:
java: [ 17 ]
include:
- os: ubuntu-latest
- java: 23
+ java: 24-ea
fail-fast: false
steps:
@@ -260,6 +260,7 @@ jobs:
run: tar --zstd -xf build.tar.zst
- name: platform/masterfs
+ if: ${{ matrix.java == '17' }}
run: .github/retry.sh ant $OPTS -f platform/masterfs test
- name: Commit Validation tests
@@ -836,7 +837,7 @@ jobs:
timeout-minutes: 50
strategy:
matrix:
- java: [ '17', '21', '23' ]
+ java: [ '17', '21', '24-ea' ]
exclude:
- java: ${{ github.event_name == 'pull_request' && 'nothing' || '21' }}
fail-fast: false
@@ -1443,10 +1444,10 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
- java: [ '17', '23' ]
+ java: [ '17', '24-ea' ]
config: [ 'batch1', 'batch2' ]
exclude:
- - java: ${{ github.event_name == 'pull_request' && 'nothing' || '23' }}
+ - java: ${{ github.event_name == 'pull_request' && 'nothing' || '24-ea' }}
fail-fast: false
steps:
@@ -1496,7 +1497,7 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
- java: [ '17', '21', '23' ]
+ java: [ '17', '21', '24-ea' ]
exclude:
- java: ${{ github.event_name == 'pull_request' && 'nothing' || '21' }}
fail-fast: false
diff --git a/nb/ide.launcher/netbeans.conf b/nb/ide.launcher/netbeans.conf
index 8c44e0290777..c25759510b10 100644
--- a/nb/ide.launcher/netbeans.conf
+++ b/nb/ide.launcher/netbeans.conf
@@ -56,7 +56,7 @@ netbeans_default_cachedir="${DEFAULT_CACHEDIR_ROOT}/@@metabuild.RawVersion@@"
# The automatically selected value can be overridden by specifying -J-Xmx
# here or on the command line.
#
-netbeans_default_options="-J-XX:+UseStringDeduplication -J-Xss2m @@metabuild.logcli@@ -J-DTopSecurityManager.disable=true -J-Djava.lang.Runtime.level=FINE -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.application.appearance=system -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dplugin.manager.check.updates=false -J-Dnetbeans.extbrowser.manual_chrome_plugin_install=yes @@metabuild.jms-flags@@ -J-XX:+IgnoreUnrecognizedVMOptions"
+netbeans_default_options="-J-XX:+UseStringDeduplication -J-Xss2m @@metabuild.logcli@@ -J-Djava.lang.Runtime.level=FINE -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.application.appearance=system -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dplugin.manager.check.updates=false -J-Dnetbeans.extbrowser.manual_chrome_plugin_install=yes @@metabuild.jms-flags@@ -J-XX:+IgnoreUnrecognizedVMOptions"
# Default location of JDK:
# (set by installer or commented out if launcher should decide)
diff --git a/nbbuild/jdk.xml b/nbbuild/jdk.xml
index 3109e3f032b4..298b1636a257 100644
--- a/nbbuild/jdk.xml
+++ b/nbbuild/jdk.xml
@@ -107,17 +107,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -229,17 +218,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/nbbuild/templates/common.xml b/nbbuild/templates/common.xml
index 1b14cdd5f7e0..2cfef20611a1 100644
--- a/nbbuild/templates/common.xml
+++ b/nbbuild/templates/common.xml
@@ -765,7 +765,6 @@
-
@@ -797,7 +796,6 @@
-
@@ -871,7 +869,6 @@
-
@@ -901,7 +898,6 @@
-
@@ -931,7 +927,6 @@
-
@@ -975,7 +970,6 @@
-
@@ -1011,7 +1005,6 @@
-
@@ -1049,7 +1042,6 @@
-
@@ -1111,7 +1103,6 @@
-
@@ -1143,7 +1134,6 @@
-
@@ -1165,7 +1155,6 @@
-
@@ -1187,7 +1176,6 @@
-
@@ -1270,7 +1258,6 @@
-
diff --git a/platform/core.execution/src/org/netbeans/core/execution/Install.java b/platform/core.execution/src/org/netbeans/core/execution/Install.java
index f977bb0b8f5c..604ec91bb7aa 100644
--- a/platform/core.execution/src/org/netbeans/core/execution/Install.java
+++ b/platform/core.execution/src/org/netbeans/core/execution/Install.java
@@ -29,7 +29,6 @@
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
-import java.beans.Introspector;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.ArrayList;
@@ -50,7 +49,6 @@
import javax.swing.event.ListDataEvent;
import javax.swing.event.ListDataListener;
import javax.swing.text.DefaultEditorKit;
-import org.netbeans.TopSecurityManager;
import org.netbeans.core.ModuleActions;
import org.netbeans.modules.progress.spi.Controller;
import org.netbeans.modules.progress.spi.InternalHandle;
@@ -61,7 +59,6 @@
import org.openide.explorer.ExplorerManager;
import org.openide.explorer.ExplorerUtils;
import org.openide.explorer.view.ListView;
-import org.openide.modules.OnStart;
import org.openide.modules.OnStop;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.Children;
@@ -77,27 +74,19 @@
import org.openide.util.actions.SystemAction;
/**
- * Registers security manager for execution.
* Also shows Pending Tasks dialog at shutdown time.
* Also adds/removes specific beaninfo and property editor search paths.
* @author Jesse Glick
*/
-@OnStart
-public class Install implements Runnable {
+public class Install {
private static final Logger LOG = Logger.getLogger(Install.class.getName());
- public @Override void run() {
- TopSecurityManager.register(SecMan.DEFAULT);
- }
-
@OnStop
public static final class Down implements Runnable {
public @Override void run() {
showPendingTasks();
-
- TopSecurityManager.unregister(SecMan.DEFAULT);
}
}
diff --git a/platform/core.execution/src/org/netbeans/core/execution/SecMan.java b/platform/core.execution/src/org/netbeans/core/execution/SecMan.java
deleted file mode 100644
index 95541adbe36f..000000000000
--- a/platform/core.execution/src/org/netbeans/core/execution/SecMan.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.netbeans.core.execution;
-
-import java.security.*;
-
-import org.openide.execution.NbClassLoader;
-
-/**
- * A security manager for execution.
- * @author Jesse Glick
- */
-public class SecMan extends SecurityManager {
-
- public static SecurityManager DEFAULT = new SecMan();
-
- private static Class nbClassLoaderClass = NbClassLoader.class;
-
- /** thread group of executed classes */
- private ThreadGroup base;
-
- public SecMan() {
- base = ExecutionEngine.base;
- PrivilegedCheck.init();
- AccController.init();
- }
-
- @Override
- public void checkExit(int status) throws SecurityException {
- PrivilegedCheck.checkExit(status, this);
- }
-
- final void checkExitImpl(int status, AccessControlContext acc) throws SecurityException {
- IOPermissionCollection iopc;
- iopc = AccController.getIOPermissionCollection(acc);
-
- if (iopc != null && iopc.grp != null) {
- ExecutionEngine.getTaskIOs().free(iopc.grp, iopc.getIO()); // closes output
- ExecutionEngine.closeGroup(iopc.grp);
- stopTaskThreadGroup(iopc.grp);
- throw new ExitSecurityException("Exit from within execution engine, normal"); // NOI18N
- }
-
- ThreadGroup g = Thread.currentThread().getThreadGroup ();
- if (g instanceof TaskThreadGroup) {
- throw new ExitSecurityException("Exit from within execution engine, normal"); // NOI18N
- }
-
- if (isNbClassLoader()) {
- throw new ExitSecurityException("Exit from within user-loaded code"); // NOI18N
- }
- }
-
- @SuppressWarnings("deprecation")
- private void stopTaskThreadGroup(TaskThreadGroup old) {
- synchronized(old) {
- int count = old.activeCount();
- int icurrent = -1;
- Thread current = Thread.currentThread();
- Thread[] thrs = new Thread[count];
- old.enumerate(thrs, true);
- for (int i = 0; i < thrs.length; i++) {
- if (thrs[i] == null) break;
- if (thrs[i] == current) icurrent = i;
- else thrs[i].stop();
- }
- if (icurrent != -1) thrs[icurrent].stop();
- //throw new ExitSecurityException();
- }
- }
-
- @Override
- public void checkPermission(Permission perm) {
- checkPermission(perm, null);
- }
-
- @Override
- public void checkPermission(Permission perm, Object context) {
- if ("showWindowWithoutWarningBanner".equals(perm.getName())) { // NOI18N
- checkTopLevelWindow(context);
- }
- if (context instanceof AccessControlContext) {
- super.checkPermission(perm, context);
- }
- }
-
- public boolean checkTopLevelWindow(Object window) {
- IOPermissionCollection iopc = AccController.getIOPermissionCollection();
- if (iopc != null && iopc.grp != null && (window instanceof java.awt.Window)) {
- ExecutionEngine.putWindow((java.awt.Window) window, iopc.grp);
- }
- return true;
- }
-
- /** @return true iff an instance of the NbClassLoader class is on the stack
- */
- protected boolean isNbClassLoader() {
- Class[] ctx = getClassContext();
- ClassLoader cloader;
-
- for (int i = 0; i < ctx.length; i++) {
- if ((nbClassLoaderClass.isInstance(ctx[i].getClassLoader())) &&
- (ctx[i].getProtectionDomain().getCodeSource() != null)) {
- return true;
- }
- }
- return false;
- }
-
- /** mostly copied from TopSecurityManager */
- private static final class PrivilegedCheck implements PrivilegedExceptionAction