I have a JAVA GUI project in netbeans (with palette) ... The main folder is "ImageBrowser". It has these foldrers "build", "dist", "nbproject", "src", and these files "build.xml", "manifest.mf". Into the folder "src" there are the foldrers "Icons", "ImageBrowser" Into the "Icons" I have a picture, and in "ImageBrowser" are the sources.
FIRST PROBLEM
Inside the source code I use :
ImageIcon icon = new ImageIcon("src/Icons/my_photo_name.jpg");
labelImage.setIcon(icon);
Take a good look at the directory "src/Icons/my_photo_name.jpg" I ensure you that when I run the project from netbeans, the program shows the "my_photo_name.jpg", whith no problems.
When I make the jar (I made it in netbeans in Linux) and run it in windows7, the program DO NOT SHOW the "my_photo_name.jpg", obviouly it cannot find it !
Can you tell me why ?
SECOND PROBLEM
When I run the jar in Linux terminal it sais:
Exception in thread "main" java.lang.UnsupportedClassVersionError:
ImageBrowser/Main : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: ImageBrowser.Main. Program will exit.
I will ensure you that from project proprties i have defined the main class....
Anyone who help me, he will save me !! Thanks in advance !