【问题标题】:Start smartgit with another java version用另一个 java 版本启动 smartgit
【发布时间】:2014-12-12 20:41:48
【问题描述】:

我尝试在我的 Ubuntu 14.10 32bit 上使用另一个 java 版本启动 smartgit 6.5。

在文件/usr/share/smartgit/bin/smartgit.sh 中:

# To specify an alternative Java Runtime Environment, set the environment
# variable SMARTGIT_JAVA_HOME or add a
#
# jre=/path/to/jre
#
# line to smartgit.vmoptions (see below).
#
# To specify additional VM options, add them to smargit.vmoptions
# or ~/.smartgit/smartgit.vmoptions files.

Here我找到了如何编辑文件的答案:

gedit ~/.smartgit/smartgit.vmoptions

所以我只输入了:

jre=/usr/lib/jvm/java-7-openjdk-i386/bin/java

我想,这应该改变 smartgit 中使用的 java 版本(在菜单 Help->Information 中可见)

但事实并非如此!还在1.7.0_72-b14 (/usr/lib/jvm/java-7-oracle/jre)

这个文件看起来如何才能使用另一个 Java 引擎?

【问题讨论】:

    标签: java smartgit


    【解决方案1】:

    我找到了解决方案:在控制台上启动 smartgit 时:

    smartgit-start 
    

    您会收到警告:

    警告:/usr/lib/jvm/java-7-openjdk-i386/bin/java/bin/java 不存在

    该路径中有一个双 /bin/java,因此您只需输入 bin 文件夹的路径:

    gedit ~/.smartgit/smartgit.vmoptions
    

    然后输入:

    jre=/usr/lib/jvm/java-7-openjdk-i386
    

    这将使用该版本启动 smartgit


    既然现在你总是必须在控制台上启动 smartgit,一个更小的文件会很方便:创建一个文件/usr/local/sbin/smg

    cd /tmp;
    nohup /usr/share/smartgit/bin/smartgit.sh &
    

    并赋予其可执行权限:

    chmod +x /usr/local/sbin/smg
    

    现在你可以在任何地方启动 smartgit 了

    smg
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-22
      • 1970-01-01
      • 2017-04-23
      • 2022-08-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多