Skip to content

Commit

Permalink
Java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Hammad committed Oct 21, 2024
1 parent 90545ed commit c4038d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test/java/org/dvare/dynamic/SourceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ public void stringSourceImportCompileTest() throws Exception {

DynamicCompiler dynamicCompiler = new DynamicCompiler();
try {
Class.forName("com.sun.tools.sjavac.Module"); //if java module present
dynamicCompiler.addCompilerOption(DynamicCompilerOption.ADD_EXPORTS, "java.base/java.time=ALL-UNNAMED");
if (DynamicCompiler.isJava9OrAbove())//if java module present
{
dynamicCompiler.addCompilerOption(DynamicCompilerOption.ADD_EXPORTS, "java.base/java.time=ALL-UNNAMED");
}
} catch (Exception ignored) {
}
dynamicCompiler.addSource("org.dvare.dynamic.DateUtil", sourceCode);
Expand Down

0 comments on commit c4038d5

Please sign in to comment.