janino-compiler / janino

Janino is a super-small, super-fast Java™ compiler.
http://janino-compiler.github.io/janino
Other
1.21k stars 205 forks source link

Classpath: Class archive file naming #205

Open michaeloffner opened 1 year ago

michaeloffner commented 1 year ago

Hi I wanna use Janino for the open source project Lucee, but i encounter an issue. when i set the classpath for the compiler it does only recognize jar files with the extension .jar, but my jar (OSGi Bundles) are coming with different extensions (.lco). Is there a way that i can teach it also to use a different extension. Even better would be if i simply could define a Classloader.

Thanks for your help Micha

aunkrig commented 1 year ago

Hey Micha,

(A) all of ExpressionEvaluator, ScriptEvaluator, ClassBodyEvaluator and SimpleCompiler have a method setParentClassLoader(ClassLoader) which probably does exactly what you want.

(B) Regarding the "full" compiler (ICompiler): Old JDK versions insisted on class archive files being named ".zip" or ".jar", but no longer. Thus I now removed the file name check in Janino, too.

CU Arno

aunkrig commented 1 year ago

Release 3.1.10 is out the door.

aunkrig commented 10 months ago

Please test.

aunkrig commented 7 months ago

Ping