Cygwin如何配置Java编译环境

http://cs.nyu.edu/~yap/prog/cygwin/FAQs.html

Q: Can I execute programs installed under the Window's directory?

E.g., javac.

A: There is no difference between executable programsunder cygwin and those "native" to Windows.

For instance,if you have installed the java compiler "javac" in the standard location (say C:/"Program Files"/jdk1.4.1/bin) thenyou can directly invoke it. Better still, just link to it:

> cd /usr/local/bin

> ln -s /cygdrive/c/"Program Files"/jdk1.4.1/bin/javac.exe .

> rehash

> javac myProg.java

If you need to access CLASSPATH, you can set this in the ControlPanel, under Systems.

Alternatively, you can give it asan argument to javac.

E.g., you have a jar file in your cygwindirectory "/java/lib/pg73jdbc.jar", you can access it thus:

> javac -classpath C:/cygwin/java/lib/pg73jdbc.jar myProg.java

Note that the path here begins from C:, and assumesyour cygwin is found under C:/cygwin.

REMARK: other software that I like to link to are acrobat reader(for viewing pdf files), miktex (for tex/latex processor),gsview (for viewing postscript files),gvim (editor).


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值