lkishalmi commented on code in PR #75:
URL: https://github.com/apache/netbeans-tools/pull/75#discussion_r1938577137


##########
snap-packages/launchers/patch-netbeans-conf:
##########
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# If the user has a custom netbeans.conf. Disable Java Security Manager as of 
NetBeans 25
+if [ -f "$SNAP_USER_DATA/etc/netbeans.conf" ]; then
+    if ! grep -q '^netbeans_default_options=".*-J-Djava.lang.Runtime.level=' 
$SNAP_USER_DATA/etc/netbeans.conf ; then
+        sed -i 
's/netbeans_default_options="/netbeans_default_options="-J-Djava.lang.Runtime.level=FINE
 /' $SNAP_USER_DATA/etc/netbeans.conf
+    fi
+    if ! grep -q 
'^netbeans_default_options=".*-J-DTopSecurityManager.disable=' 
$SNAP_USER_DATA/etc/netbeans.conf ; then
+        sed -i 
's/netbeans_default_options="/netbeans_default_options="-J-DTopSecurityManager.disable=true
 /' $SNAP_USER_DATA/etc/netbeans.conf
+    fi
+fi

Review Comment:
   This will be executed before every NetBeans start.
   
   When the Security Manager gets removed from NB26, I'd update this one, to 
have these removed or just leave the custom `netbeans.conf` alone.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to