setup.exe) on your desktop.
You'll need it occasionally to install additional items.bash --login -i
(by adding REM in front of it) and add the following line below:
rxvt -sl 5000 -fn "Lucida Console-14" -cr firebrick2 -e bash --login -i
c:\somedir\somefile.ext is
/cygdrive/c/somedir/somefile.ext in Cygwin~ is
c:\cygwin\home\usernameProgram\ Files), escape it with a
\.javac compiler on Windows will not know
anything about /cygdrive/c. Thus, it is
javac c:/somedir/SomeClass.java
(usually, forward slashes work in Windows—it's always worth trying) or
javac c:\\somedir\\SomeClass.java
Of course, Cygwin commands (such as rm) don't know anything
about Windows-style filenames.
rm /cygdrive/c/somedir/SomeClass.class
Always ask yourself whether the command you are using has been written for Cygwin or for Windows.
java -cp .\;archive.jar some.package.SomeClass
.bash_profile). Notepad insists on using DOS style line
endings (i.e. \r\n instead of \n). If you have a
professional programming editor, use that and tell it to use Unix line
endings. Otherwise install EmacsW32. After
the installation, select Options -> C-x/C-c/C-v Cut and Paste (CUA) and
Options->Save Options. ~/.bash_profile, i.e.
c:\cygwin\home\username\.bash_profile. For example, I dislike
the two-line default prompt. To change it, I add the following setting:
PS1='\w\$ '
PATH and other environment variables
in ~/.bash_profile
export PATH=$PATH:/cygdrive/c/Program\ Files/java/jdk1.6.0_13/bin
Here you use a colon, not a semicolon because the PATH is
consumed by Cygwin.
PATH is consumed by Cygwin, so it uses
/cygdrive/c. For example,
export PATH=$PATH:/cygdrive/c/ant/bin
What about the path elements that were picked up at startup? Run
echo $PATH to see how they have been converted.
What about a variable such as ANT_HOME? Is it consumed by a
Windows executable or by a bash shell script? As it happens,
ant is a shell script, so you use
export ANT_HOME=/cygdrive/c/ant
On the other hand, the CLASSPATH is consumed by
javac and java, which are Windows executables.
They require Windows path names.
What if a variable is consumed both by a bash script and a Windows program? See the next two entries.
cygpath command:
cygpath -w ~/somedir/somefile.ext
returns the Windows equivalent of a Unix path, and
cygpath c:\\somedir\\somefile.ext
returns the Cygwin equivalent of a Windows path.
Add the --path option to convert paths (i.e., convert
between colons and semicolons).
# detect Cygwin cygwin=false; case "`uname`" in CYGWIN*) cygwin=true; esac
Then use cygpath as needed:
if $cygwin; then SOMEVAR=`cygpath --path -w $SOMEVAR` fi
.emacs customization file. In Windows 7, it is
under c:\Users\username\AppData\Roaming.