I\'m trying to acces a File inside the .jar. In Netbeans, this:
System.out.println(new File(this.getClass().getResource(\"Image.jpg\").getFile()).exists());
You don't get a File object to it. Its an entry in a JAR not a File on the Filesystem. You have a few options. Create a File by copying the InputStream to the Filesystem, FInd a way to use the InputStream instead, or always have your JAR expanded.
The file is packed, try
resource.getInputStream()
or
InputStream streamOfYourImg = this.getClass().getRessourceAsStream("com/package/resources/image.jpeg");
Hope it helps