Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > javac -source 1.6 -target 1.4

Reply
Thread Tools

javac -source 1.6 -target 1.4

 
 
Andreas Leitgeb
Guest
Posts: n/a
 
      03-15-2008
Kenneth P. Turvey <(E-Mail Removed)> wrote:
> On Fri, 14 Mar 2008 21:44:40 -0700, Andrew Thompson wrote:
> [Snip]
>> - Whatever the 1.6 compiler does that might be
>> better than earlier compilers (if anything),
>> will become redundant once the code is loaded
>> into a JRE.

>
> Maybe not. The compiler might make optimizations in generating the
> classfile that the JRE wouldn't know how to make.


From what I've gathered reading this group, the jre is supposed to
optimize at least as well, if not *much* better, than how the compiler
even possibly could. This is because the jre has more input: e.g.
it can place inline other classes' methods...

I felt happier back in the days, where I could "see" in the disassembled
code, what the optimizer really did, than now, where I see grossly
un-optimal bytecode, and have to hope/believe the jre doing it's job well,
with no way to look over it's shoulders (other than examining the
jre's source-code, of course). I could of course program a benchmark
that reflects my particular needs, and watch the timings, and most
likely see how the newer jre beats the old one but it just isn't the
same :-/

 
Reply With Quote
 
 
 
 
Kenneth P. Turvey
Guest
Posts: n/a
 
      03-15-2008
On Fri, 14 Mar 2008 23:51:09 -0700, Andrew Thompson wrote:


> What target version (for the applets) are you
> talking about? Why that version?


Just a few versions behind the latest to give the people on client
machines a bit more time to upgrade their Java installation. Not many are
running 1.6.

--
Kenneth P. Turvey <(E-Mail Removed)>
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      03-15-2008
On Mar 15, 10:05*pm, "Kenneth P. Turvey" <kt-
(E-Mail Removed)> wrote:
> On Fri, 14 Mar 2008 23:51:09 -0700, Andrew Thompson wrote:
> > What target version (for the applets) are you
> > talking about? *Why that version?

>
> Just a few versions behind the latest to give the people on client
> machines a bit more time to upgrade their Java installation. *Not many are
> running 1.6.


Oh. That was both a let down and a relief.

I was worried you were going to say something
silly like..
- "Need to code for 1.1 so it will work in
all browsers" (will never happen)
- "Need to support MSVM"
('are you *insane*?' the best thing we can do
for the end user with an MSVM is to warn them
their computer is insecure, then redirect them
to Sun)

OK. Just had to get that out of my system.

..Carry on.

--
Andrew T.
PhySci.org
 
Reply With Quote
 
Jack
Guest
Posts: n/a
 
      03-16-2008
Kenneth P. Turvey a écrit :
> On Sat, 15 Mar 2008 00:19:28 -0400, Lew wrote:
>
>> Kenneth P. Turvey wrote:
>>> Would somebody tell me what magic I need to do to get the Sun 1.6 compiler
>>> to target an earlier version of the class file?

>> <http://java.sun.com/javase/6/docs/technotes/tools/solaris/javac.html#crosscomp-example>
>>

>
> Ok, thanks. I got it to compile to a 1.5 class file and then to a 1.3
> class file. The only problem is that I still can't get it to compile to a
> 1.3 version of the class file without specifying a 1.3 source as well.
>
> What I really want is something like this:
>
> javac -source 1.5 -target 1.3 -bootclasspath /my/jre/lib/rt.jar Main.java


see retroweaver
 
Reply With Quote
 
Kenneth P. Turvey
Guest
Posts: n/a
 
      03-17-2008
On Sun, 16 Mar 2008 11:00:45 +0100, Jack wrote:

> Kenneth P. Turvey a écrit :
>> What I really want is something like this:
>>
>> javac -source 1.5 -target 1.3 -bootclasspath /my/jre/lib/rt.jar Main.java

>
> see retroweaver


It looks interesting. Have you used it? Does it work as advertised?

--
Kenneth P. Turvey <(E-Mail Removed)>
 
Reply With Quote
 
Jack
Guest
Posts: n/a
 
      03-17-2008
>> see retroweaver
>
> It looks interesting. Have you used it? Does it work as advertised?


no, i've never used it but it seams to be in production stage.

 
Reply With Quote
 
andypymont@googlemail.com
Guest
Posts: n/a
 
      03-20-2008
On 17 Mar, 03:31, "Kenneth P. Turvey" <(E-Mail Removed)>
wrote:
> > see retroweaver

>
> It looks interesting. *Have you used it? *Does it work as advertised? *


Not retroweaver, but I've used retrotranslator, a similar tool, to
convert a 1.6 .jar, using several 1.5+ features, to a 1.4 .jar, and it
does the job really nicely. I'd recommend it.

Of course, my .jar was an application, not an applet, so YMMV - but
it's certainly worth a try.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ant javac : How to print classpath? Ronald Fischer Java 1 09-19-2003 01:13 AM
Re: Problem with ant's javac task z3 Java 0 07-23-2003 06:39 PM
javac doesn't show decprecated API calls to me Richard Ivarson Java 1 07-14-2003 03:33 PM
Re: JDK 1.4.2 javac compiler bug with final local variables? Jon Skeet Java 5 07-04-2003 03:17 PM
Sun JDK 1.4.2 javac compiler bug xarax Java 1 07-02-2003 05:08 PM



Advertisments