ubuntu上试用sql developer
windows下面oracle客户端ui程序有toad和pl/sql developer,到了linux下面突然发现全部没了。还好oracle官方有sql developer,同时支持多个系统平台,而且能支持mysql、mssql、sybase数据迁移,既然这么好还是官方的,没有不用的理由。
下载回来运行.sh,却发现总需要输入jdk的路径,很不爽,于是迅速看了下bash shell执行中是什么时候提示要输入jdk路径的,终于在安装目录下的ide/bin/launcher.sh中做个修改即可:
引用:
CheckJDK()
{
# if ide home is not defined then try to define it using
# the first found java command on the path
if [ "X$APP_JAVA_HOME" = "X" ]
then
GetDefaultJDK #这里会检查JAVA_HOME环境变量,我正常设置了却获取不到
fi
# if java wasn't found on the path then ask the user for it
if CheckJavaHome #上面检查不到defalut jdk,因此会进入if
then
local DOT_JDK_FILE_NAME=`GetDotJdkFileName`
APP_JAVA_HOME="" #把这里修改成jdk的目录即可
if [ -f "$HOME/$DOT_JDK_FILE_NAME" ]
then
APP_JAVA_HOME=`cat < "$HOME/$DOT_JDK_FILE_NAME"`
fi
if [ "X$APP_JAVA_HOME" != "X" ]
then
if [ ! -d ${APP_JAVA_HOME} ]
then
APP_JAVA_HOME=""
fi
fi
while [ "X$APP_JAVA_HOME" = "X" ]
do
echo "Type the full pathname of a J2SE installation (or Ctrl-C to quit), the path will be stored in ~/$DOT_JDK_FILE_NAME"
read APP_JAVA_HOME
if [ -f "${APP_JAVA_HOME}/bin/java" ]
then