Arrgh... more path issues?

Kelly O'Hair Kelly.Ohair at Sun.COM
Tue Apr 7 21:14:11 UTC 2009


Sorry on the slow replies, my mail box is overflowing...  comments below...

Ted Neward wrote:
> Let me guess: this is because the jar utility doesn’t like Cygwin paths…?
> 

Exactly. Nothing using Java will understand CYGWIN paths. That includes
java, javah, javac, and ant.
That last one 'ant' is important. Any path seen my 'ant' will need to
be one that java can understand.

I tend to favor the C:/ style paths over C:\. You can translate any
path to that style with 'cygpath -m'.

The catch-22 is that some GNU make's don't like any of the C: or
drive letter paths when used as the target name in a makefile rule.
So you get a path to insanity :^(
   * GNU make doesn't like C: paths in some situations
     (unless you get the right make.exe, which is what I recommend)
   * Shell scripts don't like C:\ paths
   * Ant and Java only like C: paths
   * Windows exe's only like C: paths
   * Some Windows exe's only like C:\ paths (like NMAKE.EXE)

-kto

>  
> 
> (cd  C:/Prg/jdk1.7.0/build-fastdebug/classes && C:/Prg/jdk1.6.0/bin/jar 
> xf /cygd
> 
> rive/c/Prg/OpenJDK/openjdk-binary-plugs/jre/lib/rt-closed.jar 
> @C:/Prg/jdk1.7.0/b
> 
> uild-fastdebug/tmp/java/plugs/jmf.clist -J-client -J-Xmx383m -J-Xms128m 
> -J-XX:Pe
> 
> rmSize=32m -J-XX:MaxPermSize=160m )
> 
> java.io.FileNotFoundException: 
> \cygdrive\c\Prg\OpenJDK\openjdk-binary-plugs\jre\
> 
> lib\rt-closed.jar (The system cannot find the path specified)
> 
>         at java.io.FileInputStream.open(Native Method)
> 
>         at java.io.FileInputStream.<init>(FileInputStream.java:106)
> 
>         at java.io.FileInputStream.<init>(FileInputStream.java:66)
> 
>         at sun.tools.jar.Main.run(Main.java:205)
> 
>         at sun.tools.jar.Main.main(Main.java:1022)
> 
> make[5]: *** [import-binary-plug-jmf-classes] Error 1
> 
> make[5]: Leaving directory 
> `/cygdrive/c/Prg/OpenJDK/openjdk/jdk/make/java/redist
> 
> '
> 
> make[4]: *** [all] Error 1
> 
>  
> 
>  
> 
> I would suggest, as an RFE or bug, that the various macros used on 
> Windows have some kind of naming convention to them to indicate where a 
> Cygwin path is needed, where an MS-style path is needed, and where it 
> makes no difference. (But I have no offhand suggestions as to what that 
> naming convention would look like, or how it might interact with the 
> build macros for other platforms.) There’s just GOT to be some kind of 
> way to tell these apart, though. :-/
> 
>  
> 
> Ted Neward | Principal Consultant, ThoughtWorks
> 
> Java, .NET, XML Services
> 
> Consulting, Teaching, Speaking, Writing
> 
> http://www.thoughtworks.com <http://www.tedneward.com> | 
> http://www.tedneward.com
> 
>  
> 
>  
> 



More information about the build-dev mailing list