cygwin中使用javac

Can I execute programs installed under the Window's directory? 
E.g., javac.

A: There is no difference between executable programs
under 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) then
you 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 Control
Panel, under Systems.  Alternatively, you can give it as
an argument to javac.  E.g., you have a jar file in your cygwin
directory "/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 assumes
your 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).

其中rehash命令在Cygwin中会出错,可以采用hash -r 来代替

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值