Skip to content

Commit

Permalink
Merge pull request #6371 from chrisrueger/remove-setpolicy
Browse files Browse the repository at this point in the history
Fix Bnd Launcher with Java 24
  • Loading branch information
chrisrueger authored Dec 9, 2024
2 parents cc4281a + 6c953a9 commit f309ad5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion biz.aQute.launcher/src/aQute/launcher/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,12 @@ private List<String> split(String value, String separator) {

@SuppressWarnings("removal")
private int activate(String[] args) throws Exception {
java.security.Policy.setPolicy(new AllPolicy());
try {
java.security.Policy.setPolicy(new AllPolicy());
} catch (Throwable e) {
// ignore. Java 24 throws an Exception: Setting a
// system-wide Policy object is not supported
}

systemBundle = createFramework();
if (systemBundle == null)
Expand Down

0 comments on commit f309ad5

Please sign in to comment.