<div dir="ltr"><div>Hi all,</div><div><br></div><div>In our work using Javac inside Eclipse IDE in place of ECJ, I'm facing a difficulty for which I have found ugly workarounds (described later) and for which I wonder whether there are already good solutions in place I could reuse instead.</div><div>The problem is that in the IDE, we do want the dependencies (jars, system libraries) to be persisted in memory and reused across resolutions, possibly by various threads and so on.</div><div>Sharing some file managers is not too hard, but making their underlying jars or ct.sym reliably readable across usage is trickier.</div><div><br></div><div>The main issue we face is that all the ZipPath are interruptible by default, which means that whenever a thread aborts (and that's relatively frequent in the IDE), the underlying FileChannel in the ZipPath are closed, making the zip path and then the JavaFileObjects unusable... crashing all its further consumers.</div><div>The workaround we have in place is to use reflection to access the FileChannel in the ZipPath and mark it as non-interruptible, but that code is a bad smell and even the way we've used it remains fragile in term of sequencing (there is still room for an interruption).</div><div><br></div><div>So I'm wondering whether someone has a better solution about such a "JavaFileManagerSharingLibraries" (maybe some good implementation already exists), or if someone has had similar concerns with interrupted JavaFileObject and could recommend a better strategy than our workaround based on reflection?</div><div><br></div><div>Thanks in advance</div><div>Mickael<br clear="all"></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Mickael Istria<br></div><a href="https://www.eclipse.org/eclipseide" target="_blank">Eclipse IDE</a> developer, for <a href="https://developers.redhat.com/" target="_blank">Red Hat</a></div></div></div></div></div></div></div>