java-9

How to make javadoc documentation available in JShell?

╄→гoц情女王★ 提交于 2020-01-13 13:11:40
问题 I am using JShell to test a library for which I made classes, sources, and javadoc available through the class path like so: jshell --class-path library-javadoc.jar:library-sources.jar:library-jar-with-dependencies.jar Still, when double tab after a documented Java identifier I receive: <no documentation found> How does JShell expect the documentation? 回答1: Seems to be a unresolved issue: https://bugs.openjdk.java.net/browse/JDK-8186876 来源: https://stackoverflow.com/questions/47245854/how-to

Starting jstatd in Java 9+

谁说胖子不能爱 提交于 2020-01-13 08:16:30
问题 In the past, I have started jstatd via a security policy file, as suggested here: https://stackoverflow.com/a/14930180/1294116 However, in Java 9+, they have removed the tools.jar file, which means that this solution no longer works. Does anyone know how to get around this? (Currently I am back to getting the error java.security.AccessControlException: access denied ("java.util.PropertyPermission" "java.rmi.server.ignoreSubClasses" "write") ... ) 回答1: Since Java 9 they moved most (if not all)

White Screen is appearing in javaFx application & its getting stuck

心已入冬 提交于 2020-01-13 06:21:09
问题 We are developing video streaming app using JavaFx and JavaCv, While playing Stream into gridPane(8X8), we are occasionally facing splashing White Screen issue and it's continuous. Details:- new Thread(new Runnable() { @Override public void run() { frameGrabber = new FFmpegFrameGrabber(Url); frameGrabber.setVideoOption("preset","ultrafast"); frameGrabber.setOption("rtsp_transport","tcp"); frameGrabber.setOption("stimeout" , "60000"); frameGrabber.setAudioChannels(0); frameGrabber

Java 9 - List class: of() overloaded methods with varargs [duplicate]

对着背影说爱祢 提交于 2020-01-11 07:23:20
问题 This question already has answers here : What is the point of overloaded Convenience Factory Methods for Collections in Java 9 (6 answers) Java 9, Set.of() and Map.of() varargs overloads [duplicate] (3 answers) Closed 2 years ago . In Java 9, under the List interface, there is a new method of() which according to Java documentation: The List.of() static factory methods provide a convenient way to create immutable lists. They have overloaded of() with up to 10 arguments together with one

Understanding sequential vs parallel stream spliterators in Java 8 and Java 9

给你一囗甜甜゛ 提交于 2020-01-11 06:21:05
问题 A question about spliterators that at first glance is not straightforward. In streams, .parallel() changes the behaviour that the stream is processed. However I was expecting the spliterators created from sequential and parallel streams to be the same. For example, in sequential streams typically, the .trySplit() is never invoked , while in parallel streams it is, in order to hand over the split spliterator to another thread. Differences between stream.spliterator() vs stream.parallel()

Why does it keep lib/modules locked?

孤者浪人 提交于 2020-01-10 17:17:09
问题 When I launch any third-party application, e.g. Notepad (but you could take anything else), from a Java 9 application and then exit the Java application: import java.io.*; public class LaunchNotepad { public static void main(String[] args) throws IOException { Runtime.getRuntime().exec(new String[] {"C:\\Windows\\notepad.exe"}); } } the launched third party application keeps locking Java 9's lib\modules file. This makes it hard for our Java application with a private JRE to update itself,

How to find the indices of the visible rows in a TableView in JavaFX 9

╄→гoц情女王★ 提交于 2020-01-10 17:01:33
问题 How do I get the indices of the visible rows in a TableView in JavaFX 9? In JavaFX 8, I can do the following: // --- The offending imports in Java 9 // import com.sun.javafx.scene.control.skin.TableViewSkin; // import com.sun.javafx.scene.control.skin.VirtualFlow; /** * This is a total hack. We need it as scrollTo jumps the selected * row to the top of the table. Jarring if the row is already * visible. As a workaround, we only scroll if the row isn't already * visible * * @return A 2 element

How to find the indices of the visible rows in a TableView in JavaFX 9

柔情痞子 提交于 2020-01-10 17:01:14
问题 How do I get the indices of the visible rows in a TableView in JavaFX 9? In JavaFX 8, I can do the following: // --- The offending imports in Java 9 // import com.sun.javafx.scene.control.skin.TableViewSkin; // import com.sun.javafx.scene.control.skin.VirtualFlow; /** * This is a total hack. We need it as scrollTo jumps the selected * row to the top of the table. Jarring if the row is already * visible. As a workaround, we only scroll if the row isn't already * visible * * @return A 2 element

jdk 9 high dpi disable for specific panel

。_饼干妹妹 提交于 2020-01-10 14:32:12
问题 With JDK 9 my swing app works well on Windows with 4k highdpi and normal 1080p normal dpi. Labels, Comboboxes etc. all look nice and are scaled up on the 4k screen. But so is my JPanel where i draw custom images. Can i disable the scaling for this one JPanel to handle drawing myself? I am using apache-commons bicubic interpolation to draw more details on the higher unscaled resolution, but as it is scaled out of the box, i just have the "normal" dimensions to draw. Kind regards 回答1: (EDIT:

Handle PrintGCApplicationStoppedTime flag in java 9

99封情书 提交于 2020-01-10 04:09:25
问题 My application is using gc flag "PrintGCApplicationStoppedTime" but when am running it with Java 9 it is failing with following error: Unrecognized VM option 'PrintGCApplicationStoppedTime' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. This post indicate that option is deprecated but is there any alternative for the information printed by his flag or this information is no longer available? 回答1: Few things to know there: First,