|
Sweet Home 3D Forum » List all forums » » Forum: Developers » » » Thread: How to load "foreign" jars from a Plugin? » » » » Post: Re: How to load "foreign" jars from a Plugin? |
Print at Dec 20, 2025, 5:31:53 AM |
| Posted by clanmills at Mar 2, 2015, 8:33:44 PM |
Re: How to load "foreign" jars from a Plugin?Thanks, Emmanuel. I can't persuade Eclipse to do that. I've tried unzipping the jar and adding it that way. Then I get compilation errors. However, that can't work because the tree of dependencies could be vast. And we don't want duplicate code loaded. I'm not sure jars should be in a jar. If another Plugin happened to use the same jar, you'd want the JVM to share. So, I think we have to tell the JVM - "load it from here". The Plugin loads and executes (updates the UI). The moment the Plugin wants to use anything from the jars, it throws ClassDefNotFound. It feels to me that I have to modify the CLASSPATH and then he'd find the libraries. However, I think CLASSPATH is only used when java starts to initialise the ClassLoader. I've tried other ideas such as putting the jars in the plugins directory and into the SW3D directories. Tomorrow's another day. This isn't difficult, however it is mysterious! I'm going to the dentist tomorrow. That'll be more fun. |
|
|
Current timezone is GMT Dec 20, 2025, 5:31:53 AM |