Ubuntu上試用sql developer

來源:互聯網
上載者:User

Windows下面Oracle用戶端ui程式有toad和pl/sql developer,到了Ubuntu 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


好了,可以正常進到ui介面了,第一感覺還是比較清爽的。

相關文章

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.