• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to use wild card in CLASSPATH in cygwin bash to compile and run  RSS feed

 
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This bash script running on windows used to work with the wild card feature.

I've tried it on Java 1.6.0_24 java 1.7.0 and it no longer works. Does the wildcard feature still work?
Incidentally, the code tag feature seems to inserting an extra ">" in the code listing below.

Thanks,
Siegfried
 
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that in Cygwin you'll have to use Unix-style path and pathelement separators.

So, use / instead of \ and : (colon) instead of ; (semi-colon) in your CLASSPATH.
 
Siegfried Heintze
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand your logic. Why would a windows program like javac and java expect unix style separators?
Apparently my problem was that I forgot the export statement?

I love bash but I have to admit that escaping all these path names using VI or emacs can get challenging.

The first three work. The last assignment to CLASSPATH does not work. I'm not surprised.



Now why does this work? why does not bash expand the *?
Putting a third backslash before the asterisk also works, but apparently is not required. Why?


 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Siegfried Heintze wrote:I don't understand your logic. Why would a windows program like javac and java expect unix style separators?

Because Cygwin is a Unix-like environment for Windows, and I would expect that many of the Unix programs you run in there expect Unix-style separators. But apparently that isn't so.
 
Sheriff
Posts: 21137
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you start using / instead of \ on line 4?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!