Classpath problems with splitter

Hello, I'm trying since hours to get the splitter running from source with ubuntu 8.10. I've checked out the newest source from svn, compiled it with 'ant dist' and try to start it with 'java -jar splitter.jar.' The classpath is set systemwide, so mkgmap.jar (latest svn revision) should be found. The result is always: Exception in thread "main" java.lang.NoClassDefFoundError: uk/me/parabola/mkgmap/general/MapDetails at uk.me.parabola.splitter.DivisionParser.<init>(DivisionParser.java:42) at uk.me.parabola.splitter.Main.calculateAndSplit(Main.java:144) at uk.me.parabola.splitter.Main.split(Main.java:82) at uk.me.parabola.splitter.Main.main(Main.java:67) Caused by: java.lang.ClassNotFoundException: uk.me.parabola.mkgmap.general.MapDetails at java.net.URLClassLoader$1.run(URLClassLoader.java:217) 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) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336) ... 4 more I'm pretty sure that the classpath is set correctly. For a last try I downloaded the precompiled splitter.jar and was really astonished: It runs without problems. So something has to be wrong with my compiled jar file. Has anyone any idea what could be wrong? Regards, Johann

On Feb 8, 2009, at 18:45, Johann Gail wrote:
Hello,
I'm trying since hours to get the splitter running from source with ubuntu 8.10. I've checked out the newest source from svn, compiled it with 'ant dist' and try to start it with 'java -jar splitter.jar.' The classpath is set systemwide, so mkgmap.jar (latest svn revision) should be found.
I'm pretty sure that the classpath is set correctly.
To confirm this, you could try running $ java uk.me.parabola.mkgmap.main.Main Cheers Robert

Hi
with 'ant dist' and try to start it with 'java -jar splitter.jar.' The classpath is set systemwide, so mkgmap.jar (latest svn revision) should be found.
It is one of those little quirks that if you use -jar, then the classpath is ignored. (there is a way of specifying the classpath inside the jar). It works in the splitter.jar you downloaded as that is packaged to include the classes from mkgmap.jar I will eventually make it standalone so that it does not require mkgmap at all. ..Steve

It is one of those little quirks that if you use -jar, then the classpath is ignored. (there is a way of specifying the classpath inside the jar).
That is new to me, very interesting. Is this only at my ubuntu machine the case or everywhere else? I believe to remember another project on a windows machine, which was also a jar file, runs with java1.2 and uses the classpath settings.
It works in the splitter.jar you downloaded as that is packaged to include the classes from mkgmap.jar
Would it be possible to modify the build.xml to include the needed classes?

On Mon, Feb 09, 2009 at 06:26:17PM +0100, Johann Gail wrote:
That is new to me, very interesting. Is this only at my ubuntu machine the case or everywhere else?
It is entirely standard behaviour as far as I know.
Would it be possible to modify the build.xml to include the needed classes?
I've removed the depenancy on the mkgmap classes now. It should build and run all by itself. ..Steve
participants (3)
-
Johann Gail
-
Robert Vollmert
-
Steve Ratcliffe