mac classpath设置

I've been searching for the answer daylong, and finally had the problems solved. I am going to write down what I've done to complete them. Hopefully this could help someone.

As far as I know, there is little need to modify PATH on Mac, so here I only tell how to set CLASSPATH on Mac.

1. Temporary setting, which means once you close the Terminal, the setting won't be kept. You have to set again when you open another Terminal.

Here is the steps:

Open the Terminal;

Type:(Here I suppose you put distribution under your username folder)
$export CLASSPATH=${CLASSPATH}:~/jadex-0.96/lib/jadex_rt.jar:~/jadex-0.96/lib/jibx-run.jar:~/jadex-0.96/lib/xpp3.jar:~/jadex-0.96/lib/jadex_standalone.jar:~/jadex-0.96/lib/jadex_tools.jar:~/jadex-0.96/lib/GraphLayout.jar:~/jadex-0.96/lib/jhall.jar

Press return

Then you could check by typing:

$ echo $CLASSPATH to see if you succeed in doing that. After that, you could run command:

$ java jadex.adapter.standalone.Platform

 

 

2. Permanent setting.

Open the Terminal

$ ls -a 
And see if there is a .bash_profile in your home folder. If there isn't:
$touch .bash_profile
This will create a blank file if there is none. Then,
$open -e .bash_profile
This will open it in TextEdit. Add the following line:
export CLASSPATH=.:/Users/lingao/jadex-0.96/lib/jadex_rt.jar:/Users/lingao/jadex-0.96/lib/jibx-run.jar:/Users/lingao/jadex-0.96/lib/xpp3.jar:/Users/lingao/jadex-0.96/lib/jadex_standalone.jar:/Users/lingao/jadex-0.96/lib/jadex_tools.jar:/Users/lingao/jadex-0.96/lib/GraphLayout.jar:/Users/lingao/jadex-0.96/lib/jhall.jar
save the file
close the Terminal and open a new one
Type:$ echo $CLASSPATH
You will find there are values for CLASSPATH.

Done!

转载于:https://www.cnblogs.com/melody-emma/p/4736075.html

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值