title: java error parsing osm file with osmosis
body: <p>I'm trying to use open street map's 'osmosis' tool to parse an osm file and write to a postgis database.</p>
  
  <p>(if it's helpful, i'm running this on ubuntu 11.10, and I have the oracle jdk 1.6 on my system)</p>
  
  <p>Here's what I've been attempting.</p>
  
  <pre><code>[../package] $ ./bin/osmosis --read-xml file="../../../osm_dumps/africa.osm" --write-pgsql host=localhost database=osmosis_test user=chris
  Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher
  Caused by: java.lang.ClassNotFoundException: org.codehaus.classworlds.Launcher
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
  Could not find the main class: org.codehaus.classworlds.Launcher.  Program will exit.
  [../package] $ ls -al /etc/alternatives/java
  lrwxrwxrwx 1 root root 37 2012-01-12 19:16 /etc/alternatives/java -&gt; /usr/lib/jvm/jdk1.6.0_30/jre/bin/java
  [../package] $ java -version
  java version "1.6.0_30"
  Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
  Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode)
  </code></pre>