I figured it out. This does work after all: CLASSPATH=.\;c\:\\dev\\xalan\\xalan-j_2_7_0\\samples\\xsltcservlet.jar\;c\:\ \dev\\xalan\\xalan-j_2_7_0\\samples\\xsltcejb.jar\;c\:\\dev\\xalan\\xalan-j_ 2_7_0\\samples\\xsltcbrazil.jar\;c\:\\dev\\xalan\\xalan-j_2_7_0\\samples\\xs ltcapplet.jar\;c\:\\dev\\xalan\\xalan-j_2_7_0\\samples\\xalansamples.jar\;c\ :\\dev\\xalan\\xalan-j_2_7_0\\serializer.jar\;c\:\\dev\\xalan\\xalan-j_2_7_0 \\xalan.jar\;c\:\\dev\\xalan\\xalan-j_2_7_0\\xercesImpl.jar\;c\:\\dev\\xalan \\xalan-j_2_7_0\\xml-apis.jar\;c\:\\dev\\xalan\\xalan-j_2_7_0\\xsltc.jar export CLASSPATH javac -g ApplyXPathDOM.java
One has to escape the colons and the semi colons. I don't understand why I have to escape the colons too -- but it works. Thanks for the example for the java/bash wrappers -- I think I understand now. Siegfried -----Original Message----- From: Igor Pechtchanski [mailto:[EMAIL PROTECTED] Sent: Monday, October 31, 2005 9:06 PM To: Siegfried Heintze Cc: cygwin@cygwin.com Subject: RE: Wanted: Help translating classpath from CMD.EXE to bash On Mon, 31 Oct 2005, Siegfried Heintze wrote: > Thanks Igor! > > > As someone mentioned, you can use "cygpath -p" to convert a POSIX-style > > path into a Win32-style one. > > I think I need to go the other way. Given a CLASSPATH variable in > windows, how do I convert it to cygwin? Do I use ":" to separate the > elements, or do I use "\;". If I use ":", what about the windows device > names? I should've been clearer, and said "you can use 'cygpath -p' to convert *between* a POSIX-style path and a Win32-style one". "cygpath -[u]p" (the "u" is optional) will convert from a Win32 path to a POSIX one, whereas "cygpath -wp" will convert from a POSIX path to a Win32 one. For more details, see "man cygpath", as Larry said. > It seems to me this should have worked, but it does not: > * CLASSPATH=.\;c:\\dev\\xalan\\xalan-j_2_7_0\\xsltcservlet.jar\;others > * export $CLASSPATH > * echo ${CLASSPATH} > * javac myprogram.java What exactly didn't work here? What were the errors? > > Alternatively, you can try using my java wrapper scripts that will do > > the translation automatically for you (the scripts can be found at > > <http://cygwin.com/cgi-bin/cvsweb.cgi/wrappers/java/?cvsroot=cygwin-apps>; > > you'll need to edit the scripts to point them to your Java > > installation directory). > > OK, is there any documentation? Nope. I haven't really had time to package them properly. I won't be able to write full-fledged documentation, but I'm willing to answer questions and accept documentation patches against the CVS repository above. Care to help out? > What kind of wrappers are these? They are wrappers around the "java", "javac", etc, executables. Just make sure they precede the real executables in the PATH. They will basically invoke the real ones, having translated the known path arguments to POSIX format. They will not translate all arguments -- if you pass filenames to your Java program, you're responsible for translating those. But they help (a lot, actually -- I use them constantly on my machine). > I have never heard of bash wrappers before. (hmmm... bash wrappers, > sounds like a new genre of music! -- maybe something like slam dancing?) They are wrapper programs written in bash. > How about an example? That would probably suffice. Sure. You can run /usr/local/bin/java -classpath /home/me/jars/a.jar:/home/me/classes SomeClass And it'll call the Windows Java executable with the right paths. > Well, even if I get Igor's bash wrappers to work, I'm kinda curious why > my attempt did not. You'll have to provide more details on what exactly didn't work in your attempt. HTH, Igor P.S. If you decide to try XJ after all, I'd be interested in your feedback off-list. -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ [EMAIL PROTECTED] ZZZzz /,`.-'`' -. ;-;;,_ [EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. /DA -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/