This is an automated email from the ASF dual-hosted git repository.

jlahoda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-jackpot30.git


The following commit(s) were added to refs/heads/master by this push:
     new 840703b  Updating to NetBeans 13
840703b is described below

commit 840703b1e90f4c69c087f7a48d9780fcb7c200af
Author: Jan Lahoda <jlah...@netbeans.org>
AuthorDate: Sun Apr 3 11:00:55 2022 +0200

    Updating to NetBeans 13
---
 .travis.yml                                        |  15 +-
 cmdline/README.md                                  |   8 +-
 cmdline/build.xml                                  |  27 +-
 cmdline/lib/nbproject/project.properties           |   1 -
 cmdline/lib/nbproject/project.xml                  |   3 +-
 .../jackpot30/cmdline/lib/CreateStandaloneJar.java |   8 +-
 .../modules/jackpot30/cmdline/lib/TestUtils.java   |  59 ++++
 cmdline/maven/pom.xml                              |   2 +-
 .../modules/jackpot30/maven/RunJackpot30.java      |   2 +-
 .../modules/jackpot30/maven/RunJackpot30Test.java  |   2 +-
 cmdline/nbproject/project.properties               |   4 +-
 cmdline/processor/build.xml                        |  43 +++
 cmdline/processor/manifest.mf                      |   5 +
 cmdline/processor/nbproject/build-impl.xml         |  62 ++++
 .../nbproject/genfiles.properties}                 |  14 +-
 .../nbproject/project.properties                   |   5 +
 cmdline/{tool => processor}/nbproject/project.xml  |   2 +-
 .../nbproject/suite.properties}                    |   6 +-
 .../jackpot30/cmdline/processor/Bundle.properties} |   6 +-
 .../cmdline/processor}/ProcessorImpl.java          |   4 +-
 .../jackpot30/cmdline/processor}/cfg_hints.xml     |   0
 .../cmdline/processor/CreateToolProcessor.java}    |  24 +-
 .../processor}/CreateToolProcessorTest.java        |   4 +-
 .../cmdline/processor}/ProcessorImplTest.java      |  13 +-
 .../jackpot30/cmdline/processor}/Utils.java        |  53 +---
 cmdline/tool/build.xml                             |  15 +-
 cmdline/tool/nbproject/project.properties          |   4 +
 cmdline/tool/nbproject/project.xml                 |   8 +
 cmdline/tool/scripts/LICENSE-bin-tool.txt          | 352 +++++++++++++++++++++
 cmdline/tool/scripts/jackpot                       |   2 +-
 cmdline/tool/scripts/pom.xml                       |   2 +-
 .../netbeans/modules/jackpot30/cmdline/Main.java   |   2 -
 .../modules/jackpot30/cmdline/CreateTool.java      |   8 +-
 .../modules/jackpot30/cmdline/CreateToolTest.java  |   2 +-
 .../modules/jackpot30/cmdline/MainTest.java        |  44 +--
 .../netbeans/modules/jackpot30/cmdline/Utils.java  |  52 +--
 36 files changed, 667 insertions(+), 196 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 9e0c2d3..2555715 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,15 +22,16 @@ addons:
       - ant
       - ant-optional
       - openjdk-8-jdk
+      - openjdk-11-jdk
+      - openjdk-17-jdk
 jdk:
-  - openjdk11
+  - openjdk8
 before_script:
-  - wget 
'https://www.apache.org/dist/netbeans/netbeans/12.5/netbeans-12.5-bin.zip' -O 
/tmp/netbeans-12.5-bin.zip
-  - (cd $HOME; unzip /tmp/netbeans-12.5-bin.zip)
+  - wget 
'https://downloads.apache.org/netbeans/netbeans/13/netbeans-13-bin.zip' -O 
/tmp/netbeans-13-bin.zip
+  - (cd $HOME; unzip /tmp/netbeans-13-bin.zip)
   - unset _JAVA_OPTIONS
 script:
-  - export JDK11=$JAVA_HOME
-  - export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
-  - export PATH=$JAVA_HOME/bin:$PATH
+  - export JDK11=/usr/lib/jvm/java-11-openjdk-amd64
+  - export JDK17=/usr/lib/jvm/java-17-openjdk-amd64
   - (cd cmdline; ant -Dnbplatform.default.harness.dir=$HOME/netbeans/harness 
rat)
-  - (cd cmdline; ant -Dnbplatform.default.harness.dir=$HOME/netbeans/harness 
-DNETBEANS_PLATFORM=$HOME/netbeans -DJDK11=$JDK11 build-and-test)
+  - (cd cmdline; ant -Dnbplatform.default.harness.dir=$HOME/netbeans/harness 
-DNETBEANS_PLATFORM=$HOME/netbeans -DJDK11=$JDK11 -DJDK17=$JDK17 build-and-test)
diff --git a/cmdline/README.md b/cmdline/README.md
index 094ccf7..99a76a5 100644
--- a/cmdline/README.md
+++ b/cmdline/README.md
@@ -27,22 +27,22 @@ This tool allows to run NetBeans Java code checker without 
the NetBeans IDE. Thi
 
 #### To Build
 
-* Apache NetBeans 12.5
-* JDK 8 and JDK 11
+* Apache NetBeans 13.0
+* JDK 8, JDK 11 and JDK 17
 * bash
 * Apache ant 1.9.9 or above
 * Apache Maven 3.3.9 or above
 
 #### To Run
 
-* JDK 11
+* JDK 8-17
 
 ### Building
 
 Build using:
 
 ```
-$ ant -DNETBEANS_PLATFORM=<path-to-NetBeans-12.5> -DJDK11=<path-to-JDK-11> 
build-and-test
+$ ant -DNETBEANS_PLATFORM=<path-to-NetBeans-13.0> -DJDK11=<path-to-JDK-11> 
-DJDK17=<path-to-JDK-17> build-and-test
 ```
 
 The built product is in tool/build/jackpot.
diff --git a/cmdline/build.xml b/cmdline/build.xml
index f386b5e..c11008a 100644
--- a/cmdline/build.xml
+++ b/cmdline/build.xml
@@ -52,33 +52,49 @@
     </target>
 
     <target name="build-and-test">
-        <property name="version" value="12.5" />
+        <property name="version" value="13.0" />
         <condition property="jackpot.root" value="${basedir}" 
else="${basedir}/..">
             <available file="${basedir}/LICENSE" />
         </condition>
         <ant dir="${basedir}" inheritAll="false" inheritRefs="false">
             <property name="nbplatform.default.harness.dir" 
value="${NETBEANS_PLATFORM}/harness" />
             <property name="nbplatform.default.netbeans.dest.dir" 
value="${NETBEANS_PLATFORM}" />
-            <property name="test.run.args" 
value="--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED" />
-            <property name="test.nbjdk.home" value="${JDK11}" />
             <property name="jackpot.root" location="${jackpot.root}" />
             <target name="clean" />
             <target name="build" />
             <target name="test" />
         </ant>
+        <ant dir="${basedir}" inheritAll="false" inheritRefs="false">
+            <property name="nbplatform.default.harness.dir" 
value="${NETBEANS_PLATFORM}/harness" />
+            <property name="nbplatform.default.netbeans.dest.dir" 
value="${NETBEANS_PLATFORM}" />
+            <property name="test.nbjdk.home" value="${JDK11}" />
+            <property name="jackpot.root" location="${jackpot.root}" />
+            <target name="test" />
+        </ant>
+        <ant dir="${basedir}" inheritAll="false" inheritRefs="false">
+            <property name="nbplatform.default.harness.dir" 
value="${NETBEANS_PLATFORM}/harness" />
+            <property name="nbplatform.default.netbeans.dest.dir" 
value="${NETBEANS_PLATFORM}" />
+            <property name="test.nbjdk.home" value="${JDK17}" />
+            <property name="jackpot.root" location="${jackpot.root}" />
+            <target name="test" />
+        </ant>
         <ant dir="${basedir}/tool" target="create-standalone-tool" 
inheritAll="false" inheritRefs="false">
             <property name="nbplatform.default.harness.dir" 
value="${NETBEANS_PLATFORM}/harness" />
             <property name="nbplatform.default.netbeans.dest.dir" 
value="${NETBEANS_PLATFORM}" />
             <property name="continue.after.failing.tests" value="false" />
-            <property name="test.run.args" 
value="--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED" />
-            <property name="test.nbjdk.home" value="${JDK11}" />
             <property name="jackpot.root" location="${jackpot.root}" />
         </ant>
         <property environment="env"/>
         <exec executable="build/test/scripted/run" dir="tool" 
failonerror="true">
+        </exec>
+        <exec executable="build/test/scripted/run" dir="tool" 
failonerror="true">
             <env key="JAVA_HOME" path="${JDK11}" />
             <env key="PATH" path="${JDK11}/bin:${env.PATH}" />
         </exec>
+        <exec executable="build/test/scripted/run" dir="tool" 
failonerror="true">
+            <env key="JAVA_HOME" path="${JDK17}" />
+            <env key="PATH" path="${JDK17}/bin:${env.PATH}" />
+        </exec>
         <echo>Installing tool to the local maven repository:</echo>
         <exec dir="." executable="mvn" failonerror="true">
             <arg line="install:install-file 
