HotswapProjects/HotswapAgent

Can not get a JavaCompiler instance with jbr_17.0.7

spilledyear opened this issue · 1 comments

ENV

  1. hotSwapAgent version: 1.4.2-SNAPSHOT
  2. JDK: jbrsdk-17.0.9-linux-x64-b1087.3.tar.gz
  3. start with:
    --add-opens=java.base/java.lang=ALL-UNNAMED
    --add-opens=java.base/java.util=ALL-UNNAMED
    --add-opens=java.base/java.lang.reflect=ALL-UNNAMED
    --add-opens=java.base/java.io=ALL-UNNAMED
    --add-opens=java.base/sun.nio.ch=ALL-UNNAMED
    -XX:+AllowEnhancedClassRedefinition
    -XX:XX:HotswapAgent=external
    -javaagent:/Users/admin/Downloads/hotswap-agent.jar

question

can not get a JavaCompiler instance with DynamicCompileToolProvider#JavaCompiler.

    private static final String defaultJavaCompilerName = "com.sun.tools.javac.api.JavacTool";

    /**
     * Gets the Java™ programming language compiler provided
     * with this platform.
     * @return the compiler provided with this platform or
     * {@code null} if no compiler is provided
     */
    public static JavaCompiler getSystemJavaCompiler() {
        return instance().getSystemTool(JavaCompiler.class, defaultJavaCompilerName);
    }

i see the code in javax.tools.ToolProvider look like
aa025b19-6818-4ebe-bafe-bfb30981d59f

Couldn't be decomplied . so can you tell me how to get a JavaCompiler instance in JBR_17.0.7

It seems that it is not HA issue but JBR issue, I suggest to ask the question on JBR YT : https://youtrack.jetbrains.com/issues/JBR