Java 2D Example compile error
Hi. I am having trouble running sample java code for a 2D example. It seems to compile okay, but it does not run. I made sure to change the ".png" image file and place it in the source folder, but that did not help. I can't pin point the error and how to fix it. Any help with this would be appreciated. Thanks in advance. Here is the output of the error I get when I try to run it.
C:\Users\Drew\workspace\AdvancedJava\Tester\ImageP anel_4_6>javac -d . *.java
C:\Users\Drew\workspace\AdvancedJava\Tester\ImageP anel_4_6>java com.chptr4.imagepanel.Java2DExample
Uncaught error fetching image:
at sun.awt.image.URLImageSource.getConnection(Unknown Source)
at sun.awt.image.URLImageSource.getDecoder(Unknown Source)
at sun.awt.image.InputStreamImageSource.doFetch(Unkno wn Source)
at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
at sun.awt.image.ImageFetcher.run(Unknown Source)
Re: Java 2D Example compile error
If you want help, you'll have to post an SSCCE that demonstrates only that problem. Nobody wants to download a .rar file- make it easy for people to help you.
I suggest you create a File instance with the image path you're using, then print out the absolute path of that File. Is that what you expected?