Fullsync on Mac OS X?

Help
pjkim
2006-03-28
2012-12-07
  • pjkim
    pjkim
    2006-03-28

    Has anyone gotten Fullsync to work on Mac OS X? I set JAVA_HOME to /Library/Java/Home but when I execute the fullxync.sh script, I get the error message

    Exception in thread "main"

    Java on the Mac has some idiosyncrasies- there is no tools.jar or classes.zip in the JAVA_HOME/lib directory. Does this sound like a problem with LOCALCLASSESPATH not being set correctly?

     
    • From O'reilley :
      `
      To solve this problem forevermore, I dropped the following line into my ~/.login file:

      setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Home

       
      • However in Panther bash is now the default shell
        If you are using bash shell instead of tcsh you would say

        JAVA_HOME=/Library/Java/Home
        export JAVA_HOME

        to make it permanent in bash you edit your .bash_profile file in your home directory to include those lines.

        That works for me after reconnecting to the terminal. Now got :
        Exception in thread "main" Ibook:~ Admin$ /Applications/MyUtils/FIlesynchro/bin/fullsync.sh
        ??

         
    • Jan Kopcsek
      Jan Kopcsek
      2006-06-11

      OS X support is still a bit lacking behind because i can't test it myself. I am always happy if people get it running and as far as i can remember some really got it running.

      fleralle, besides "Exception in thread 'main'", is there anything more printed on the console or written into the log files? I mean, it's good to know that the reason is an exception, but it would be even better to know which it is :D

       
    • Seven
      Seven
      2006-07-16

      I'm also not having much luck getting this to work, I have set JAVA_HOME IN fullsync.sh but now I dont get any errors at all when executing ./fullsync.sh, I cant see any messages in the log files or anything  on the console. I have used this in windows and so far I'm very happy with it, Am I missing anything that works different in Mac OSX?

       
    • Matthew
      Matthew
      2006-09-22

      I would love to use this to backup my PowerMac.  I would even donate in that case :)

       
    • Honky Voodoo
      Honky Voodoo
      2006-09-26

      Here's the exception raised:

      java.io.FileNotFoundException: logs/stderr.log (No such file or directory)
              at java.io.FileOutputStream.open(Native Method)
              at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
              at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
              at net.sourceforge.fullsync.cli.CommandLineInterpreter.parse(CommandLineInterpreter.java:90)
              at net.sourceforge.fullsync.cli.Main.main(Main.java:17)

       
      • Michele Aiello
        Michele Aiello
        2006-09-26

        Hi.

        The solution should be simple. Just create the folder logs.
        Let me know if you have still problems.

        Regards,
          Michele

         
    • Honky Voodoo
      Honky Voodoo
      2006-09-26

      I'm sorry, I'm a dingus.  I'm not Java-proficient, but I'm reasonably bash-functional, so I was poking around in the launch script.  I ran the generated $JAVACMD outside of the script, and got that error (because I was in the wrong directory like a dork).  Fortunately, this directed me to the right log file, the contents of which on run are as follows:

      java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3063 in java.library.path
              at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517)
              at java.lang.Runtime.loadLibrary0(Runtime.java:788)
              at java.lang.System.loadLibrary(System.java:834)
              at org.eclipse.swt.internal.Library.loadLibrary(Library.java:100)
              at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:19)
              at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
              at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
              at org.eclipse.swt.widgets.Display.<clinit>(Display.java:118)
              at net.sourceforge.fullsync.ui.SplashScreen.createSplashScreenSWT(SplashScreen.java:36)
              at net.sourceforge.fullsync.cli.CommandLineInterpreter.parse(CommandLineInterpreter.java:151)
              at net.sourceforge.fullsync.cli.Main.main(Main.java:17)

       
      • Michele Aiello
        Michele Aiello
        2006-09-26

        Hi.
        Unfortunatelly I don't have (yet) a Mac right now. I guess the problem can be solved by downloading the SWT library for Mac and adding it to the LD_LIBRARY_PATH.

        Michele

         
        • I have swt.jar (and libswt-pi-gtk-3063.so) in /Applications/FullSync/lib/ but when launching fullsync (in /Applications/FullSync/) with

          /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java -classpath "/Applications/FullSync/lib/xml-apis.jar:/Applications/FullSync/lib/xercesImpl.jar:/Applications/FullSync/lib/utils.jar:/Applications/FullSync/lib/swt.jar:/Applications/FullSync/lib/swt-pi.jar:/Applications/FullSync/lib/log4j.jar:/Applications/FullSync/lib/jcifs.jar:/Applications/FullSync/lib/jakarta-oro.jar:/Applications/FullSync/lib/j2ssh-core.jar:/Applications/FullSync/lib/fullsync.jar:/Applications/FullSync/lib/commons-net.jar:/Applications/FullSync/lib/commons-logging.jar:/Applications/FullSync/lib/commons-configuration.jar:/Applications/FullSync/lib/commons-cli.jar" -Djava.library.path="/Applications/FullSync/lib" net.sourceforge.fullsync.cli.Main

          I have nothing on stdout but
          $ cat logs/stderr.log
          Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3063 in java.library.path
                  at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
                  at java.lang.Runtime.loadLibrary0(Runtime.java:822)
                  at java.lang.System.loadLibrary(System.java:992)
                  at org.eclipse.swt.internal.Library.loadLibrary(Library.java:100)
                  at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:19)
                  at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
                  at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
                  at org.eclipse.swt.widgets.Display.<clinit>(Display.java:118)
                  at net.sourceforge.fullsync.ui.SplashScreen.createSplashScreenSWT(SplashScreen.java:36)
                  at net.sourceforge.fullsync.cli.CommandLineInterpreter.parse(CommandLineInterpreter.java:151)
                  at net.sourceforge.fullsync.cli.Main.main(Main.java:17)

          So, th question is howto link this library ?

          Thanks a lot

          Daniel

           
    • Daniel Deveaux
      Daniel Deveaux
      2006-11-14

      Hello,
      I try also to launch FullSync on Mac OS X; I have downloaded the last SWT stable distribution for Mac (3.2.1) and copied the files 'swt.jar', 'libswt-agl-carbon-3235.jnilib', 'libswt-carbon-3235.jnilib', 'libswt-pi-carbon-3235.jnilib' and 'libswt-webkit-carbon-3235.jnilib' in the 'lib' directory of FullSync. The program starts and displays the splash screen but fails immeditly vith this error trace:

      Exception in thread "Thread-4" org.eclipse.swt.SWTException: Invalid thread access
              at org.eclipse.swt.SWT.error(SWT.java:3374)
              at org.eclipse.swt.SWT.error(SWT.java:3297)
              at org.eclipse.swt.SWT.error(SWT.java:3268)
              at org.eclipse.swt.widgets.Widget.error(Widget.java:653)
              at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:331)
              at org.eclipse.swt.widgets.Control.internal_new_GC(Control.java:1315)
              at org.eclipse.swt.graphics.GC.carbon_new(GC.java:163)
              at org.eclipse.swt.widgets.Label.drawWidget(Label.java:185)
              at org.eclipse.swt.widgets.Widget.kEventControlDraw(Widget.java:1001)
              at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:352)
              at org.eclipse.swt.widgets.Display.controlProc(Display.java:838)
      java.lang.IllegalArgumentException: Argument cannot be null
              at org.eclipse.swt.SWT.error(SWT.java:3358)
              at org.eclipse.swt.SWT.error(SWT.java:3297)
              at org.eclipse.swt.SWT.error(SWT.java:3268)
              at org.eclipse.swt.widgets.Widget.error(Widget.java:653)
              at org.eclipse.swt.widgets.Widget.checkParent(Widget.java:267)
              at org.eclipse.swt.widgets.Widget.<init>(Widget.java:126)
              at org.eclipse.swt.widgets.Item.<init>(Item.java:61)
              at org.eclipse.swt.widgets.TrayItem.<init>(TrayItem.java:71)
              at net.sourceforge.fullsync.ui.SystemTrayItem.<init>(SystemTrayItem.java:43)
              at net.sourceforge.fullsync.ui.GuiController.startGui(GuiController.java:108)
              at net.sourceforge.fullsync.cli.CommandLineInterpreter.parse(CommandLineInterpreter.java:220)
              at net.sourceforge.fullsync.cli.Main.main(Main.java:17)

      Is FullSync compatible with 3.2.1 version of SWT ?

      My launch script is :

      #! /bin/sh
      #
      #  Launcher for FullSync application
      #
      #  D.Deveaux    --      maj     2006/07/06

      #  Define JAVA_HOME here if it is not defined in our standard environment
      # export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
      #    or "/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home"

      #  Get the base directory of the installation ; returns the 'basedir' variable
      function getbasedir() {
          local com="$0"
          while [ -L "$com" ]; do
              local link=$(readlink $com)
              local isabs=$(echo $link | grep -c '^/')
              if [ ${isabs} -ne 0 ]; then
                  com=$link
              else
                  com="${PWD}/${link}"
              fi
          done
          basedir=$(dirname $com)
          if [ -z $basedir -o "$basedir" == '.' ]; then
              basedir=$PWD
          else
              basedir=`(cd $basedir; pwd)`
          fi
          # basedir=`dirname $basedir`   # only if script is in a 'bin' subdirectory
          echo -e "\t- base package directory is: '${basedir}'"
      } # -------------------------------------------------------------- getbasedir()

      # build the java command and return it in the 'javacmd' variable
      function setJavaCmd() {
      #  Initialize JAVA_HOME and java command to the prefered Java environment
      #  if JAVA_HOME is not yet defined
      #
          if [ -z "$JAVA_HOME" ]; then
              echo "ERROR: 'JAVA_HOME' should be defined"
              exit 1
          fi

          javacmd="${JAVA_HOME}/jre/bin/java"
          if [ ! -x $javacmd ]; then
              javacmd="${JAVA_HOME}/bin/java"
          fi
          if [ ! -x "$javacmd" ]; then
              echo "ERROR: JAVA_HOME is not defined correctly."
              echo "  We cannot execute $javacmd"
              exit 1
          else
              echo -e "\t- java command is '$javacmd'"
              #  $javacmd -version
          fi
      } # -------------------------------------------------------------- setJavaCmd()

      # build the command classpath in the 'localpath' variable
      function setClassPath() {
          if [ -n "$CLASSPATH" ] ; then
            localpath=$CLASSPATH
          fi
          # add in the dependency .jar files
          for i in $1; do
              # if the directory is empty, stop on error
              if [ "$i" != "$1" ] ; then
                  if [ -z "$localpath" ] ; then
                      localpath=$i
                  else
                      localpath="$i":$localpath
                  fi
              else
                  echo "ERROR: the directory '$dirlibs' contains not any jar file"
                  exit 1
              fi
          done
          if [ -n "$JAVA_HOME" ] ; then
              if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
                  localpath=$localpath:$JAVA_HOME/lib/tools.jar
              fi
              if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
                  localpath=$localpath:$JAVA_HOME/lib/classes.zip
              fi
          fi
      } # ------------------------------------------------------------ setClassPath()
         
      echo "    Launch FullSync-0.9.1"
      getbasedir
      FULLSYNC_HOME=$basedir
      setJavaCmd
      cd $FULLSYNC_HOME
      setClassPath "lib/*.jar"
      echo $localpath

      $javacmd -classpath "$localpath" -Djava.library.path="$FULLSYNC_HOME/lib" net.sourceforge.fullsync.cli.Main "$@"