You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Jean-Marc Borer <jm...@gmail.com> on 2019/05/15 09:17:59 UTC

Class loading issues between NB 9.0 and NB11.0

Hi all,

This is rather a tricky question.

To locate the application home dir, I used since NB 8.2 a call to
CLIOptions.getHomeDir()  in a ModuleInstall class. To be able to compile
it, I had to add a dependency to in my Maven project:

<dependency>
            <groupId>org.netbeans.modules</groupId>
            <artifactId>org-netbeans-core-startup</artifactId>
            <version>${netbeans.version}</version>
 </dependency>

My application was happy until I tried to use NB platform 11.0

The CLIOptions class is actually not located not a in a module of
platform/modules, but it is part of platform\core\core.jar

The compilation of my module works, but at runtime, my ModuleInstall class
which is in a jar in platform/modules throws a Class not found exception
that CLIOptions cannot be found.

I am surprised since I thought that all classes in the the JARs of
platform/core are available on the classpath of all modules. Actually it
seems something changed between 9.0 and 11.0

Has someone an idea what happened in the class loading between the two
releases?

Best regards