Re: Target VM Microsoft? or Java Lint to check for MS VM compatibility?
From: Vincent Cate (vince_at_offshore.ai)
Date: 12/22/03
- Next message: Chris Smith: "Re: Target VM Microsoft? or Java Lint to check for MS VM compatibility?"
- Previous message: Tushar: "Java consulting opportunity"
- In reply to: Chris Smith: "Re: Target VM Microsoft? or Java Lint to check for MS VM compatibility?"
- Next in thread: Chris Smith: "Re: Target VM Microsoft? or Java Lint to check for MS VM compatibility?"
- Reply: Chris Smith: "Re: Target VM Microsoft? or Java Lint to check for MS VM compatibility?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 22 Dec 2003 08:34:55 -0800
Chris Smith <cdsmith@twu.net> wrote in message news:<MPG.1a4e468b2f2c8f0f989850@news.pop4.net>...
> Vincent Cate wrote:
> > I just installed j2sdk1.4.2_03 from Sun on a Linux machine and even
> > here when I compile with "-target 1.1", I can have Vector.add()
> > and it compiles fine (as does under JBuilder).
>
> The "-target" flag doesn't do what you think it does. What you actually
> need to do is download a 1.1 version of Java, and compile with that.
You are right. I did that and it does complain about Vector.add() in
that case. So now I can tell what I should not use for 1.1 JVM
compatibility. Thanks!
In my defense, I quote from the man page for Sun's 1.4 javac:
> -target version
> Generates class files that will work on VMs with the specified version.
> [...] The versions supported are:
>
> 1.1 Ensures that generated class files will be compatible
> with 1.1 and 1.2 VMs.
> [...]
What the man page says "-target" does is not what it really does. The
"will work", "Ensures", and "will be compatible" all don't mean what
they seem to mean.
So now I will compile on 1.4 to make sure I am ok with current Java
(not using anything "deprecated") and then on 1.1 to make sure my code
does not use anything that 1.1 does not have. Not exactly compile
once run anywhere.
Is this what other people do?
-- Vince
- Next message: Chris Smith: "Re: Target VM Microsoft? or Java Lint to check for MS VM compatibility?"
- Previous message: Tushar: "Java consulting opportunity"
- In reply to: Chris Smith: "Re: Target VM Microsoft? or Java Lint to check for MS VM compatibility?"
- Next in thread: Chris Smith: "Re: Target VM Microsoft? or Java Lint to check for MS VM compatibility?"
- Reply: Chris Smith: "Re: Target VM Microsoft? or Java Lint to check for MS VM compatibility?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|