I held my head for about 2 hours, so I posted it as a memorandum. It looks sharp (it looks sharp). JavaFX8. It's a ridiculous story, but I spelled it with a sense of self-discipline, so if you have time, please go out with me. ...... If you are really in trouble and have arrived here, let's dance together (┓ ^ ω ^) ┛)) Nisa Nisa ♪ (┓ ^ ω ^) ┛)) Hisa Hoisa ♪
「IllegalArgumentException: Invalid URL: unknown protocol: c」
If you insert the absolute path as it is, you will be told that you don't know such a protocol. I don't even know this one.
So, if you look closely, you're requesting a URL instead of a path. Even if you don't look closely, the protocol is written, and the first line of the error is also written firmly. On the contrary, he says at the coding stage. Tehepero.
Well, in the end, all you have to do is "specify the local file by URL". When I try to google, it seems that I can just add "file:" to my head.
hoge.java
String path = "C:\\~(Abbreviation)";
Image image = new Image("file:"+path);
That's it. It's hard. Give me back my 2 hours.
Does anyone say, "I got a'RuntimeException: Internal graphics not initialized yet'when I tested it?" I was vomited. If you look here (http://namihira.hatenablog.com/entry/2014/12/29/125834), I think it will be solved.