mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
[FIX] Остатки после удаления агента.
This commit is contained in:
parent
3291d2de6b
commit
b23b033d19
2 changed files with 5 additions and 0 deletions
|
@ -54,6 +54,7 @@ public static void main(String... args) throws Throwable {
|
|||
JVMHelper.verifySystemProperties(Launcher.class, true);
|
||||
EnvHelper.checkDangerousParams();
|
||||
//if(!LauncherAgent.isStarted()) throw new SecurityException("JavaAgent not set");
|
||||
JVMHelper.verifyNoAgent();
|
||||
LogHelper.printVersion("Launcher");
|
||||
LogHelper.printLicense("Launcher");
|
||||
LauncherEngine.checkClass(LauncherEngine.class);
|
||||
|
|
|
@ -180,4 +180,8 @@ public static void verifySystemProperties(Class<?> mainClass, boolean requireSys
|
|||
|
||||
private JVMHelper() {
|
||||
}
|
||||
|
||||
public static void verifyNoAgent() {
|
||||
if (RUNTIME_MXBEAN.getInputArguments().stream().filter(e -> e != null && !e.isEmpty()).anyMatch(e -> e.contains("javaagent"))) throw new SecurityException("JavaAgent found");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue