Mac OS, GroovyConsole, and $Classpath$ for external tools.
I want to run the GroovyConsole using my project's classpath. So I defined an external tool pointing the program at groovyConsole and and specified the parameters -classpath $Classpath$
This failed. The $Classpath$ macro contains all the Java jars from the /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0 directories. Not only is this unnecessary but it causes problems when Groovy tries to load system classes using its classloader. It gets security violations as illustrated by the console output in the attached file.
If I create a tool where I explicitly list the project's jars but exclude the System jars, GroovyConsole works fine.
So, two things:
1. Is this a general Intellij problem or a JetGroovy plugin problem?
2. Is there a simple work around this problem or do I need to write a script to strip the System jars from the classpath?
Thanks.
Erik Husby
Attachment(s):
IdeaGroovyConsoleOutput.txt
请先登录再写评论。
You don't need an external tool for this: just run groovy console main class (sorry, don't remember the fq name exactly) via application run configuration - it is possible to run a class from a library, not only project sources. The classpath will be obtained from the respective module.