EDB*Plus的当前路径问题
磨砺技术珠矶,践行数据之道,追求卓越价值
回到上一级页面: PostgreSQL基础知识与基本操作索引页 回到顶级页面:PostgreSQL索引页
[作者 高健@博客园 luckyjackgao@gmail.com]
无论原来位于哪个路径,当启动EDB*Plus后,如果运行 ho pwd;就会出现:
/opt/PostgresPlus/9.2AS/edbplus
究其原因,
启动EDB*Plus的脚本是:
/opt/PostgresPlus/9.2AS/edbplus/scripts/launchedbplus.sh
[root@test scripts]# cat launchedbplus.sh
#!/bin/bash
# Copyright (c) 2012, EnterpriseDB Corporation. All rights reserved ## Script used to launch EDB*Plus. . /opt/PostgresPlus/9.2AS/edbplus/scripts/common.sh openGuiCommandLine "EDB*Plus" "/opt/PostgresPlus/9.2AS/edbplus/edbplus.sh /nolog" [root@test scripts]#
而 edbplush.sh中,有:
[root@test edbplus]# cat edbplus.sh
#!/bin/bash # EDB*Plus startup script
# Copyright (c) 2008-2012, EnterpriseDB Corporation. All rights reserved. export base="/opt/PostgresPlus/9.2AS/edbplus"
export JAVA_HOME="/opt/PostgresPlus/9.2AS/jre"
export CLASSPATH=$base/edbplus83.jar:$base/lib/edb-jdbc14.jar:$base/lib/jline-0.9.91.jar
...
export WD=$CWD
cd $base
$JAVA_CMD_PATH/java -Djava.library.path=$base jline.ConsoleRunner com.edb.EDBPlus $@
returnCode="$?"
cd $WD
exit $returnCode
[root@test edbplus]#
其中,启动EDB*Plus的GUI之前,有一个 cd $base动作,而$base所指向的是: /opt/PostgresPlus/9.2AS/edbplus
如果我编辑edbplus.sh,把下面的路径改一下:
export WD=$CWD
cd $base
$JAVA_CMD_PATH/java -Djava.library.path=$base jline.ConsoleRunner com.edb.EDBPlus $@
returnCode="$?"
改成:
export WD=$CWD
#cd $base
cd /opt
$JAVA_CMD_PATH/java -Djava.library.path=$base jline.ConsoleRunner com.edb.EDBPlus $@
returnCode="$?"
这是,我再次启动EDB*Plus,执行 ho pwd,得到的路径就是 /opt
[作者 高健@博客园 luckyjackgao@gmail.com]
回到上一级页面: PostgreSQL基础知识与基本操作索引页 回到顶级页面:PostgreSQL索引页
磨砺技术珠矶,践行数据之道,追求卓越价值
EDB*Plus的当前路径问题的更多相关文章
- 当程序以Windows Services形式启动时当前路径不对
当程序以Windows Services形式启动时当前路径不对 @(操作系统)[博客|dotNet] 很多时候我们需要将我们的程序写成利用Windows服务的形式来让它能够自启动.今天遇到一个问题,当 ...
- [No00006F]总结C#获取当前路径的各种方法
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- [Linux学习]Shell脚本(1)--函数,输入,if判断(持续更新)+删除空行 +保存当前路径
1)接收输入 check_status() { echo --Check hi_repo status is ok? y or n read var if [ "$var" != ...
- XE3随笔20:几个和当前路径相关的新函数
偶然从 SysUtils 里发现了几个路径相关的函数, 以前没见过, 可能是 Delphi XE3 新增的: GetLocaleDirectory(); GetLocaleFile(); Locale ...
- C#获取当前路径的7种方法
总结C#获取当前路径的7种方法 C#获取当前路径的方法如下: 1. System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName ...
- python 获得当前路径
先要装载 os模块: import os print os.getcwd() 或者 print os.path.abspath(os.curdir) print os.path.abspath('.' ...
- 【转】C#(ASP.Net)获取当前路径的方法集合
转自:http://www.gaobo.info/read.php/660.htm //获取当前进程的完整路径,包含文件名(进程名). string str = this.GetType().Asse ...
- C\C++ 获取当前路径
C\C++ 获取当前路径 获取当前工作目录是使用函数:getcwd.cwd指的是“current working directory”,这样就好记忆了. 函数说明: 函数原型:char* getc ...
- python ftplib.FTP 获取当前路径下所有目录
FTP 模块里有一个dir函数,可以打印出当前路径下所有文件,但是这个函数没有返回值,只是打印出来. 还有一个nlst函数,可以返回一个文件名的列表,但是只有文件名,没有详细信息,无法判断是否是目录. ...
随机推荐
- clean-css
What is clean-css? Clean-css is a fast and efficient Node.js library for minifying CSS files. Accord ...
- C# 中 DataTable 使用详解。
在项目中经常用到DataTable,如果DataTable使用得当,不仅能使程序简洁实用,而且能够提高性能,达到事半功倍的效果,现对DataTable的使用技巧进行一下总结. 一.DataTable简 ...
- node环境和浏览器的区别
一.全局环境下this的指向 在node中this指向global而在浏览器中this指向window,这就是为什么underscore中一上来就定义了一 root: 1 var root = typ ...
- [翻译] UCZProgressView
UCZProgressView UCZProgressView is a circular progress indicator with cool animations for image load ...
- 用于mask遮罩效果的图片配合resizableImage使用
用于mask遮罩效果的图片配合resizableImage使用 效果: 作为素材用的图片: 源码: // // ViewController.m // Rect // // Created by Yo ...
- amazon interview
I'll be sitting for an Amazon interview in 3 months. Which website should I use to practice: SPOJ, H ...
- css3实现border渐变色
案例1 .box{ width: 100px; height: 100px; border:10px solid #ddd; border-image: -webkit-linear-gradient ...
- September 15th 2017 Week 37th Friday
First I need your hand, then forever can begin. 我需要牵着你的手,才能告诉你什么是永远. If you want to shake hands with ...
- js面向对象理解
js面向对象理解 ECMAScript 有两种开发模式:1.函数式(过程化),2.面向对象(OOP).面向对象的语言有一个标志,那就是类的概念,而通过类可以创建任意多个具有相同属性和方法的对象.但是, ...
- 我的开源项目——Jerry
在日常工作中,经常会碰到一些问题,比如数字金额要写成千分位形式(1234 -> 123,4.00).要写成汉字大写形式(123 -> 壹佰贰拾叁圆),又比如要进行 cookie 读写操作, ...