User Tools

Site Tools


ds:software:java11

This is an old revision of the document!


Java 11 pitfalls

How to port a Java 8 GUI application to Java 11

  1. Check the Maven settings.xml: 3.2 in BEL Wiki
  2. Check out the old project from SVN on the asl cluster (e.g. within Netbeans)
  3. change the parent to
    	<parent>
    		<groupId>de.gsi.cs.co</groupId>
    		<artifactId>csco-parent-java-bundle</artifactId>
    		<version>13.0.0-SNAPSHOT</version>
    	</parent>
  4. use latest dependencies for JavaFX (or Harald's libs):
    		  <dependency>
    			  <groupId>de.gsi.lo.bi</groupId>
    			  <artifactId>lobi-common-gui-fx</artifactId>
    			  <version>1.9.0-SNAPSHOT</version>
    		  </dependency>
  5. compile should now work on the command line and within NetBeans
  6. LSA or DeviceAcces:: TODO

Javadoc error

When compiling a project on the command line with 'mvn' a Javadoc error can occur (followed by some warnings):

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.1.0:jar (attach-javadocs) on project esr-bpm: MavenReportException: Error while generating Javadoc: 
[ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] /common/home/sd/rhaseitl/lnx/tmp/esr-bpm/src/main/java/de/gsi/lo/bi/esr/bpm/BpmController.java:158: warning: no description for @param
[ERROR]    * @param url
[ERROR]      ^

To solve this, add this to your pom file (be careful if you already have some other plugins within the <build> tag:

  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <source>8</source>
        </configuration>
     
      </plugin> 
    </plugins>
  </build>
  ...
ds/software/java11.1557234098.txt.gz · Last modified: 2019/05/07 15:01 by rhaseitl