public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: bash, javac and that pesky slash.
@ 2000-01-24 18:17 Eric Feliu
  2000-01-25  9:20 ` Jeff Sturm
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Feliu @ 2000-01-24 18:17 UTC (permalink / raw)
  To: 'Craig MacFarlane', cygwin

I use java and cygwin all the time, the thing you need to remember is that java for the
windows environment was not written to use unix command line syntax. Your compile line 
should be :

	  bash-2.02% javac -d "d:\destdir\classes" foo.java

Like Chris Faylor stated this is really a limitation of the javac compiler and not Cygwin.

Eric

	

-----Original Message-----
From:	Craig MacFarlane [SMTP:craigm@chemconnect.com]
Sent:	Monday, January 24, 2000 12:32 PM
To:	cygwin@sourceware.cygnus.com
Subject:	bash, javac and that pesky slash.


Sun's javac, in jdk1.2.1, seems to change the
forward slashes used by bash to backward slashes
used by windows.

e.g.

  bash-2.02% javac -d //d/destdir/classes foo.java

produces the error message

  The \\d\destdir\classes directory does not exist.

Is there any way to use javac with bash
while specifying destination dirs for your classes?
It appears as though javac is trying to be too smart
by substituting slashes.

Thanks,
Craig

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: bash, javac and that pesky slash.
@ 2000-01-24 16:05 Paul Johnston
  0 siblings, 0 replies; 13+ messages in thread
From: Paul Johnston @ 2000-01-24 16:05 UTC (permalink / raw)
  To: cygwin

Strange, I'm using cygwin with jdk1.2.2/1.2.1/1.1.8 and have been happily
backslash-free on my NT box.  Javac understands normal unix-style path
separators for me...

$ javac -d /home/me/lib/java Foo.java Bar.java

why the 2 leading solidii in your -d example?

Paul

-----Original Message-----
From: Craig MacFarlane <craigm@chemconnect.com>
To: cygwin@sourceware.cygnus.com <cygwin@sourceware.cygnus.com>
Date: Monday, January 24, 2000 9:32 AM
Subject: bash, javac and that pesky slash.


>
>Sun's javac, in jdk1.2.1, seems to change the
>forward slashes used by bash to backward slashes
>used by windows.
>
>e.g.
>
>  bash-2.02% javac -d //d/destdir/classes foo.java
>
>produces the error message
>
>  The \\d\destdir\classes directory does not exist.
>
>Is there any way to use javac with bash
>while specifying destination dirs for your classes?
>It appears as though javac is trying to be too smart
>by substituting slashes.
>
>Thanks,
>Craig
>
>--
>Want to unsubscribe from this list?
>Send a message to cygwin-unsubscribe@sourceware.cygnus.com
>
>


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 13+ messages in thread
* RE: bash, javac and that pesky slash.
@ 2000-01-24 12:40 Halim, Salman
  0 siblings, 0 replies; 13+ messages in thread
From: Halim, Salman @ 2000-01-24 12:40 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2491 bytes --]

java contains a File object which contains two static fields, one for path
separator and one for a directory separator.  on windows, they end up being
; and \. . .

perhaps this has something to do with the issue at hand?  (probably not; the
classpath is set and used elsewhere)  however, it would make sense for a
native application to be designed to work off the native settings.  cygwin's
settings aren't native to the windows environment :)

--
   =========================================================
   Salman Halim                 Technical Support           
                                                            
   Bluestone Software           Phone:  (856) 727-4600      
   1000 Briggs Rd.                                          
   Mt. Laurel, NJ 08054         Email:  salman@bluestone.com
   =========================================================
   Would you  care for a drink?   I mean, if it  were, like,
   disabled and you had to look after it?


> -----Original Message-----
> From: Andre Oliveira da Costa [ mailto:costa@cade.com.br ]
> Sent: Monday, January 24, 2000 2:53 PM
> To: cygwin@sourceware.cygnus.com
> Subject: RE: bash, javac and that pesky slash.
> 
> 
> > -----Original Message-----
> > From: cygwin-owner@sourceware.cygnus.com
> > [ mailto:cygwin-owner@sourceware.cygnus.com]On Behalf Of 
> David Robinow
> > Sent: Monday, January 24, 2000 5:03 PM
> > To: cygwin@sourceware.cygnus.com
> > Subject: RE: bash, javac and that pesky slash.
> [...]
> >  The "Therefore," above is incorrect.  There are
> > plenty of non-cygwin apps that recognize '/' as a path
> > seperator.
> 
> True. That was a (too) strong assumption. Thanks for pointing 
> that out.
> 
> [...]
> > > CLASSPATH environment variable
> > > must use M$-path-style also, because it is meant to
> > > be interpreted by jdk tools.
> >  Could be, I know nothing at all about java/jdk.
> 
> Believe me, it is: I recently installed jdk-1.2.2 on my NT4 
> machine, and
> Java tools refused to work from my bash prompt because I had CLASSPATH
> defined on my .bashrc with UNIX-like pathnames separated by 
> ":". When I
> changed it to M$-style paths and ";" among pathnames, it all worked.
> 
> Regards,
> 
> Andre
> --
> André Oliveira da Costa
> (costa@cade.com.br)
> 
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 13+ messages in thread
* RE: bash, javac and that pesky slash.
@ 2000-01-24 11:03 David Robinow
  2000-01-24 11:53 ` Andre Oliveira da Costa
  0 siblings, 1 reply; 13+ messages in thread
