centos安裝ganttproject

來源:互聯網
上載者:User

標籤:

參考了http://gaoxingf.blog.51cto.com/612518/191288/;

我的JAVA早已經安裝了.

問題:root #ganttproject 提示org.bardsoftware.eclipsito.Boot loss.在window下運行ok.

解決:對比檔案夾裡的檔案,WINDow下有個.bat,看了一下,發現org.bardsoftware.eclipsito.Boot的路徑設定.而CENTOS裡,用GEDIT查看ganttproject,看到也有一些路徑設定,

#!/bin/bash
# Copyright 2014 BarD Software s.r.o
# This script launches GanttProject. It can be symlinked and can be ran from
# any working directory

SCRIPT_FILE="$0"

WORKING_DIR="$(pwd)"
# We want to find the directory where the real script file resides.
# If real file is symlinked (possibly many times) then we need to follow
# symlinks until we reach the real script
# After that we run pwd to get directory path
cd "$(dirname "$SCRIPT_FILE")"
SCRIPT_FILE="$(basename "$SCRIPT_FILE")"

while [ -L "$SCRIPT_FILE" ]; do
  SCRIPT_FILE="$(readlink "$SCRIPT_FILE")"
  cd "$(dirname "$SCRIPT_FILE")"
  SCRIPT_FILE="$(basename "$SCRIPT_FILE")"
done

GP_HOME="$(pwd)"

cd "$WORKING_DIR"

# Create log directory
GP_LOG_DIR="$HOME/.ganttproject.d"
# Check if log dir is present (or create it)
if [ ! -d $GP_LOG_DIR ]; then
  if [ -e  $GP_LOG_DIR ]; then
    echo "file $GP_LOG_DIR exists and is not a directory" >&2
    exit 1
  fi
  if ! mkdir $GP_LOG_DIR ; then
    echo "Could not create $GP_LOG_DIR directory" >&2
    exit 1
  fi
fi

# Create unique name for log file
LOG_FILE="$GP_LOG_DIR/.ganttproject-"$(date +%Y%m%d%H%M%S)".log"
if [ -e "$LOG_FILE" ] && [ ! -w "$LOG_FILE" ]; then
  echo "Log file $LOG_FILE is not writable" >2
  exit 1
fi

# Find usable java executable
if [ -z "$JAVA_HOME" ]; then
  JAVA_COMMAND=$(which java)
  if [ "1" = "$?" ]; then
    echo "No executable java found. Please set JAVA_HOME variable" >&2
    exit 1
  fi
else
  JAVA_COMMAND=$JAVA_HOME/bin/java
fi
if [ ! -e "$JAVA_COMMAND" ]; then
  echo "$JAVA_COMMAND does not exist" >&2
  exit 1
fi
if [ ! -x "$JAVA_COMMAND" ]; then
  echo "$JAVA_COMMAND is not executable" >&2
  exit 1
fi

CLASSPATH="$CLASSPATH:$GP_HOME/eclipsito.jar:$GP_HOME/lib/core:$GP_HOME"/**修改此處**/
export CLASSPATH
CONFIGURATION_FILE=ganttproject-eclipsito-config.xml
BOOT_CLASS=org.bardsoftware.eclipsito.Boot

JAVA_ARGS="-Xmx256m $BOOT_CLASS $CONFIGURATION_FILE -log true -log_file $LOG_FILE"
if [ -n "$(echo \"$*\" | sed -n ‘/\(^\|\s\)-/{p;}‘)" ]; then
  "$JAVA_COMMAND" $JAVA_ARGS "[email protected]"
else
  "$JAVA_COMMAND" $JAVA_ARGS "[email protected]" &
fi

 

centos安裝ganttproject

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.