I need to write a program to show a picture in javafx scene, and I used ImageView to show it. But I encountered a problem.
Exception in thread "main" java.lang.IllegalArgumentException: Invalid URL: unknown protocol: f Caused by: java.net.MalformedURLException: unknown protocol: f
This is my code:
public void initialize(){
label1.setText("success");
imageView1.setImage(new Image("F:/a.jpg"));
}
file://url scheme for files