[Gvsig_english] gvSIG and Java on Mac OS X

Agustin Diez Castillo Agustin.Diez at uv.es
Thu Oct 16 15:20:38 CEST 2008


Ben,
You can force Mac yo use a particular version of Java.
All versions reside at
/System/Library/Frameworks/JavaVM.framework/Versions
and there a link point CurrentJDK to the version of your choice.
So you only need to point CurrentJDK to your 1.6 JRE.
But anyhow if you're in PPC machine you need to take out the crs  
folder (this is true after the 913 build including 12xx). I've  
prepared a Mac version with sextante and gvSIG mobile for PPC machines  
[1].
Agustin
[1] http://gvsigmac.blogspot.com/2008/08/gvsig-112-running-on-mac-ppcs.html
El Oct 16, 2008, a las 2:47 PM, Benjamin Ducke escribió:

> Dear developers/list,
>
> I am currently trying to understand how Java works on Mac OS X.
> Since Apple decides what Java gets installed on any version of
> Mac OS X, not the user, I would like to be able and bundle my own
> 1.6 JRE with gvSIG, so that I can deploy an identical version on
> any Mac.
>
> As a JRE, I am using the Soylatte FreeBSD port and that seems to run
> fine, but gvSIG always picks up the system's outdated Java 1.5 (I am
> running on Mac OS 10.4 with no intentions whatsoever to update
> to 10.5).
>
> Now, I have tried to recreate the whole Java startup procedure using
> a shell script, which I modeled after the one for Linux:
>
> ----
>
> #!/bin/sh
> # gvSIG.sh: startup script for gvSIG on Mac OS X
> PATH_TO_GVSIG="/Users/bartsimpson/Desktop/gvSIG1.1.2.app"
> PATH_TO_RES="$PATH_TO_GVSIG/Contents/Resources/gvSIG/gvSIG 1.1.2  
> build 1045.app/Contents/Resources"
>
> export DYLD_LIBRARY_PATH="$PATH_TO_RES/NativeLibs"
> export PROJ_LIB="$PATH_TO_RES/Java/gvSIG/extensiones/org.gvsig.crs/ 
> data"
>
> cd "$PATH_TO_RES/Java"
>
> # Setup Java environment and run gvSIG
>
> # Java tuning settings
> MAX_HEAP=512
> INI_HEAP=512
>
> JAVA_VM="/Users/bartsimpson/Desktop/soylatte16-i386-1.0.3/bin/java"
>
> $JAVA_VM -Djava.library.path="../NativeLibs" -cp andami.jar:./lib/ 
> gvsig-i18n.jar:./lib/beans.jar:./lib/log4j-1.2.8.jar:./lib/iver- 
> utiles.jar:./lib/castor-0.9.5.3-xml.jar:./lib/crimson.jar:./lib/ 
> xerces_2_5_0.jar:./lib/javaws.jar:./lib/xml-apis.jar:./lib/ 
> looks-2.0.2.jar:./lib/JWizardComponent.jar:./lib/kxml2.jar:./lib/ 
> jcalendar.jar:./lib/jh.jar -Xms${INI_HEAP}M -Xmx${MAX_HEAP}M  
> com.iver.andami.Launcher gvSIG gvSIG/extensiones "$@"
>
> ----
>
> This goes almost all the way to starting gvSIG, but eventually fails:
>
> java.lang.reflect.InvocationTargetException
>        at java.awt.EventQueue.invokeAndWait(EventQueue.java:997)
>        at  
> javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1323)
>        at com.iver.andami.Launcher.main(Unknown Source)
> Caused by: java.lang.NoClassDefFoundError: Could not initialize  
> class com.iver.cit.gvsig.fmap.crs.CRSFactory
>        at com.iver.cit.gvsig.project.Project.<clinit>(Unknown Source)
>        at  
> com.iver.cit.gvsig.project.ProjectFactory.createProject(Unknown  
> Source)
>        at  
> com.iver.cit.gvsig.ProjectExtension.loadInitialProject(Unknown Source)
>        at com.iver.cit.gvsig.ProjectExtension.postInitialize(Unknown  
> Source)
>        at com.iver.andami.Launcher.postInitializeExtensions(Unknown  
> Source)
>        at com.iver.andami.Launcher.access$600(Unknown Source)
>        at com.iver.andami.Launcher$4.run(Unknown Source)
>        at  
> java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
>        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
>        at com.iver.andami.ui.AndamiEventQueue.dispatchEvent(Unknown  
> Source)
>        at  
> java 
> .awt 
> .EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java: 
> 273)
>        at  
> java 
> .awt 
> .EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
>        at  
> java 
> .awt 
> .EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java: 
> 173)
>        at  
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
>        at  
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
>        at java.awt.EventDispatchThread.run(EventDispatchThread.java: 
> 121)
>
>
>
> Can someone on this list make sense of that error message?
> Is the problem with the CRS library? Did I forget to include
> something into the Java classpath or the system's linker path?
>
> Thanks,
>
> Ben
>
>
> -- 
> Benjamin Ducke
> Senior Applications Support and Development Officer
>
> Oxford Archaeology Ltd
> Janus House
> Osney Mead
> OX2 0ES
> Oxford, U.K.
>
> Tel: +44 (0)1865 263 800 (switchboard)
> Tel: +44 (0)1865 980 758 (direct)
> Fax :+44 (0)1865 793 496
> benjamin.ducke at oxfordarch.co.uk
>
>
>
>
> ------
> Files attached to this email may be in ISO 26300 format (OASIS Open  
> Document Format). If you have difficulty opening them, please visit http://iso26300.info 
>  for more information.
>
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at runas.cap.gva.es
> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
>




More information about the Gvsig_internacional mailing list