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!

时间: 2024-08-06 08:52:07

mac classpath设置的相关文章

mac常用设置

1.修改mac主机名 系统偏好设置->共享->电脑名称 ,编辑就可以了. sudo scutil --set HostName hostname 这个是修改主机名 sudo scutil --set ComputerName newName  这个修改计算机名 mac常用设置,布布扣,bubuko.com

写了一个Mac快速设置、打开和关闭Web代理的Shell命令

缘由(痛点) 每次在Mac上设置Web代理,都需要点开"系统偏好设置 -- 网络 -- 高级 -- 代理",然后分别设置Web代理(HTTP)和安全Web代理(HTTPS),设置完后,还要点"好 -- 应用".如果要关闭Web代理也是如此,只是点到代理设置面板后,只需要取消勾选Web代理和安全Web代理. 个人觉得这种操作很繁琐,对于一个经常需要改Web代理的人来说,这简直是灾难性的重复操作.所以这段时间学了些Linux Shell脚本编程的知识,写了两个Shell

jenkins mac slave 设置

1.在jenkins上增加节点, mac slave 设置" alt="jenkins mac slave 设置" src="http://s3.sinaimg.cn/middle/493c80b04e16068a305d2&690" width="640"> 2,在mac系统中将ssh的服务打开在偏好设置- 互联网与无线 - 共享中 mac slave 设置" alt="jenkins mac sla

Mac OS设置root密码

不知怎么忘记mac os系统的root密码了 方法一: 首先,启动机器,启动时按住Apple和S键,以单用户模式(single user mode)进入系统.输入:mount -uw / 然后回车. 输入: passwd 短用户名 (如果你知道的话)如果你不知道短用户名,可以输入: passwd root 输入两遍新密码. 输入:reboot 回车. 让机器重新启动. 如果你用的是root,登录以后,要到系统预置/系统偏好设置(System Preferences)里的"账户"下,找到

mac pro 设置wifi热点

系统偏好设置-共享-网络共享(Internet共享)共享来源选择你的网络(非wifi), 以下复选框选wifi,wifi设置里能够设置wifi名字password,注意不能有中文. 设置完,internet共享打钩,菜单条的wifi图标加了个箭头就是成功开启了 mac pro 设置wifi热点

Mac 可设置环境变量的位置、查看和添加PATH环境变量

(1)首先要知道你使用的Mac OS X是什么样的Shell,使用命令 echo $SHELL 如果输出的是:csh或者是tcsh,那么你用的就是C Shell. 如果输出的是:bash,sh,zsh,那么你的用的可能就是Bourne Shell的一个变种. Mac OS X 10.2之前默认的是C Shell. Mac OS X 10.3之后默认的是Bourne Shell. (2)如果是Bourne Shell. 那么你可以把你要添加的环境变量添加到你主目录下面的.profile或者.bas

mac上设置robotium环境的总结

在mac上配置robotium环境,需要注意以下几点: java jdk+jre的安装和环境变量的设置 eclipse的安装 eclipse上安卓sdk和adt的扩展和安装 安卓环境变量的设置 eclipse/mac上对安卓真机的设置:http://my.oschina.net/u/855532/blog/403077 apk的反编译:http://my.oschina.net/u/855532/blog/403095 apk的重签名:http://my.oschina.net/u/855532

Mac 开发者设置强迫症

Latest commit 2461787 on Mar 1 原文链接 强迫症的 Mac 设置指南 如何配置一个高效的 Mac 工作环境 English Version Table of Contents OS X 功能键 全键盘控制 Spotlight 快捷键 输入法快捷键 其他快捷键 设置 Trackpad 轻点来点按 语音 词典 Dock Position 更改 Caps Lock 键为 Control 键 Remove all Dock icons[OCD] 重置 Launchpad 上

MAC下设置mavenJDK版本

compile-plugin可以设置source和target使用的jdk 版本. mvn -v可以看出使用的jdk版本,在mac上需要修改CurrentJDK软链接 http://stackoverflow.com/questions/18813828/why-maven-use-jdk-1-6-but-my-java-version-is-1-7 http://stackoverflow.com/questions/2503658/specify-jdk-for-maven-to-use指出