running sun java from cygwin
I have installed cygwin in C:\deepan\cygwin\ directory... how do I reinstall it in C:\ directory? I want to be able t开发者_StackOverflow中文版o run java in C:\programfiles\java\ folder from cygwin
Try the following command (with-in Cygwin):
cd "/cygdrive/c/Program Files/Java/"
regardless of where you have cygwin installed you can change directories internally.
To be able to run Java from anywhere you don't need to reinstall cygwin. You should be able to do this
- add the java path to the paths (best solution): export JAVA_HOME="/cygdrive/c/Program\ Files/Java/jre1.8.0_102"
export PATH="$PATH:$JAVA_HOME/bin"
- create aliases like: alias java="/cygdrive/c/Program\ Files/Java/jre1.8.0_102/bin/java.exe"
- create symbolic link: ln -s /cygdrive/c/Program\ Files/Java/jre1.8.0_102/bin/java.exe /usr/bin/java
精彩评论