From: David Robinow @ 2000-01-24 11:03 UTC (permalink / raw)
  To: cygwin

--- Andre Oliveira da Costa <costa@cade.com.br> wrote:
> That's true. jdk is a Windows native application, it
> wasn't compiled with
> cygwin. Therefore, it doesn't understand the '/'
> used by UNIX (cygwin); you
> must use the M$ '\'.
 The "Therefore," above is incorrect.  There are
plenty of non-cygwin apps that recognize '/' as a path
seperator.
>       Also, drives must be referenced
> by their "names" (e.g.
> "D:" in your case, and not "//d"). Other: the
 This part is true.
> CLASSPATH environment variable
> must use M$-path-style also, because it is meant to
> be interpreted by jdk tools.
 Could be, I know nothing at all about java/jdk.


__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 13+ messages in thread
* bash, javac and that pesky slash.
@ 2000-01-24  9:32 Craig MacFarlane
  2000-01-24  9:39 ` Randall R Schulz
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Craig MacFarlane @ 2000-01-24  9:32 UTC (permalink / raw)
  To: cygwin

Sun's javac, in jdk1.2.1, seems to change the
forward slashes used by bash to backward slashes
used by windows.

e.g.

  bash-2.02% javac -d //d/destdir/classes foo.java

produces the error message

  The \\d\destdir\classes directory does not exist.

Is there any way to use javac with bash
while specifying destination dirs for your classes?
It appears as though javac is trying to be too smart
by substituting slashes.

Thanks,
Craig

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2000-01-25  9:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-24 18:17 bash, javac and that pesky slash Eric Feliu
2000-01-25  9:20 ` Jeff Sturm
  -- strict thread matches above, loose matches on Subject: below --
2000-01-24 16:05 Paul Johnston
2000-01-24 12:40 Halim, Salman
2000-01-24 11:03 David Robinow
2000-01-24 11:53 ` Andre Oliveira da Costa
2000-01-24  9:32 Craig MacFarlane
2000-01-24  9:39 ` Randall R Schulz
2000-01-24  9:41   ` Chris Faylor
2000-01-24  9:55     ` Randall R Schulz
2000-01-24  9:49   ` Andre Oliveira da Costa
2000-01-24  9:41 ` Chris Faylor
2000-01-24 11:36 ` Kazuhiro Fujieda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).