-Dfile=tool/build/jackpot/jackpot.jar 
-DgroupId=org.apache.netbeans.modules.jackpot30 -DartifactId=tool 
-Dversion=${version} -Dpackaging=jar -DpomFile=tool/scripts/pom.xml" />
@@ -89,7 +105,6 @@
         </exec>
         <echo>Run plugin tests:</echo>
         <exec dir="maven" executable="mvn" failonerror="true">
-            <env key="JAVA_HOME" path="${JDK11}" />
             <arg line="-Dmaven.executable=mvn 
-Djackpot.plugin.version=${version} test" />
         </exec>
         <property name="build.maven.repo" location="build/.m2" />
diff --git a/cmdline/lib/nbproject/project.properties 
b/cmdline/lib/nbproject/project.properties
index 20a0642..3ff4e3b 100644
--- a/cmdline/lib/nbproject/project.properties
+++ b/cmdline/lib/nbproject/project.properties
@@ -17,4 +17,3 @@ is.autoload=true
 javac.source=1.8
 javac.compilerargs=-Xlint -Xlint:-serial
 spec.version.base=1.16.0
-cp.extra=${tools.jar}
diff --git a/cmdline/lib/nbproject/project.xml 
b/cmdline/lib/nbproject/project.xml
index bbc68bc..80cb184 100644
--- a/cmdline/lib/nbproject/project.xml
+++ b/cmdline/lib/nbproject/project.xml
@@ -50,11 +50,10 @@
                     </run-dependency>
                 </dependency>
                 <dependency>
-                    
<code-name-base>org.netbeans.libs.javacimpl</code-name-base>
+                    
<code-name-base>org.netbeans.libs.nbjavacapi</code-name-base>
                     <build-prerequisite/>
                     <compile-dependency/>
                     <run-dependency>
-                        <release-version>1</release-version>
                         <implementation-version/>
                     </run-dependency>
                 </dependency>
diff --git 
a/cmdline/lib/test/unit/src/org/netbeans/modules/jackpot30/cmdline/lib/CreateStandaloneJar.java
 
b/cmdline/lib/test/unit/src/org/netbeans/modules/jackpot30/cmdline/lib/CreateStandaloneJar.java
index 77e5abe..ce9bfa4 100644
--- 
a/cmdline/lib/test/unit/src/org/netbeans/modules/jackpot30/cmdline/lib/CreateStandaloneJar.java
+++ 
b/cmdline/lib/test/unit/src/org/netbeans/modules/jackpot30/cmdline/lib/CreateStandaloneJar.java
@@ -565,6 +565,12 @@ public abstract class CreateStandaloneJar extends 
NbTestCase {
             "net.bytebuddy.",
             "joptsimple.",
             "io.reflectoring.diffparser.",
-            "org.slf4j."
+            "org.slf4j.",
+            "com.sun.source.",
+            "com.sun.tools.",
+            "javax.tools.",
+            "javax.annotation.processing.",
+            "javax.lang.model.",
+            "nbjavac."
     ));
 }
diff --git 
a/cmdline/lib/test/unit/src/org/netbeans/modules/jackpot30/cmdline/lib/TestUtils.java
 
b/cmdline/lib/test/unit/src/org/netbeans/modules/jackpot30/cmdline/lib/TestUtils.java
new file mode 100644
index 0000000..2ef9a5c
--- /dev/null
+++ 
b/cmdline/lib/test/unit/src/org/netbeans/modules/jackpot30/cmdline/lib/TestUtils.java
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.modules.jackpot30.cmdline.lib;
+
+import java.io.ByteArrayInputStream;
+import java.io.EOFException;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.List;
+import static junit.framework.TestCase.assertNotNull;
+import org.openide.filesystems.FileUtil;
+
+public class TestUtils {
+
+    //from TestUtilities:
+    public final static File copyStringToFile (File f, String content) throws 
Exception {
+        FileOutputStream os = new FileOutputStream(f);
+        InputStream is = new ByteArrayInputStream(content.getBytes("UTF-8"));
+
+        FileUtil.copy(is, os);
+
+        os.close ();
+        is.close();
+
+        return f;
+
+    }
+    
+    public final static String copyFileToString (java.io.File f) throws 
java.io.IOException {
+        int s = (int)f.length ();
+        byte[] data = new byte[s];
+        int len = new FileInputStream (f).read (data);
+
+        if (len != s)
+            throw new EOFException("truncated file");
+
+        return new String (data);
+    }
+
+}
diff --git a/cmdline/maven/pom.xml b/cmdline/maven/pom.xml
index 6c61c58..1b7c813 100644
--- a/cmdline/maven/pom.xml
+++ b/cmdline/maven/pom.xml
@@ -21,7 +21,7 @@
 
   <groupId>org.apache.netbeans.modules.jackpot30</groupId>
   <artifactId>jackpot30-maven-plugin</artifactId>
-  <version>12.5</version>
+  <version>13.0</version>
   <packaging>maven-plugin</packaging>
 
   <name>Jackpot 3.0 Command Line Tool Maven Bridge</name>
diff --git 
a/cmdline/maven/src/main/java/org/netbeans/modules/jackpot30/maven/RunJackpot30.java
 
b/cmdline/maven/src/main/java/org/netbeans/modules/jackpot30/maven/RunJackpot30.java
index 7eedb75..423cd73 100644
--- 
a/cmdline/maven/src/main/java/org/netbeans/modules/jackpot30/maven/RunJackpot30.java
+++ 
b/cmdline/maven/src/main/java/org/netbeans/modules/jackpot30/maven/RunJackpot30.java
@@ -92,7 +92,7 @@ public abstract class RunJackpot30 extends AbstractMojo {
             }
             cmdLine.addAll(0, 
Arrays.asList(launcher.toAbsolutePath().toString(),
                                             "-classpath", 
Main.class.getProtectionDomain().getCodeSource().getLocation().getPath(),
-                                            
"--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
+                                            "-XX:+IgnoreUnrecognizedVMOptions",
                                             
"--add-opens=java.base/java.net=ALL-UNNAMED",
                                             
"--add-opens=java.desktop/sun.awt=ALL-UNNAMED",
                                             Main.class.getCanonicalName()));
diff --git 
a/cmdline/maven/src/test/java/org/netbeans/modules/jackpot30/maven/RunJackpot30Test.java
 
