You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2019/11/11 21:34:50 UTC

[GitHub] [groovy] eric-milles edited a comment on issue #1080: GROOVY-9197: Ant: separate compiler classpath from compilation classpath

eric-milles edited a comment on issue #1080: GROOVY-9197: Ant: separate compiler classpath from compilation classpath
URL: https://github.com/apache/groovy/pull/1080#issuecomment-552626569
 
 
   Here is the ProtectionDomain/CodeSource idea:
   ```java
       private void doForkCommandLineList(List<String> commandLineList, Path classpath, String separator) {
           //commandLineList.add("java");
   
           commandLineList.add("-classpath");
           commandLineList.add(
   FileSystemCompiler.class.getProtectionDomain().getCodeSource().getLocation().getPath() +
   File.pathSeparator +
   FileSystemCompilerFacade.class.getProtectionDomain().getCodeSource().getLocation().getPath()
   );
   ```
   
   I have tested this and it does compile successfully.  I'm not sure how portable or safe this is.  Does anyone know the constraints/limits of using ProtectionDomain/CodeSource?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services