码迷,mamicode.com
首页 > 其他好文 > 详细

centos安装ganttproject

时间:2016-08-05 17:36:01      阅读:214      评论:0      收藏:0      [点我收藏+]

标签:

参考了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 "$@"
else
  "$JAVA_COMMAND" $JAVA_ARGS "$@" &
fi

 

centos安装ganttproject

标签:

原文地址:http://www.cnblogs.com/rb258/p/5741976.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!