b/cmdline/maven/src/test/java/org/netbeans/modules/jackpot30/maven/RunJackpot30Test.java
index 1e64e92..4afc5d3 100644
--- 
a/cmdline/maven/src/test/java/org/netbeans/modules/jackpot30/maven/RunJackpot30Test.java
+++ 
b/cmdline/maven/src/test/java/org/netbeans/modules/jackpot30/maven/RunJackpot30Test.java
@@ -67,7 +67,7 @@ public class RunJackpot30Test extends TestCase {
 
         Process p = Runtime.getRuntime().exec(new String[] {
             maven,
-            "-Djackpot.plugin.version=12.5",
+            "-Djackpot.plugin.version=13.0",
             "-q",
             "jackpot30:analyze"
         }, null, testDir);
diff --git a/cmdline/nbproject/project.properties 
b/cmdline/nbproject/project.properties
index 3585040..36ab46d 100644
--- a/cmdline/nbproject/project.properties
+++ b/cmdline/nbproject/project.properties
@@ -15,7 +15,9 @@
 
 modules=\
     ${project.org.netbeans.modules.jackpot30.cmdline.lib}:\
-    ${project.org.netbeans.modules.jackpot30.cmdline}
+    ${project.org.netbeans.modules.jackpot30.cmdline}:\
+    ${project.org.netbeans.modules.jackpot30.cmdline.processor}
 project.org.netbeans.modules.jackpot30.cmdline=tool
 project.org.netbeans.modules.jackpot30.cmdline.lib=lib
 
+project.org.netbeans.modules.jackpot30.cmdline.processor=processor
diff --git a/cmdline/processor/build.xml b/cmdline/processor/build.xml
new file mode 100644
index 0000000..6224c52
--- /dev/null
+++ b/cmdline/processor/build.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- You may freely edit this file. See harness/README in the NetBeans 
platform -->
+<!-- for some information on what you could do (e.g. targets to override). -->
+<!-- If you delete this file and reopen the project it will be recreated. -->
+<project name="org.netbeans.modules.jackpot30.cmdline" default="netbeans" 
basedir=".">
+    <description>Builds, tests, and runs the project 
org.netbeans.modules.jackpot30.cmdline.</description>
+    <import file="nbproject/build-impl.xml"/>
+    <!--<import file="${suite.dir}/../findbugs-import.xml"/>-->
+
+    <target name="build-init" depends="harness.build-init,-setup.test.config" 
/>
+
+    <target name="-setup.test.config" depends="harness.build-init">
+        <property name="test.nbjdk.home" location="${nbjdk.home}" />
+        <!--<condition property="test.bootclasspath.prepend.args"-->
+        <condition property="test.config.default.includes"
+                   value="NOTHING">
+            <not>
+                <or>
+                    <available classpath="${test.nbjdk.home}/lib/ct.sym" 
resource="H/java.base/java/lang/System.sig" />
+                    <available classpath="${test.nbjdk.home}/lib/ct.sym" 
resource="H/system-modules" />
+                </or>
+            </not>
+        </condition>
+    </target>
+
+</project>
diff --git a/cmdline/processor/manifest.mf b/cmdline/processor/manifest.mf
new file mode 100644
index 0000000..6b12e2f
--- /dev/null
+++ b/cmdline/processor/manifest.mf
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+OpenIDE-Module: org.netbeans.modules.jackpot30.cmdline.processor
+OpenIDE-Module-Implementation-Version: 1
+OpenIDE-Module-Localizing-Bundle: 
org/netbeans/modules/jackpot30/cmdline/processor/Bundle.properties
+
diff --git a/cmdline/processor/nbproject/build-impl.xml 
b/cmdline/processor/nbproject/build-impl.xml
new file mode 100644
index 0000000..81ada4f
--- /dev/null
+++ b/cmdline/processor/nbproject/build-impl.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT  ***
+***         EDIT ../build.xml INSTEAD         ***
+-->
+<project name="org.netbeans.modules.jackpot30.cmdline-impl" basedir="..">
+    <fail message="Please build using Ant 1.7.1 or higher.">
+        <condition>
+            <not>
+                <antversion atleast="1.7.1"/>
+            </not>
+        </condition>
+    </fail>
+    <property file="nbproject/private/suite-private.properties"/>
+    <property file="nbproject/suite.properties"/>
+    <fail unless="suite.dir">You must set 'suite.dir' to point to your 
containing module suite</fail>
+    <property 
file="${suite.dir}/nbproject/private/platform-private.properties"/>
+    <property file="${suite.dir}/nbproject/platform.properties"/>
+    <macrodef name="property" 
uri="http://www.netbeans.org/ns/nb-module-project/2";>
+        <attribute name="name"/>
+        <attribute name="value"/>
+        <sequential>
+            <property name="@{name}" value="${@{value}}"/>
+        </sequential>
+    </macrodef>
+    <macrodef name="evalprops" 
uri="http://www.netbeans.org/ns/nb-module-project/2";>
+        <attribute name="property"/>
+        <attribute name="value"/>
+        <sequential>
+            <property name="@{property}" value="@{value}"/>
+        </sequential>
+    </macrodef>
+    <property file="${user.properties.file}"/>
+    <nbmproject2:property name="harness.dir" 
value="nbplatform.${nbplatform.active}.harness.dir" 
xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <nbmproject2:property name="nbplatform.active.dir" 
value="nbplatform.${nbplatform.active}.netbeans.dest.dir" 
xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <nbmproject2:evalprops property="cluster.path.evaluated" 
value="${cluster.path}" 
xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <fail message="Path to 'platform' cluster missing in $${cluster.path} 
property or using corrupt Netbeans Platform (missing harness).">
+        <condition>
+            <not>
+                <contains string="${cluster.path.evaluated}" 
substring="platform"/>
+            </not>
+        </condition>
+    </fail>
+    <import file="${harness.dir}/build.xml"/>
+</project>
diff --git a/cmdline/tool/scripts/jackpot 
b/cmdline/processor/nbproject/genfiles.properties
old mode 100755
new mode 100644
similarity index 62%
copy from cmdline/tool/scripts/jackpot
copy to cmdline/processor/nbproject/genfiles.properties
index d7774fd..710d2a4
--- a/cmdline/tool/scripts/jackpot
+++ b/cmdline/processor/nbproject/genfiles.properties
@@ -1,5 +1,3 @@
-#!/bin/bash
-
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
@@ -15,7 +13,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-
-JACKPOT_JAR=`readlink -f "$0"`
-JACKPOT_JAR=`dirname "$JACKPOT_JAR"`/jackpot.jar
-java -XX:+IgnoreUnrecognizedVMOptions 
--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED 
--add-opens=java.base/java.net=ALL-UNNAMED 
--add-opens=java.desktop/sun.awt=ALL-UNNAMED -classpath `dirname 
"$JACKPOT_JAR"`/jackpot.jar org.netbeans.modules.jackpot30.cmdline.Main "$@"
+build.xml.data.CRC32=e6358ca2
+build.xml.script.CRC32=4c2aebb3
+build.xml.stylesheet.CRC32=a56c6a5b@1.44
+# This file is used by a NetBeans-based IDE to track changes in generated 
files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never 
regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=8514a197
+nbproject/build-impl.xml.script.CRC32=08f1fb11
+nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.73
diff --git a/cmdline/tool/nbproject/project.properties 
b/cmdline/processor/nbproject/project.properties
similarity index 70%
copy from cmdline/tool/nbproject/project.properties
copy to cmdline/processor/nbproject/project.properties
index eaafa90..e207bbc 100644
--- a/cmdline/tool/nbproject/project.properties
+++ b/cmdline/processor/nbproject/project.properties
@@ -18,3 +18,8 @@ javac.compilerargs=-Xlint -Xlint:-serial
 
cp.extra=build/jopt-simple-3.2.jar:build/diffparser-1.4.jar:build/slf4j-api-1.7.25.jar:build/slf4j-nop-1.7.25.jar:${tools.jar}
 spec.version.base=1.16.0
 test.timeout=6000000
+#test.bootclasspath.prepend.args=-Xbootclasspath/p:/home/lahvac/tools/netbeans/trunk/netbeans/java/modules/ext/nb-javac-jdk-17-api.jar:/home/lahvac/tools/netbeans/trunk/netbeans/java/modules/ext/nb-javac-jdk-17.jar
+#test.bootclasspath.prepend.args=--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
+test.bootclasspath.prepend.args=--add-opens=java.base/java.net=ALL-UNNAMED
+#requires.nb.javac=true
+
diff --git a/cmdline/tool/nbproject/project.xml 
b/cmdline/processor/nbproject/project.xml
similarity index 99%
copy from cmdline/tool/nbproject/project.xml
copy to cmdline/processor/nbproject/project.xml
index 0cced1a..7b02337 100644
--- a/cmdline/tool/nbproject/project.xml
+++ b/cmdline/processor/nbproject/project.xml
@@ -20,7 +20,7 @@
     <type>org.netbeans.modules.apisupport.project</type>
     <configuration>
         <data xmlns="http://www.netbeans.org/ns/nb-module-project/3";>
-            
<code-name-base>org.netbeans.modules.jackpot30.cmdline</code-name-base>
+            
<code-name-base>org.netbeans.modules.jackpot30.cmdline.processor</code-name-base>
             <suite-component/>
             <module-dependencies>
                 <dependency>
diff --git a/cmdline/lib/nbproject/project.properties 
b/cmdline/processor/nbproject/suite.properties
similarity index 86%
copy from cmdline/lib/nbproject/project.properties
copy to cmdline/processor/nbproject/suite.properties
index 20a0642..5f42472 100644
--- a/cmdline/lib/nbproject/project.properties
+++ b/cmdline/processor/nbproject/suite.properties
@@ -13,8 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-is.autoload=true
-javac.source=1.8
-javac.compilerargs=-Xlint -Xlint:-serial
-spec.version.base=1.16.0
-cp.extra=${tools.jar}
+suite.dir=${basedir}/..
diff --git a/cmdline/lib/nbproject/project.properties 
b/cmdline/processor/src/org/netbeans/modules/jackpot30/cmdline/processor/Bundle.properties
similarity index 86%
copy from cmdline/lib/nbproject/project.properties
copy to 
cmdline/processor/src/org/netbeans/modules/jackpot30/cmdline/processor/Bundle.properties
index 20a0642..6f4319d 100644
--- a/cmdline/lib/nbproject/project.properties
+++ 
b/cmdline/processor/src/org/netbeans/modules/jackpot30/cmdline/processor/Bundle.properties
@@ -13,8 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-is.autoload=true
-javac.source=1.8
-javac.compilerargs=-Xlint -Xlint:-serial
-spec.version.base=1.16.0
-cp.extra=${tools.jar}
+OpenIDE-Module-Name=Jackpot 3.0 Processor
diff --git 
a/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/ProcessorImpl.java 
b/cmdline/processor/src/org/netbeans/modules/jackpot30/cmdline/processor/ProcessorImpl.java
similarity index 99%
rename from 
cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/ProcessorImpl.java
rename to 
cmdline/processor/src/org/netbeans/modules/jackpot30/cmdline/processor/ProcessorImpl.java
index 6082d4d..71e38c9 100644
--- a/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/ProcessorImpl.java
+++ 
b/cmdline/processor/src/org/netbeans/modules/jackpot30/cmdline/processor/ProcessorImpl.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.netbeans.modules.jackpot30.cmdline;
+package org.netbeans.modules.jackpot30.cmdline.processor;
 
 import com.sun.source.tree.CompilationUnitTree;
 import com.sun.source.tree.Tree;
@@ -177,7 +177,7 @@ public class ProcessorImpl extends AbstractProcessor {
             File configurationFile = configurationFileLoc != null ? new 
File(configurationFileLoc) : null;
 
             if (configurationFile == null || !configurationFile.canRead()) {
-                URL cfg = 
ProcessorImpl.class.getResource("/org/netbeans/modules/jackpot30/cmdline/cfg_hints.xml");
+                URL cfg = 
ProcessorImpl.class.getResource("/org/netbeans/modules/jackpot30/cmdline/processor/cfg_hints.xml");
                 Path tmp = Files.createTempFile("cfg_hints", "xml"); //TODO: 
delete
                 try (InputStream cfgIn = cfg.openStream();
                      OutputStream out = Files.newOutputStream(tmp)) {
diff --git 
a/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/cfg_hints.xml 
b/cmdline/processor/src/org/netbeans/modules/jackpot30/cmdline/processor/cfg_hints.xml
similarity index 100%
rename from 
cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/cfg_hints.xml
rename to 
cmdline/processor/src/org/netbeans/modules/jackpot30/cmdline/processor/cfg_hints.xml
diff --git 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/CreateTool.java
 
b/cmdline/processor/test/unit/src/org/netbeans/modules/jackpot30/cmdline/processor/CreateToolProcessor.java
similarity index 66%
copy from 
cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/CreateTool.java
copy to 
cmdline/processor/test/unit/src/org/netbeans/modules/jackpot30/cmdline/processor/CreateToolProcessor.java
index 4b9b021..5d68523 100644
--- 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/CreateTool.java
+++ 
b/cmdline/processor/test/unit/src/org/netbeans/modules/jackpot30/cmdline/processor/CreateToolProcessor.java
@@ -16,12 +16,12 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.netbeans.modules.jackpot30.cmdline;
+package org.netbeans.modules.jackpot30.cmdline.processor;
 
 import java.util.regex.Pattern;
 import javax.annotation.processing.Processor;
-import org.netbeans.modules.jackpot30.cmdline.Main.BCPFallBack;
-import org.netbeans.modules.jackpot30.cmdline.Main.SourceLevelQueryImpl;
+//import org.netbeans.modules.jackpot30.cmdline.Main.BCPFallBack;
+//import org.netbeans.modules.jackpot30.cmdline.Main.SourceLevelQueryImpl;
 import org.netbeans.modules.jackpot30.cmdline.lib.CreateStandaloneJar;
 import org.netbeans.modules.jackpot30.cmdline.lib.CreateStandaloneJar.Info;
 import org.netbeans.modules.java.hints.declarative.PatternConvertorImpl;
@@ -37,24 +37,26 @@ import 
org.netbeans.spi.java.queries.SourceLevelQueryImplementation2;
  *
  * @author lahvac
  */
-public class CreateTool extends CreateStandaloneJar {
+public class CreateToolProcessor extends CreateStandaloneJar {
 
-    public CreateTool(String name) {
+    public CreateToolProcessor(String name) {
         super(name, "jackpot");
     }
 
     @Override
     protected Info computeInfo() {
-        return new Info().addAdditionalRoots(Main.class.getName(), 
DeclarativeHintsTestBase.class.getName(), 
OpenProjectsTrampolineImpl.class.getName(), J2SEProject.class.getName(), 
DefaultJavaPlatformProvider.class.getName(), 
PatternConvertorImpl.class.getName(), ProcessorImpl.class.getName(), 
BCPFallBack.class.getName(), "org.slf4j.impl.StaticLoggerBinder")
-                         
.addAdditionalResources("org/netbeans/modules/java/hints/resources/Bundle.properties",
 "org/netbeans/modules/java/hints/declarative/resources/Bundle.properties", 
"org/netbeans/modules/jackpot30/cmdline/cfg_hints.xml")
+        return new Info().addAdditionalRoots(ProcessorImpl.class.getName(), 
DeclarativeHintsTestBase.class.getName(), 
OpenProjectsTrampolineImpl.class.getName(), J2SEProject.class.getName(), 
DefaultJavaPlatformProvider.class.getName(), 
PatternConvertorImpl.class.getName()/*, BCPFallBack.class.getName()*/, 
"org.slf4j.impl.StaticLoggerBinder")
+                         
.addAdditionalResources("org/netbeans/modules/java/hints/resources/Bundle.properties",
 "org/netbeans/modules/java/hints/declarative/resources/Bundle.properties", 
"org/netbeans/modules/jackpot30/cmdline/processor/cfg_hints.xml")
                          
.addAdditionalLayers("org/netbeans/modules/java/hints/resources/layer.xml", 
"org/netbeans/modules/java/hints/declarative/resources/layer.xml")
                          .addMetaInfRegistrations(new 
MetaInfRegistration(org.netbeans.modules.project.uiapi.OpenProjectsTrampoline.class,
 OpenProjectsTrampolineImpl.class))
                          .addMetaInfRegistrations(new 
MetaInfRegistration(Processor.class, ProcessorImpl.class))
-                         .addMetaInfRegistrations(new 
MetaInfRegistration(ClassPathProvider.class.getName(), 
BCPFallBack.class.getName(), 9999))
-                         .addMetaInfRegistrations(new 
MetaInfRegistration(ClassPathProvider.class.getName(), 
Main.ClassPathProviderImpl.class.getName(), 100))
-                         .addMetaInfRegistrations(new 
MetaInfRegistration(SourceLevelQueryImplementation2.class.getName(), 
SourceLevelQueryImpl.class.getName(), 100))
+//                         .addMetaInfRegistrations(new 
MetaInfRegistration(ClassPathProvider.class.getName(), 
BCPFallBack.class.getName(), 9999))
+//                         .addMetaInfRegistrations(new 
MetaInfRegistration(ClassPathProvider.class.getName(), 
Main.ClassPathProviderImpl.class.getName(), 100))
+//                         .addMetaInfRegistrations(new 
MetaInfRegistration(SourceLevelQueryImplementation2.class.getName(), 
SourceLevelQueryImpl.class.getName(), 100))
                          
.addMetaInfRegistrationToCopy(PatternConvertor.class.getName())
-                         
.addExcludePattern(Pattern.compile("junit\\.framework\\..*"));
+                         
.addExcludePattern(Pattern.compile("junit\\.framework\\..*"))
+                         //TODO: add javac excludes
+                         ;
     }
 
 }
diff --git 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/CreateToolProcessorTest.java
 
b/cmdline/processor/test/unit/src/org/netbeans/modules/jackpot30/cmdline/processor/CreateToolProcessorTest.java
similarity index 96%
rename from 
cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/CreateToolProcessorTest.java
rename to 
cmdline/processor/test/unit/src/org/netbeans/modules/jackpot30/cmdline/processor/CreateToolProcessorTest.java
index 6b783c2..59739dc 100644
--- 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/CreateToolProcessorTest.java
+++ 
b/cmdline/processor/test/unit/src/org/netbeans/modules/jackpot30/cmdline/processor/CreateToolProcessorTest.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.netbeans.modules.jackpot30.cmdline;
+package org.netbeans.modules.jackpot30.cmdline.processor;
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
@@ -127,7 +127,7 @@ public class CreateToolProcessorTest extends 
ProcessorImplTest {
                 hintsList = File.createTempFile("hints", "list");
 
 //                if (!compiler.canRead()) {
-                    new CreateTool("").createCompiler(compiler, hintsList);
+                    new CreateToolProcessor("").createCompiler(compiler, 
hintsList);
 //                }
             }
             protected void tearDown() {
diff --git 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/ProcessorImplTest.java
 
b/cmdline/processor/test/unit/src/org/netbeans/modules/jackpot30/cmdline/processor/ProcessorImplTest.java
similarity index 94%
rename from 
cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/ProcessorImplTest.java
rename to 
cmdline/processor/test/unit/src/org/netbeans/modules/jackpot30/cmdline/processor/ProcessorImplTest.java
index 2079efa..51a6a8c 100644
--- 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/ProcessorImplTest.java
+++ 
b/cmdline/processor/test/unit/src/org/netbeans/modules/jackpot30/cmdline/processor/ProcessorImplTest.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.netbeans.modules.jackpot30.cmdline;
+package org.netbeans.modules.jackpot30.cmdline.processor;
 
 import com.sun.tools.javac.Main;
 import java.io.ByteArrayOutputStream;
@@ -32,6 +32,7 @@ import java.util.regex.Pattern;
 import static junit.framework.TestCase.assertEquals;
 import static junit.framework.TestCase.assertTrue;
 import org.netbeans.junit.NbTestCase;
+import org.netbeans.modules.jackpot30.cmdline.lib.TestUtils;
 
 /**
  *
@@ -45,10 +46,10 @@ public class ProcessorImplTest extends NbTestCase {
 
     public void testHardcoded1() throws Exception {
         doRunCompiler("",
-                      "${workdir}/src/test/Test.java:4: warning: 
[Usage_of_size_equals_0] Usage of .size() == 0 can be replaced with 
.isEmpty()\n" +
+                      "${workdir}/src/test/Test.java:4: warning: 
[Usage_of_Collection_Map_size_equals_0] c.size() == 0 can be replaced with 
c.isEmpty()\n" +
                       "        boolean b1 = c.size() == 0;\n" +
                       "                      ^\n" +
-                      "${workdir}/src/test/Test.java:5: warning: 
[Usage_of_size_equals_0] Usage of .size() == 0 can be replaced with 
.isEmpty()\n" +
+                      "${workdir}/src/test/Test.java:5: warning: 
[Usage_of_Collection_Map_size_equals_0] c.size() == 0 can be replaced with 
c.isEmpty()\n" +
                       "\tboolean b2 = c.size() == 0;\n" +
                       "\t              ^\n" +
                       "2 warnings\n",
@@ -69,10 +70,10 @@ public class ProcessorImplTest extends NbTestCase {
 
     public void testHardcodedWithConfiguration() throws Exception {
         doRunCompiler("",
-                      "${workdir}/src/test/Test.java:4: warning: 
[Usage_of_size_equals_0] Usage of .size() == 0 can be replaced with 
.isEmpty()\n" +
+                      "${workdir}/src/test/Test.java:4: warning: 
[Usage_of_Collection_Map_size_equals_0] c.size() == 0 can be replaced with 
c.isEmpty()\n" +
                       "        boolean b1 = c.size() == 0;\n" +
                       "                      ^\n" +
-                      "${workdir}/src/test/Test.java:5: warning: 
[Usage_of_size_equals_0] Usage of .size() == 0 can be replaced with 
.isEmpty()\n" +
+                      "${workdir}/src/test/Test.java:5: warning: 
[Usage_of_Collection_Map_size_equals_0] c.size() == 0 can be replaced with 
c.isEmpty()\n" +
                       "\tboolean b2 = c.size() == 0;\n" +
                       "\t              ^\n" +
                       "2 warnings\n",
@@ -186,7 +187,7 @@ public class ProcessorImplTest extends NbTestCase {
 
             target.getParentFile().mkdirs();
 
-            Utils.copyStringToFile(target, fileAndContent.get(cntr + 1));
+            TestUtils.copyStringToFile(target, fileAndContent.get(cntr + 1));
 
             if (target.getName().endsWith(".java"))
                 params.add(target.getAbsolutePath());
diff --git 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/Utils.java 
b/cmdline/processor/test/unit/src/org/netbeans/modules/jackpot30/cmdline/processor/Utils.java
similarity index 55%
copy from 
cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/Utils.java
copy to 
cmdline/processor/test/unit/src/org/netbeans/modules/jackpot30/cmdline/processor/Utils.java
index c4b1f73..2408098 100644
--- 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/Utils.java
+++ 
b/cmdline/processor/test/unit/src/org/netbeans/modules/jackpot30/cmdline/processor/Utils.java
@@ -16,40 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.netbeans.modules.jackpot30.cmdline;
+package org.netbeans.modules.jackpot30.cmdline.processor;
 
-import java.io.ByteArrayInputStream;
-import java.io.EOFException;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
 import java.util.Arrays;
 import java.util.List;
 import static junit.framework.TestCase.assertNotNull;
-import org.openide.filesystems.FileUtil;
 
 public class Utils {
 
-    public static List<String> findJavaLauncher() {
-        String javaHome = System.getProperty("java.home");
-        
-        if (System.getProperty("sun.boot.class.path") != null) {
-            //JDK 8:
-            final String nbJavacPath = System.getProperty("nb.javac.path");
-            assertNotNull("Path to nb-javac must be set in the 'nb.javac.path' 
property!", nbJavacPath);
-            return Arrays.asList(javaHome + "/bin/java",
-                                 "-Xbootclasspath/p:" + nbJavacPath);
-        } else {
-            //JDK 9+:
-            return Arrays.asList(javaHome + "/bin/java",
-                                 
"--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
-                                 "--add-opens=java.base/java.net=ALL-UNNAMED", 
//stream handler factory
-                                 
"--add-opens=java.desktop/sun.awt=ALL-UNNAMED" 
//org.openide.util.RequestProcessor$TopLevelThreadGroup to method 
sun.awt.AppContext.getAppContext()
-            );
-        }
-    }
-
     public static List<String> findJavacLauncher() {
         String javaHome = System.getProperty("java.home");
         
@@ -71,29 +45,4 @@ public class Utils {
         }
     }
 
-    //from TestUtilities:
-    public final static File copyStringToFile (File f, String content) throws 
Exception {
-        FileOutputStream os = new FileOutputStream(f);
-        InputStream is = new ByteArrayInputStream(content.getBytes("UTF-8"));
-
-        FileUtil.copy(is, os);
-
-        os.close ();
-        is.close();
-
-        return f;
-
-    }
-    
-    public final static String copyFileToString (java.io.File f) throws 
java.io.IOException {
-        int s = (int)f.length ();
-        byte[] data = new byte[s];
-        int len = new FileInputStream (f).read (data);
-
-        if (len != s)
-            throw new EOFException("truncated file");
-
-        return new String (data);
-    }
-
 }
diff --git a/cmdline/tool/build.xml b/cmdline/tool/build.xml
index 2fca89f..e756ee1 100644
--- a/cmdline/tool/build.xml
+++ b/cmdline/tool/build.xml
@@ -48,7 +48,7 @@
              skipexisting="true"/>
     </target>
 
-    <target name="build-init" 
depends="harness.build-init,-download-joptsimple,-download-diffparser,-download-slf4j"
 />
+    <target name="build-init" 
depends="harness.build-init,-download-joptsimple,-download-diffparser,-download-slf4j,-setup.bootclasspath"
 />
 
     <target name="create-standalone-tool" depends="init,netbeans">
         <mkdir dir="${build.classes.dir}/../jackpot" />
@@ -109,4 +109,17 @@
         </condition>
     </target>
 
+    <target name="-setup.bootclasspath" depends="harness.build-init">
+        <property name="test.nbjdk.home" location="${nbjdk.home}" />
+        <!--<condition property="test.bootclasspath.prepend.args"-->
+        <condition property="test.run.args"
+                   
value="--limit-modules=java.base,java.xml,java.prefs,java.management,java.logging,java.desktop,java.instrument,java.naming,jdk.zipfs
 --add-opens=java.base/java.net=ALL-UNNAMED"
+                   
else="-Xbootclasspath/p:${nbplatform.active.dir}/java/modules/ext/nb-javac-jdk-17-api.jar:${nbplatform.active.dir}/java/modules/ext/nb-javac-jdk-17.jar">
+            <or>
+                <available classpath="${test.nbjdk.home}/lib/ct.sym" 
resource="B/java.base/java/lang/String.sig" />
+                <available classpath="${test.nbjdk.home}/lib/ct.sym" 
resource="B/system-modules" />
+            </or>
+        </condition>
+    </target>
+
 </project>
diff --git a/cmdline/tool/nbproject/project.properties 
b/cmdline/tool/nbproject/project.properties
index eaafa90..c3a07cf 100644
--- a/cmdline/tool/nbproject/project.properties
+++ b/cmdline/tool/nbproject/project.properties
@@ -18,3 +18,7 @@ javac.compilerargs=-Xlint -Xlint:-serial
 
cp.extra=build/jopt-simple-3.2.jar:build/diffparser-1.4.jar:build/slf4j-api-1.7.25.jar:build/slf4j-nop-1.7.25.jar:${tools.jar}
 spec.version.base=1.16.0
 test.timeout=6000000
+#test.bootclasspath.prepend.args=-Xbootclasspath/p:${nbplatform.active.dir}/java/modules/ext/nb-javac-jdk-17-api.jar:${nbplatform.active.dir}/java/modules/ext/nb-javac-jdk-17.jar
+#test.bootclasspath.prepend.args=--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
+#test.bootclasspath.prepend.args=--add-opens=java.base/java.net=ALL-UNNAMED
+#requires.nb.javac=true
diff --git a/cmdline/tool/nbproject/project.xml 
b/cmdline/tool/nbproject/project.xml
index 0cced1a..d6e96a6 100644
--- a/cmdline/tool/nbproject/project.xml
+++ b/cmdline/tool/nbproject/project.xml
@@ -60,6 +60,14 @@
                     </run-dependency>
                 </dependency>
                 <dependency>
+                    
<code-name-base>org.netbeans.libs.nbjavacapi</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <implementation-version/>
+                    </run-dependency>
+                </dependency>
+                <dependency>
                     
<code-name-base>org.netbeans.modules.ant.freeform</code-name-base>
                     <build-prerequisite/>
                     <compile-dependency/>
diff --git a/cmdline/tool/scripts/LICENSE-bin-tool.txt 
b/cmdline/tool/scripts/LICENSE-bin-tool.txt
index 5f3f417..6acff12 100644
--- a/cmdline/tool/scripts/LICENSE-bin-tool.txt
+++ b/cmdline/tool/scripts/LICENSE-bin-tool.txt
@@ -1026,3 +1026,355 @@ This product includes SLF4J with the following license:
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**********************************************************************
+
+This product includes nb-javac with the following license:
+
+The GNU General Public License (GPL)
+
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share
+and change it.  By contrast, the GNU General Public License is intended to
+guarantee your freedom to share and change free software--to make sure the
+software is free for all its users.  This General Public License applies to
+most of the Free Software Foundation's software and to any other program whose
+authors commit to using it.  (Some other Free Software Foundation software is
+covered by the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not price.  Our
+General Public Licenses are designed to make sure that you have the freedom to
+distribute copies of free software (and charge for this service if you wish),
+that you receive source code or can get it if you want it, that you can change
+the software or use pieces of it in new free programs; and that you know you
+can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny
+you these rights or to ask you to surrender the rights.  These restrictions
+translate to certain responsibilities for you if you distribute copies of the
+software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for
+a fee, you must give the recipients all the rights that you have.  You must
+make sure that they, too, receive or can get the source code.  And you must
+show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2)
+offer you this license which gives you legal permission to copy, distribute
+and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that
+everyone understands that there is no warranty for this free software.  If the
+software is modified by someone else and passed on, we want its recipients to
+know that what they have is not the original, so that any problems introduced
+by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents.  We
+wish to avoid the danger that redistributors of a free program will
+individually obtain patent licenses, in effect making the program proprietary.
+To prevent this, we have made it clear that any patent must be licensed for
+everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification
+follow.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License applies to any program or other work which contains a notice
+placed by the copyright holder saying it may be distributed under the terms of
+this General Public License.  The "Program", below, refers to any such program
+or work, and a "work based on the Program" means either the Program or any
+derivative work under copyright law: that is to say, a work containing the
+Program or a portion of it, either verbatim or with modifications and/or
+translated into another language.  (Hereinafter, translation is included
+without limitation in the term "modification".) Each licensee is addressed as
+"you".
+
+Activities other than copying, distribution and modification are not covered by
+this License; they are outside its scope.  The act of running the Program is
+not restricted, and the output from the Program is covered only if its contents
+constitute a work based on the Program (independent of having been made by
+running the Program).  Whether that is true depends on what the Program does.
+
+1. You may copy and distribute verbatim copies of the Program's source code as
+you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this License
+and to the absence of any warranty; and give any other recipients of the
+Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and you may
+at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of it, thus
+forming a work based on the Program, and copy and distribute such modifications
+or work under the terms of Section 1 above, provided that you also meet all of
+these conditions:
+
+    a) You must cause the modified files to carry prominent notices stating
+    that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in whole or
+    in part contains or is derived from the Program or any part thereof, to be
+    licensed as a whole at no charge to all third parties under the terms of
+    this License.
+
+    c) If the modified program normally reads commands interactively when run,
+    you must cause it, when started running for such interactive use in the
+    most ordinary way, to print or display an announcement including an
+    appropriate copyright notice and a notice that there is no warranty (or
+    else, saying that you provide a warranty) and that users may redistribute
+    the program under these conditions, and telling the user how to view a copy
+    of this License.  (Exception: if the Program itself is interactive but does
+    not normally print such an announcement, your work based on the Program is
+    not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If identifiable
+sections of that work are not derived from the Program, and can be reasonably
+considered independent and separate works in themselves, then this License, and
+its terms, do not apply to those sections when you distribute them as separate
+works.  But when you distribute the same sections as part of a whole which is a
+work based on the Program, the distribution of the whole must be on the terms
+of this License, whose permissions for other licensees extend to the entire
+whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your
+rights to work written entirely by you; rather, the intent is to exercise the
+right to control the distribution of derivative or collective works based on
+the Program.
+
+In addition, mere aggregation of another work not based on the Program with the
+Program (or with a work based on the Program) on a volume of a storage or
+distribution medium does not bring the other work under the scope of this
+License.
+
+3. You may copy and distribute the Program (or a work based on it, under
+Section 2) in object code or executable form under the terms of Sections 1 and
+2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable source
+    code, which must be distributed under the terms of Sections 1 and 2 above
+    on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three years, to
+    give any third party, for a charge no more than your cost of physically
+    performing source distribution, a complete machine-readable copy of the
+    corresponding source code, to be distributed under the terms of Sections 1
+    and 2 above on a medium customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer to
+    distribute corresponding source code.  (This alternative is allowed only
+    for noncommercial distribution and only if you received the program in
+    object code or executable form with such an offer, in accord with
+    Subsection b above.)
+
+The source code for a work means the preferred form of the work for making
+modifications to it.  For an executable work, complete source code means all
+the source code for all modules it contains, plus any associated interface
+definition files, plus the scripts used to control compilation and installation
+of the executable.  However, as a special exception, the source code
+distributed need not include anything that is normally distributed (in either
+source or binary form) with the major components (compiler, kernel, and so on)
+of the operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the source
+code from the same place counts as distribution of the source code, even though
+third parties are not compelled to copy the source along with the object code.
+
+4. You may not copy, modify, sublicense, or distribute the Program except as
+expressly provided under this License.  Any attempt otherwise to copy, modify,
+sublicense or distribute the Program is void, and will automatically terminate
+your rights under this License.  However, parties who have received copies, or
+rights, from you under this License will not have their licenses terminated so
+long as such parties remain in full compliance.
+
+5. You are not required to accept this License, since you have not signed it.
+However, nothing else grants you permission to modify or distribute the Program
+or its derivative works.  These actions are prohibited by law if you do not
+accept this License.  Therefore, by modifying or distributing the Program (or
+any work based on the Program), you indicate your acceptance of this License to
+do so, and all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+6. Each time you redistribute the Program (or any work based on the Program),
+the recipient automatically receives a license from the original licensor to
+copy, distribute or modify the Program subject to these terms and conditions.
+You may not impose any further restrictions on the recipients' exercise of the
+rights granted herein.  You are not responsible for enforcing compliance by
+third parties to this License.
+
+7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues), conditions
+are imposed on you (whether by court order, agreement or otherwise) that
+contradict the conditions of this License, they do not excuse you from the
+conditions of this License.  If you cannot distribute so as to satisfy
+simultaneously your obligations under this License and any other pertinent
+obligations, then as a consequence you may not distribute the Program at all.
+For example, if a patent license would not permit royalty-free redistribution
+of the Program by all those who receive copies directly or indirectly through
+you, then the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply and
+the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or
+other property right claims or to contest validity of any such claims; this
+section has the sole purpose of protecting the integrity of the free software
+distribution system, which is implemented by public license practices.  Many
+people have made generous contributions to the wide range of software
+distributed through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing to
+distribute software through any other system and a licensee cannot impose that
+choice.
+
+This section is intended to make thoroughly clear what is believed to be a
+consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is restricted in certain
+countries either by patents or by copyrighted interfaces, the original
+copyright holder who places the Program under this License may add an explicit
+geographical distribution limitation excluding those countries, so that
+distribution is permitted only in or among countries not thus excluded.  In
+such case, this License incorporates the limitation as if written in the body
+of this License.
+
+9. The Free Software Foundation may publish revised and/or new versions of the
+General Public License from time to time.  Such new versions will be similar in
+spirit to the present version, but may differ in detail to address new problems
+or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any later
+version", you have the option of following the terms and conditions either of
+that version or of any later version published by the Free Software Foundation.
+If the Program does not specify a version number of this License, you may
+choose any version ever published by the Free Software Foundation.
+
+10. If you wish to incorporate parts of the Program into other free programs
+whose distribution conditions are different, write to the author to ask for
+permission.  For software which is copyrighted by the Free Software Foundation,
+write to the Free Software Foundation; we sometimes make exceptions for this.
+Our decision will be guided by the two goals of preserving the free status of
+all derivatives of our free software and of promoting the sharing and reuse of
+software generally.
+
+NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
+THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE
+STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
+PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE,
+YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
+ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
+PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
+INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
+BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
+OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible
+use to the public, the best way to achieve this is to make it free software
+which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program.  It is safest to attach
+them to the start of each source file to most effectively convey the exclusion
+of warranty; and each file should have at least the "copyright" line and a
+pointer to where the full notice is found.
+
+    One line to give the program's name and a brief idea of what it does.
+
+    Copyright (C) <year> <name of author>
+
+    This program is free software; you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by the Free
+    Software Foundation; either version 2 of the License, or (at your option)
+    any later version.
+
+    This program is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+    more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this when it
+starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
+    with ABSOLUTELY NO WARRANTY; for details type 'show w'.  This is free
+    software, and you are welcome to redistribute it under certain conditions;
+    type 'show c' for details.
+
+The hypothetical commands 'show w' and 'show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may be
+called something other than 'show w' and 'show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.  Here
+is a sample; alter the names:
+
+    Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+    'Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+    signature of Ty Coon, 1 April 1989
+
+    Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General Public
+License instead of this License.
+
+
+"CLASSPATH" EXCEPTION TO THE GPL
+
+Certain source files distributed by Oracle America and/or its affiliates are
+subject to the following clarification and special exception to the GPL, but
+only where Oracle has expressly included in the particular source file's header
+the words "Oracle designates this particular file as subject to the "Classpath"
+exception as provided by Oracle in the LICENSE file that accompanied this 
code."
+
+    Linking this library statically or dynamically with other modules is making
+    a combined work based on this library.  Thus, the terms and conditions of
+    the GNU General Public License cover the whole combination.
+
+    As a special exception, the copyright holders of this library give you
+    permission to link this library with independent modules to produce an
+    executable, regardless of the license terms of these independent modules,
+    and to copy and distribute the resulting executable under terms of your
+    choice, provided that you also meet, for each linked independent module,
+    the terms and conditions of the license of that module.  An independent
+    module is a module which is not derived from or based on this library.  If
+    you modify this library, you may extend this exception to your version of
+    the library, but you are not obligated to do so.  If you do not wish to do
+    so, delete this exception statement from your version.
diff --git a/cmdline/tool/scripts/jackpot b/cmdline/tool/scripts/jackpot
index d7774fd..b097cb6 100755
--- a/cmdline/tool/scripts/jackpot
+++ b/cmdline/tool/scripts/jackpot
@@ -18,4 +18,4 @@
 
 JACKPOT_JAR=`readlink -f "$0"`
 JACKPOT_JAR=`dirname "$JACKPOT_JAR"`/jackpot.jar
-java -XX:+IgnoreUnrecognizedVMOptions 
--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED 
--add-opens=java.base/java.net=ALL-UNNAMED 
--add-opens=java.desktop/sun.awt=ALL-UNNAMED -classpath `dirname 
"$JACKPOT_JAR"`/jackpot.jar org.netbeans.modules.jackpot30.cmdline.Main "$@"
+java -XX:+IgnoreUnrecognizedVMOptions 
--add-opens=java.base/java.net=ALL-UNNAMED 
--add-opens=java.desktop/sun.awt=ALL-UNNAMED -classpath `dirname 
"$JACKPOT_JAR"`/jackpot.jar org.netbeans.modules.jackpot30.cmdline.Main "$@"
diff --git a/cmdline/tool/scripts/pom.xml b/cmdline/tool/scripts/pom.xml
index 34488f6..150b29e 100644
--- a/cmdline/tool/scripts/pom.xml
+++ b/cmdline/tool/scripts/pom.xml
@@ -21,7 +21,7 @@
 
   <groupId>org.apache.netbeans.modules.jackpot30</groupId>
   <artifactId>jackpot30-maven-plugin</artifactId>
-  <version>12.5</version>
+  <version>13.0</version>
   <packaging>maven-plugin</packaging>
 
   <name>Jackpot 3.0 Command Line Tool</name>
diff --git a/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/Main.java 
b/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/Main.java
index 96d9235..35c2d2c 100644
--- a/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/Main.java
+++ b/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/Main.java
@@ -144,8 +144,6 @@ public class Main {
             return 1;
         }
 
-        Utils.addExports();
-
         System.setProperty("netbeans.user", "/tmp/tmp-foo");
         System.setProperty("SourcePath.no.source.filter", "true");
 
diff --git 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/CreateTool.java
 
b/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/CreateTool.java
index 4b9b021..e64f6d4 100644
--- 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/CreateTool.java
+++ 
b/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/CreateTool.java
@@ -45,16 +45,16 @@ public class CreateTool extends CreateStandaloneJar {
 
     @Override
     protected Info computeInfo() {
-        return new Info().addAdditionalRoots(Main.class.getName(), 
DeclarativeHintsTestBase.class.getName(), 
OpenProjectsTrampolineImpl.class.getName(), J2SEProject.class.getName(), 
DefaultJavaPlatformProvider.class.getName(), 
PatternConvertorImpl.class.getName(), ProcessorImpl.class.getName(), 
BCPFallBack.class.getName(), "org.slf4j.impl.StaticLoggerBinder")
-                         
.addAdditionalResources("org/netbeans/modules/java/hints/resources/Bundle.properties",
 "org/netbeans/modules/java/hints/declarative/resources/Bundle.properties", 
"org/netbeans/modules/jackpot30/cmdline/cfg_hints.xml")
+        return new Info().addAdditionalRoots(Main.class.getName(), 
DeclarativeHintsTestBase.class.getName(), 
OpenProjectsTrampolineImpl.class.getName(), J2SEProject.class.getName(), 
DefaultJavaPlatformProvider.class.getName(), 
PatternConvertorImpl.class.getName(), BCPFallBack.class.getName(), 
"org.slf4j.impl.StaticLoggerBinder")
+                         
.addAdditionalResources("org/netbeans/modules/java/hints/resources/Bundle.properties",
 "org/netbeans/modules/java/hints/declarative/resources/Bundle.properties")
                          
.addAdditionalLayers("org/netbeans/modules/java/hints/resources/layer.xml", 
"org/netbeans/modules/java/hints/declarative/resources/layer.xml")
                          .addMetaInfRegistrations(new 
MetaInfRegistration(org.netbeans.modules.project.uiapi.OpenProjectsTrampoline.class,
 OpenProjectsTrampolineImpl.class))
-                         .addMetaInfRegistrations(new 
MetaInfRegistration(Processor.class, ProcessorImpl.class))
                          .addMetaInfRegistrations(new 
MetaInfRegistration(ClassPathProvider.class.getName(), 
BCPFallBack.class.getName(), 9999))
                          .addMetaInfRegistrations(new 
MetaInfRegistration(ClassPathProvider.class.getName(), 
Main.ClassPathProviderImpl.class.getName(), 100))
                          .addMetaInfRegistrations(new 
MetaInfRegistration(SourceLevelQueryImplementation2.class.getName(), 
SourceLevelQueryImpl.class.getName(), 100))
                          
.addMetaInfRegistrationToCopy(PatternConvertor.class.getName())
-                         
.addExcludePattern(Pattern.compile("junit\\.framework\\..*"));
+                         
.addExcludePattern(Pattern.compile("junit\\.framework\\..*"))
+                         .setEscapeJavaxLang();
     }
 
 }
diff --git 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/CreateToolTest.java
 
b/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/CreateToolTest.java
index 2e3fe02..2cf29c3 100644
--- 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/CreateToolTest.java
+++ 
b/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/CreateToolTest.java
@@ -180,7 +180,7 @@ public class CreateToolTest extends MainTest {
 //                }
             }
             protected void tearDown() {
-                compiler.delete();
+//                compiler.delete();
                 hintsList.delete();
                 compiler = null;
                 hintsList = null;
diff --git 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/MainTest.java
 
b/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/MainTest.java
index 2d8bd6b..2865c0d 100644
--- 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/MainTest.java
+++ 
b/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/MainTest.java
@@ -41,6 +41,7 @@ import javax.tools.SimpleJavaFileObject;
 import javax.tools.ToolProvider;
 import org.junit.runner.Result;
 import org.netbeans.junit.NbTestCase;
+import org.netbeans.modules.jackpot30.cmdline.lib.TestUtils;
 import org.openide.filesystems.FileObject;
 import org.openide.filesystems.FileUtil;
 
@@ -50,6 +51,8 @@ import org.openide.filesystems.FileUtil;
  */
 public class MainTest extends NbTestCase {
 
+    private static final String TEST_HINT = "Usage of [Collection|Map].size() 
== 0";
+
     public MainTest(String name) {
         super(name);
     }
@@ -76,7 +79,7 @@ public class MainTest extends NbTestCase {
                       null,
                       "--apply",
                       "--hint",
-                      "Usage of .size() == 0");
+                      TEST_HINT);
     }
 
     public void testDoNotApply() throws Exception {
@@ -90,10 +93,10 @@ public class MainTest extends NbTestCase {
             "}\n";
 
         doRunCompiler(golden,
-                      "${workdir}/src/test/Test.java:4: warning: 
[Usage_of_size_equals_0] Usage of .size() == 0 can be replaced with 
.isEmpty()\n" +
+                      "${workdir}/src/test/Test.java:4: warning: 
[Usage_of_Collection_Map_size_equals_0] c.size() == 0 can be replaced with 
c.isEmpty()\n" +
                       "        boolean b1 = c.size() == 0;\n" +
                       "                     ^\n" +
-                      "${workdir}/src/test/Test.java:5: warning: 
[Usage_of_size_equals_0] Usage of .size() == 0 can be replaced with 
.isEmpty()\n" +
+                      "${workdir}/src/test/Test.java:5: warning: 
[Usage_of_Collection_Map_size_equals_0] c.size() == 0 can be replaced with 
c.isEmpty()\n" +
                       "\tboolean b2 = c.size() == 0;\n" +
                       "\t             ^\n",
                       null,
@@ -107,7 +110,7 @@ public class MainTest extends NbTestCase {
                       "}\n",
                       null,
                       "--hint",
-                      "Usage of .size() == 0",
+                      TEST_HINT,
                       "--no-apply");
     }
 
@@ -171,7 +174,7 @@ public class MainTest extends NbTestCase {
                       null,
                       "--apply",
                       "--hint",
-                      "Usage of .size() == 0",
+                      TEST_HINT,
                       "--source",
                       "1.6");
     }
@@ -260,7 +263,7 @@ public class MainTest extends NbTestCase {
             "}\n";
 
         doRunCompiler(code,
-                      "${workdir}/src/test/Test.java:4: warning: 
[Usage_of_size_equals_0] Usage of .size() == 0 can be replaced with 
.isEmpty()\n" +
+                      "${workdir}/src/test/Test.java:4: warning: 
[Usage_of_Collection_Map_size_equals_0] c.size() == 0 can be replaced with 
c.isEmpty()\n" +
                       "        boolean b = c.size() == 0;\n" +
                       "                    ^\n",
                       null,
@@ -506,10 +509,10 @@ public class MainTest extends NbTestCase {
 
         doRunCompiler(equivalentValidator(code),
                       equivalentValidator(
-                          "${workdir}/src/test/Test.java:4: warning: 
[Usage_of_size_equals_0] Usage of .size() == 0 can be replaced with 
.isEmpty()\n" +
+                          "${workdir}/src/test/Test.java:4: warning: 
[Usage_of_Collection_Map_size_equals_0] c.size() == 0 can be replaced with 
c.isEmpty()\n" +
                           "        boolean b1 = c.size() == 0;\n" +
                           "                     ^\n" +
-                          "${workdir}/src/test/Test.java:5: warning: 
[Usage_of_size_equals_0] Usage of .size() == 0 can be replaced with 
.isEmpty()\n" +
+                          "${workdir}/src/test/Test.java:5: warning: 
[Usage_of_Collection_Map_size_equals_0] c.size() == 0 can be replaced with 
c.isEmpty()\n" +
                           "\tboolean b2 = c.size() == 0;\n" +
                           "\t             ^\n"
                       ),
@@ -519,7 +522,7 @@ public class MainTest extends NbTestCase {
                       code,
                       null,
                       "--hint",
-                      "Usage of .size() == 0",
+                      TEST_HINT,
                       "--no-apply",
                       "--fail-on-warnings");
     }
@@ -886,7 +889,7 @@ public class MainTest extends NbTestCase {
                       "parameters.txt",
                       "--apply\n" +
                       "--hint\n" +
-                      "Usage of .size() == 0\n",
+                      TEST_HINT + "\n",
                       null,
                       "@" + getWorkDirPath() + "/parameters.txt");
     }
@@ -915,7 +918,7 @@ public class MainTest extends NbTestCase {
                       "--group\n" +
                       "--source 8 --sourcepath ${workdir}/src\n" +
                       "--hint\n" +
-                      "Usage of .size() == 0\n",
+                      TEST_HINT + "\n",
                       null,
                       "@" + getWorkDirPath() + "/parameters.txt");
     }
@@ -933,10 +936,10 @@ public class MainTest extends NbTestCase {
             "}\n";
 
         doRunCompiler(golden,
-                      "${workdir}/src/test/Test.java:5: warning: 
[Usage_of_size_equals_0] Usage of .size() == 0 can be replaced with 
.isEmpty()\n" +
+                      "${workdir}/src/test/Test.java:5: warning: 
[Usage_of_Collection_Map_size_equals_0] c.size() == 0 can be replaced with 
c.isEmpty()\n" +
                       "        boolean b2 = c.size() == 0;\n" +
                       "                     ^\n" +
-                      "${workdir}/src/test/Test.java:7: warning: 
[Usage_of_size_equals_0] Usage of .size() == 0 can be replaced with 
.isEmpty()\n" +
+                      "${workdir}/src/test/Test.java:7: warning: 
[Usage_of_Collection_Map_size_equals_0] c.size() == 0 can be replaced with 
c.isEmpty()\n" +
                       "        boolean b3 = c.size() == 0;\n" +
                       "                     ^\n",
                       "",
@@ -960,7 +963,7 @@ public class MainTest extends NbTestCase {
                       null,
                       "--source", "8",
                       "--sourcepath", "${workdir}/src",
-                      "--hint", "Usage of .size() == 0",
+                      "--hint", TEST_HINT,
                       "--filter-patch", getWorkDirPath() + "/patch.diff");
     }
 
@@ -1008,7 +1011,7 @@ public class MainTest extends NbTestCase {
                       "--apply",
                       "--source", "8",
                       "--sourcepath", "${workdir}/src",
-                      "--hint", "Usage of .size() == 0",
+                      "--hint", TEST_HINT,
                       "--filter-patch", getWorkDirPath() + "/patch.diff");
     }
 
@@ -1066,7 +1069,7 @@ public class MainTest extends NbTestCase {
 
             target.getParentFile().mkdirs();
             
-            Utils.copyStringToFile(target, fileAndContent.get(cntr + 1));
+            TestUtils.copyStringToFile(target, fileAndContent.get(cntr + 1));
         }
 
         File wd = getWorkDir();
@@ -1099,7 +1102,7 @@ public class MainTest extends NbTestCase {
         reallyRunCompiler(wd, exitcode, output, options.toArray(new 
String[0]));
 
         if (fileContentValidator != null) {
-            fileContentValidator.validate(Utils.copyFileToString(source));
+            fileContentValidator.validate(TestUtils.copyFileToString(source));
         }
         if (stdOutValidator != null) {
             
stdOutValidator.validate(output[0].replaceAll(Pattern.quote(wd.getAbsolutePath()),
 Matcher.quoteReplacement("${workdir}")));
@@ -1123,7 +1126,8 @@ public class MainTest extends NbTestCase {
         System.setErr(new PrintStream(errData, true, "UTF-8"));
 
         try {
-            assertEquals(exitcode, Main.compile(params));
+            int actualExit = Main.compile(params);
+            assertEquals(exitcode, actualExit);
         } finally {
             System.setProperty("user.dir", oldUserDir);
             System.out.close();
@@ -1157,7 +1161,7 @@ public class MainTest extends NbTestCase {
         File classes = new File(wd, "classes");
 
         classes.mkdirs();
-        Utils.copyStringToFile(new File(classes, "h.hint"), "$1.equals(\"\") 
:: $1 instanceof java.lang.String => $1.isEmpty();;");
+        TestUtils.copyStringToFile(new File(classes, "h.hint"), 
"$1.equals(\"\") :: $1 instanceof java.lang.String => $1.isEmpty();;");
 
         String test = "%%TestCase pos\n" +
                       "package test;\n" +
@@ -1179,7 +1183,7 @@ public class MainTest extends NbTestCase {
                       "public class Test {{\n" +
                       " System.err.println(\"a\".isEmpty());\n" +
                       "}}\n";
-        Utils.copyStringToFile(new File(classes, "h.test"), test);
+        TestUtils.copyStringToFile(new File(classes, "h.test"), test);
 
         List<String> options = Arrays.asList("-d", classes.getAbsolutePath(), 
"-source", "8", "-target", "8");
         List<SourceFO> files = Arrays.asList(new SourceFO("DoRunTests.java", 
CODE_RUN_DECLARATIVE));
diff --git 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/Utils.java 
b/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/Utils.java
index c4b1f73..27543b0 100644
--- 
a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/Utils.java
+++ 
b/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/Utils.java
@@ -36,64 +36,14 @@ public class Utils {
         
         if (System.getProperty("sun.boot.class.path") != null) {
             //JDK 8:
-            final String nbJavacPath = System.getProperty("nb.javac.path");
-            assertNotNull("Path to nb-javac must be set in the 'nb.javac.path' 
property!", nbJavacPath);
-            return Arrays.asList(javaHome + "/bin/java",
-                                 "-Xbootclasspath/p:" + nbJavacPath);
+            return Arrays.asList(javaHome + "/bin/java");
         } else {
             //JDK 9+:
             return Arrays.asList(javaHome + "/bin/java",
-                                 
"--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
                                  "--add-opens=java.base/java.net=ALL-UNNAMED", 
//stream handler factory
                                  
"--add-opens=java.desktop/sun.awt=ALL-UNNAMED" 
//org.openide.util.RequestProcessor$TopLevelThreadGroup to method 
sun.awt.AppContext.getAppContext()
             );
         }
     }
 
-    public static List<String> findJavacLauncher() {
-        String javaHome = System.getProperty("java.home");
-        
-        if (System.getProperty("sun.boot.class.path") != null) {
-            //JDK 8:
-            final String nbJavacPath = System.getProperty("nb.javac.path");
-            assertNotNull("Path to nb-javac must be set in the 'nb.javac.path' 
property!", nbJavacPath);
-            return Arrays.asList(javaHome + "/../bin/javac",
-                                 "-J-Xbootclasspath/p:" + nbJavacPath);
-        } else {
-            //JDK 9+:
-            return Arrays.asList(javaHome + "/bin/javac",
-                                 
"-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
-                                 
"-J--add-opens=java.base/java.net=ALL-UNNAMED", //stream handler factory
-                                 
"-J--add-opens=java.desktop/sun.awt=ALL-UNNAMED", 
//org.openide.util.RequestProcessor$TopLevelThreadGroup to method 
sun.awt.AppContext.getAppContext()
-                                 
"-J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED", 
//Illegal reflective access by 
org.netbeans.modules.jackpot30.cmdline.ProcessorImpl to field 
com.sun.tools.javac.processing.JavacProcessingEnvironment.context
-                                 
"-J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED" //Illegal 
reflective access by org.netbeans.modules.jackpot30.cmdline.ProcessorImpl to 
method com.sun.tools.javac.util.Context.get(java.lang.Class)
-            );
-        }
-    }
-
-    //from TestUtilities:
-    public final static File copyStringToFile (File f, String content) throws 
Exception {
-        FileOutputStream os = new FileOutputStream(f);
-        InputStream is = new ByteArrayInputStream(content.getBytes("UTF-8"));
-
-        FileUtil.copy(is, os);
-
-        os.close ();
-        is.close();
-
-        return f;
-
-    }
-    
-    public final static String copyFileToString (java.io.File f) throws 
java.io.IOException {
-        int s = (int)f.length ();
-        byte[] data = new byte[s];
-        int len = new FileInputStream (f).read (data);
-
-        if (len != s)
-            throw new EOFException("truncated file");
-
-        return new String (data);
-    }
-
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to