Debian Developers - [OT] Java complaint Was: Re: Environment variables for Debian (e.g. JAVA_HOME, etc)

This is Interesting: Free IT Magazines  
Home > Archive > Debian Developers > September 2004 > [OT] Java complaint Was: Re: Environment variables for Debian (e.g. JAVA_HOME, etc)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [OT] Java complaint Was: Re: Environment variables for Debian (e.g. JAVA_HOME, etc)
Justin Pryzby

2004-09-03, 2:57 am

On Fri, Sep 03, 2004 at 04:10:09PM +1000, Matthew Palmer wrote:
> On Fri, Sep 03, 2004 at 07:40:27AM +0200, Sami Dalouche wrote:
>
> And people wonder why I don't like Java...

Can someone explain to me why "java foo.class" has to fail with an
obscure error? (You're not suppoed to specify .class) Jeez.

if (!strcmp(".class", x+strlen(x)-6)) {
if (fixit) x[strlen(x)-7]=0;
else if (prettyerror) printf("Don't specify .class");
else {
obscure();
}
}

Can we at least have kaffe and friends give a pretty message?

Justin

Colin Watson

2004-09-03, 7:50 am

On Fri, Sep 03, 2004 at 02:30:40AM -0400, Justin Pryzby wrote:
> On Fri, Sep 03, 2004 at 04:10:09PM +1000, Matthew Palmer wrote:
> Can someone explain to me why "java foo.class" has to fail with an
> obscure error? (You're not suppoed to specify .class) Jeez.


I think it's probably something to do with '.' being the namespace
separator, and you could in theory have wanted foo/class.class ... but I
agree that a special-case check would alleviate a lot of confusion.

(I suspect you'd want it only on the command line, not elsewhere classes
are loaded. I have no idea if that's conveniently doable.)

--
Colin Watson [cjwatson@debian.org]


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Florian Weimer

2004-09-03, 5:52 pm

* Colin Watson:

> On Fri, Sep 03, 2004 at 02:30:40AM -0400, Justin Pryzby wrote:
>
> I think it's probably something to do with '.' being the namespace
> separator, and you could in theory have wanted foo/class.class ... but I
> agree that a special-case check would alleviate a lot of confusion.


While SomeClass.class is indeed a valid expression, it refers to the
class object of an instance. But as far as I can tell,
SomeClass.class can never denote a class because "class" is a keyword.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Colin Watson

2004-09-04, 2:48 am

On Fri, Sep 03, 2004 at 11:17:14PM +0200, Florian Weimer wrote:
> * Colin Watson:
>
> While SomeClass.class is indeed a valid expression, it refers to the
> class object of an instance. But as far as I can tell,
> SomeClass.class can never denote a class because "class" is a keyword.


Good call. My Java is rusty (for which I am to some extent grateful).

--
Colin Watson [cjwatson@debian.org]


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com