javac under BASH

Currently my installation script is messy because I

discriminate between a DOS system or a UNIX system. This is

necessary, because java seems to be unable to use the file naming

conventions and separator characters of the calling command

interpreter (csh or cygwin-bash).

I guess that it is currently not possible to force java that the path

separator is a ":"?

Or did I miss something?

[436 byte] By [christo4711a] at [2007-9-25]
# 1

> This is

> ecessary, because java seems to be unable to use the

> file naming

> conventions and separator characters of the calling

> command

> interpreter (csh or cygwin-bash).

>

Java is quite capable of that, thank you very much.

If you're not capable of using it properly that's your shortcoming, not Java's.

> I guess that it is currently not possible to force

> java that the path

> separator is a ":"?

>

Sure it is.

> Or did I miss something?

Yes.

jwentinga at 2007-7-14 > top of java,Developer Tools,Java Compiler...
# 2

under BASH I currently use the return value of

expr $(name) : 'CYGW.*'

to decide whether I need to use the DOS convention or UNIX convention

namely

export CLASSPATH='.\directory\jarfile1.jar;.\directory\jarfile2.jar'

or

export CLASSPATH='./directory/jarfile1.jar:./directory/jarfile2.jar'

This works perfectly under the cygwin environment in Windows

but is a bit verbose.

We are using Bash or KSH and not Ant because It needs some special shell commands.

Bash or KSH are standard on virtually all OS.

If you know a more elegant way please tell us.

I have nothing found in the documentation of the sun JDK.

I thought that properties like separator characters are hard wired for

each JDK distribution but you are right, it would make sense to have

them configurable.

Thanks

christo4711a at 2007-7-14 > top of java,Developer Tools,Java Compiler...