I have the following problem when using serialver. My .java code is in a
directory /some_path/test. I compile it and place the .class file in
the directory test/kool (the .java belongs the package of thie name).
Then I call the serialver tool:
serialver -classpath /some_path/test/kool HistogramPpalParams
I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: HistogramPpalParams (wrong name: kool/HistogramPpalParams)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:496)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:117)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$300(URLClassLoader.java:69)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:544)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:203)
at java.lang.ClassLoader.loadClass(ClassLoader.java:325)
at java.lang.ClassLoader.loadClass(ClassLoader.java:257)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:212)
at sun.tools.serialver.SerialVer.serialSyntax(SerialVer.java:155)
at sun.tools.serialver.SerialVer.main(SerialVer.java:235)
I tried many other combinations with placing the class file and setting
the classpath, always the same result. When I remove the package kool
directive from the source the tool runs smoothly.
Could anyone help ?
--
Janusz Martyniak