class-file versions

A

Andreas Leitgeb

Where could I find some table, giving overview of which
version of javac produced which major/minor class-version?

e.g.: (checking all 'javac's available on a particular machine)
1.4.2_16 produces 46/0
1.5.0_09 produces 49/0
1.6.0_17 produces 50/0

Seemingly there were a few steps between 1.4.2_16 and 1.5.0_09
and I'd like to know which range of versions produced 47 and 48.
(without test-installing every old jdk that
(I don't need versions older than 46/0 for now.)

PS: I know these versions are old - even up to the 1.6 one used
here.
 
P

Paul Cager

Where could I find some table, giving overview of which
version of javac produced which major/minor class-version?

e.g.: (checking all 'javac's available on a particular machine)
  1.4.2_16  produces 46/0
  1.5.0_09  produces 49/0
  1.6.0_17  produces 50/0

Seemingly there were a few steps between 1.4.2_16 and 1.5.0_09
and I'd like to know which range of versions produced 47 and 48.
(without test-installing every old jdk that
(I don't need versions older than 46/0 for now.)

PS: I know these versions are old - even up to the 1.6 one used
    here.

I believe it is:

major minor JDK
46 0 1.2
47 0 1.3
48 0 1.4
49 0 1.5
50 0 1.6

But don't forget that the 1.4 compiler generated 1.2 compatible
classfiles by default (http://java.sun.com/j2se/1.4.2/docs/tooldocs/
windows/javac.html). Therefore your classfiles generated by 1.4 javac
have version 46 (1.2 format)
 
A

Andreas Leitgeb

Paul Cager said:
I believe it is:

major minor JDK
46 0 1.2
47 0 1.3
48 0 1.4
49 0 1.5
50 0 1.6

But don't forget that the 1.4 compiler generated 1.2 compatible
classfiles by default (http://java.sun.com/j2se/1.4.2/docs/tooldocs/
windows/javac.html). Therefore your classfiles generated by 1.4 javac
have version 46 (1.2 format)

Ah, thanks a lot! That was the crucial detail that I had forgotten...
It all makes sense now.
 
R

Roedy Green

version of javac produced which major/minor class-version?

e.g.: (checking all 'javac's available on a particular machine)
1.4.2_16 produces 46/0
1.5.0_09 produces 49/0
1.6.0_17 produces 50/0

see http://mindprod.com/products1.html#JARCHECK
--
Roedy Green Canadian Mind Products
http://mindprod.com

There is no harm in being sometimes wrong especially if one is promptly found out.
~ John Maynard Keynes (born: 1883-06-05 died: 1946-04-21 at age: 62)
 
A

Arne Vajhøj

Where could I find some table, giving overview of which
version of javac produced which major/minor class-version?

e.g.: (checking all 'javac's available on a particular machine)
1.4.2_16 produces 46/0
1.5.0_09 produces 49/0
1.6.0_17 produces 50/0

Seemingly there were a few steps between 1.4.2_16 and 1.5.0_09
and I'd like to know which range of versions produced 47 and 48.
(without test-installing every old jdk that
(I don't need versions older than 46/0 for now.)

http://en.wikipedia.org/wiki/Class_file has a list.

incl. a link to
http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#75883
so the info is available.

As already noted by others then the 1.4.2 number you got
must be due to -target.

Arne
 
R

Roedy Green

Fine answer for an entirely different problem than mine ;)
Mine was already solved, anyway, so it's all ok.

in the Jarcheck docs is a list of the various class versions and the
corresponding JDK version.
--
Roedy Green Canadian Mind Products
http://mindprod.com

There is no harm in being sometimes wrong especially if one is promptly found out.
~ John Maynard Keynes (born: 1883-06-05 died: 1946-04-21 at age: 62)
 
A

Andreas Leitgeb

Roedy Green said:
On 18 Jun 2010 09:19:02 GMT, Andreas Leitgeb wrote, quoted ...
in the Jarcheck docs is a list of the various class versions and the
corresponding JDK version.

Ah, ok. Sorry for my premature judgement.
If my question hadn't been answered already, I'd surely have
looked deeper into it, and then found it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top