Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-1105

Compiling using NB8.1 as platform does not work in NB9

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 9.0, 11.0
    • 9.0
    • apisupport - Harness
    • None

    Description

      We are going to move to NB9 as our IDE, so we tried to compile our application based on Java8 and NB8.1 in NB9 IDE.

      Successfully set the Java platform to be Java 8 and NB platform+harness to be NB8.1, but when we compile a module containing a @ServiceProvider annotation to inject in the global lookup an implementation of an SPI we get this error:

       

      ...
      Compiling 2 source files to D:\code\test\application\module\build\classes
      error: java.nio.file.NoSuchFileException: D:\code\test\application\module\build\classes\META-INF\services\module.SPI
      1 error
      ...
      

       

      Attached a simple NB rich client application with a single module.

      The problem arises only by using Java8+NB8.1 as platform, whereas using Java10+NB9 as platform it works fine. We also tried to force NB to use Ant from NB8.1 (extide/ant), but nothing changes.

      Something strange is that launching Ant and outputting the environment variables we have this even though we set the JAVA_HOME environment variable to point to Java8:

       

      env.JAVA_HOME=C:\Program Files\Java\jdk1.8.0_181
      java.home=C:\Program Files\Java\jdk-10.0.2
      java.version=10.0.2
      java.specification.version=10
      java.runtime.version=10.0.2+13
      java.vm.version=10.0.2+13
      

      So we guess the problem is with Java or Ant?

      Attachments

        1. application.zip
          14 kB
          matteodg

        Activity

          People

            Unassigned Unassigned
            matteodg@infinito.it matteodg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: