Dear endolf,
thanks for your advice, it helps.
when I compile the exact same code as the source code of ControllerReadTest (from:
https://jinput.dev.java.net/source/browse/jinput/coreAPI/src/java/net/java/games/input/test/ControllerReadTest.java) with:
1
| $ javac -Xlint:unchecked -classpath jinput.jar ControllerReadTest.java |
, I got these warning messages:
1 2 3 4 5 6 7
| ControllerReadTest.java:182: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.List axisList.add(p2); ^ ControllerReadTest.java:255: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.List controllers.add(new ControllerWindow(this, c)); ^ 2 warnings |
although this is only warning messages, I want to know the meaning of these warning. Please tell me the meaning of these?
when I ran the program with:
1
| $ java -cp jinput.jar ControllerReadTest |
, I got the following error messages:
1 2 3 4 5 6 7 8
| Exception in thread "main" java.lang.NoClassDefFoundError: ControllerReadTest at gnu.java.lang.MainThread.run(libgcj.so.7rh) Caused by: java.lang.ClassNotFoundException: ControllerReadTest not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:jinput.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} at java.net.URLClassLoader.findClass(libgcj.so.7rh) at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh) at java.lang.ClassLoader.loadClass(libgcj.so.7rh) at java.lang.ClassLoader.loadClass(libgcj.so.7rh) at gnu.java.lang.MainThread.run(libgcj.so.7rh) |
as I look at the source code of ControllerReadTest.java, I can see the main method at the last part of the code. Please explain me how to properly compile and run the ControllerReadTest code?
Thank you.