Hello,

Lately I had to use osmosis on Windows. I found a few issues in osmosis.bat that I want to report.

1) lines 14 and 19 need to have extra quotes:

IF EXIST %ALLUSERSPROFILE%\osmosis.bat CALL "%ALLUSERSPROFILE%\osmosis.bat"
IF EXIST %USERPROFILE%\osmosis.bat CALL "%USERPROFILE%\osmosis.bat"

2) around line 28-35, MYAPP_HOME will not be correct if the starting directory is not on the same drive where osmosis is:

C:\tmp>set SAVEDIR=C:\tmp
C:\tmp>set MYAPP_HOME=P:\OSM\osmosis-0.37\bin\..
C:\tmp>REM Now make the MYAPP_HOME path absolute
C:\tmp>cd P:\OSM\osmosis-0.37\bin\..
C:\tmp>set MYAPP_HOME=C:\tmp
C:\tmp>REM Change back to the original directory
C:\tmp>cd C:\tmp
C:\tmp>set MAINCLASS=org.codehaus.classworlds.Launcher
C:\tmp>set PLEXUS_CP=C:\tmp\lib\default\plexus-classworlds-2.2.2.jar
C:\tmp>SET EXEC=java -cp "C:\tmp\lib\default\plexus-classworlds-2.2.2.jar" -Dapp.home="C:\tmp" -Dclassworlds.conf="C:\tmp\config\plexus.conf" org.codehaus.classworlds.Launcher --read-pbf file=E:\Downloads\OSM\Canada_101103.osm.pbf --bounding-box left=-83.08 bottom=42.30 right=-83.03 top=42.33 --write-xml file=E:\Downloads\OSM\Windsor.osm C:\tmp>java -cp "C:\tmp\lib\default\plexus-classworlds-2.2.2.jar" -Dapp.home="C:\tmp" -Dclassworlds.conf="C:\tmp\config\plexus.conf" org.codehaus.classworlds.Launcher --read- pbf file=E:\Downloads\OSM\Canada_101103.osm.pbf --bounding-box left=-83.08 bottom=42.30 right=-83.03 top=42.33 --write-xml file=E:\Downloads\OSM\Windsor.osm 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(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.codehaus.classworlds.Launcher. Program will exit.

Thanks,

N.

_______________________________________________
osmosis-dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/osmosis-dev

Reply via email to