Skip to content

Commit

Permalink
boxpiler now knows where to find itself.
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Apr 10, 2024
1 parent b5a547b commit 56b5cf8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,9 @@ private void compileSource( String javaSource, String fqn ) {
fileManager.setLocation( StandardLocation.CLASS_OUTPUT, Arrays.asList( classGenerationDirectory.toFile() ) );

String javaRT = System.getProperty( "java.class.path" );
String jarPath = getClass().getProtectionDomain().getCodeSource().getLocation().getPath();
List<JavaFileObject> sourceFiles = Collections.singletonList( new JavaSourceString( fqn, javaSource ) );
List<String> options = List.of( "-g" );
List<String> options = List.of( "-g", "-cp", jarPath );
JavaCompiler.CompilationTask task = compiler.getTask( null, fileManager, diagnostics, options, null, sourceFiles );
boolean compilerResult = task.call();

Expand Down

0 comments on commit 56b5cf8

Please sign in to comment.