Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Classpath: Class archive file naming #205

Open
michaeloffner opened this issue Jun 30, 2023 · 4 comments
Open

Classpath: Class archive file naming #205

michaeloffner opened this issue Jun 30, 2023 · 4 comments

Comments

@michaeloffner
Copy link

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 aunkrig changed the title classpath Classpath: Class archive file naming Jul 4, 2023
aunkrig added a commit that referenced this issue Jul 4, 2023
Removed the file name check for class file archives; previously: *.jar and *.zip
@aunkrig
Copy link
Member

aunkrig commented Jul 4, 2023

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
Copy link
Member

aunkrig commented Jul 4, 2023

Release 3.1.10 is out the door.

@aunkrig
Copy link
Member

aunkrig commented Sep 5, 2023

Please test.

@aunkrig
Copy link
Member

aunkrig commented Dec 19, 2023

Ping

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants