java-9

Does Project Lombok support Java 9?

蹲街弑〆低调 提交于 2019-12-29 04:08:21
问题 I have used Lombok in my project, but my colleague do not agree to use it, and his reason is (from controversy of lombok documents) Both of these pieces of Project Lombok make use of non-public APIs to accomplish their sorcery. This means that there is a risk that Project Lombok will be broken with subsequent IDE or JDK releases. But it's a very old document written in 2010, maybe now it has resolved the problem, so I want to know if Lombok will support Java 9 and does it still use the non

Properly set up Java 9 as SDK in Intellij IDEA on Linux due to new folder structure

被刻印的时光 ゝ 提交于 2019-12-28 13:42:12
问题 Before you write me off, please consider that neither of these are answers to my question: How to setup SDK in IntelliJ IDEA? How do I change the IntelliJ IDEA default JDK? In IntelliJ IDEA 2017.2.6, attempting to add JDK9 as an SDK passes but does not work as the classpaths end up empty. Steps to reproduce: Open 'Add new SDK dialog' (go to Project Settings > Project > Project SDK > New > JDK) Select JDK 9 Passes, but if you look under SDK > JDK9 classpaths are empty and your code errors out

Loading classes and resources in Java 9

醉酒当歌 提交于 2019-12-28 12:55:33
问题 I was reading this article on InfoQ quoting Reinhold: Developers can still use the Java class path in Java 9 for the Java runtime to search for classes and resource files. It's just that with Java 9's modules, developers no longer need the class path. So now my question is: what is the proper Java 9 way to do the tasks listed above? How do you dynamically load e.g. an image (short of fiddling with relative paths)? Even more interestingly, how would one check if a class is available and make a

JavaFX: Weird ClassNotFoundException after updating to Java 9

感情迁移 提交于 2019-12-28 06:49:11
问题 I started a Maven project in Java 8 and wanted to migrate it to Java 9. At the same time I also went from Eclipse Neon EE to Eclipse Oxygen EE. (JFX SDK reinstalled). While the Eclipse Workspace shows no errors; as soon as I try to compile and run the exact same program that used to run perfectly fine in Java 8, I get the following Exception: {...} Caused by: java.lang.ClassNotFoundException: com.sun.javafx.css.converters.PaintConverter at java.base/jdk.internal.loader.BuiltinClassLoader

How to resolve module reads package error in java9

你说的曾经没有我的故事 提交于 2019-12-28 03:01:26
问题 I am trying to understand new modularity in java 9 with spring-boot so I want to run some simple application for example: https://github.com/tmatyashovsky/java9-springboot I am using maven 3.5.0 with java 9: Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00) Maven home: ~/soft/apache-maven-3.5.0 Java version: 9-ea, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-9-oracle Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4

What is the point of overloaded Convenience Factory Methods for Collections in Java 9

旧街凉风 提交于 2019-12-27 12:01:06
问题 Java 9 comes with convenience factory methods for creating immutable lists. Finally a list creation is as simple as: List<String> list = List.of("foo", "bar"); But there are 12 overloaded versions of this method, 11 with 0 to 10 elements, and one with var args. static <E> List<E> of(E... elements) Same is the case with Set and Map . Since there is a var args method, what is the point of having extra 11 methods? What I think is that var-args create an array, so the other 11 methods can skip

How to override installed mappings of Behavior?

孤街浪徒 提交于 2019-12-24 11:56:31
问题 In java-9 Skins made it into public scope, while Behaviors are left in the dark - nevertheless changed considerably, in now using InputMap for all input bindings. CellBehaviorBase installs mouse bindings like: InputMap.MouseMapping pressedMapping, releasedMapping; addDefaultMapping( pressedMapping = new InputMap.MouseMapping(MouseEvent.MOUSE_PRESSED, this::mousePressed), releasedMapping = new InputMap.MouseMapping(MouseEvent.MOUSE_RELEASED, this::mouseReleased), new InputMap.MouseMapping

MultiView FXML Project on iOS using Gluon-mobile and Java9

穿精又带淫゛_ 提交于 2019-12-24 10:04:20
问题 Creating a completely new MultiView FXML Project and then adding the Java9 necessities in Gradle: buildscript { repositories { jcenter() google() maven{ url 'http://nexus.gluonhq.com/nexus/content/repositories/releases' } } dependencies { classpath 'org.javafxports:jfxmobile-plugin:2.0.5' } } ... sourceCompatibility = 1.8 targetCompatibility = 1.8 ... dependencies { compile 'com.gluonhq:charm:4.4.0-jdk9' androidRuntime 'com.gluonhq:charm:4.4.1' compile 'com.airhacks:afterburner.mfx:1.6.3' //

Maven throws a ClassNotFoundException codehaus.plexus.Launcher with JDK 9 [closed]

亡梦爱人 提交于 2019-12-24 01:37:23
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . While trying the freshly released JDK 9, I noticed that it seems to break maven entirely. Even a simple mvn -version won't work: vgm@localhost:~$ mvn -version Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher Caused by: java.lang.ClassNotFoundException: org.codehaus

How to get Eclipse Oxygen to run on Java 9

五迷三道 提交于 2019-12-24 00:45:47
问题 I desperately try to get Eclipse Oxygen to run Java 9 on Mac OSX, but I somehow seem to fail. Steps I have done so far: Installed the Java 9 JDK in /Library/Java/JavaVirtualMachines/jdk-9.jdk (next to the already installed /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk) Installed the "Java 9 Support (BETA) for Oxygen 4.7" plugin from the Eclipse market place (I have Oxygen 4.7 for Java EE Developers installed) Added the line "--add-modules=java.se.ee" after the -vmargs line in eclipse.ini