For Programmers: Free Programming Magazines  


Home > Archive > Java Help > August 2006 > Re: Using older java version than required - is it possible?









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 Re: Using older java version than required - is it possible?
TrevorBoydSmith@gmail.com

2006-08-21, 8:01 am

First try:
Downloading on your host machine the sdk kit for 1.4.06. Then set your
compiler to this newly installed version. This would involved
checking/changing your classpath (environment variable).

This is the best way and will work 100%. This will ensure you match
the correct compiler to the correct JRE Virtual Machine.



Second:
If you only are able to compile with the 1.4.07 then try this compiler
flag: -source 1.4 . Or try 1.3 even (but 1.3 misses a lot of 1.4).
The -source compiler flag tells that compiler how to compile. So you
can tell it to compile for a previous version.

ge0rge

2006-08-21, 7:03 pm

TrevorBoydSmith@gmail.com wrote:
> First try:
> Downloading on your host machine the sdk kit for 1.4.06. Then set your
> compiler to this newly installed version. This would involved
> checking/changing your classpath (environment variable).
>
> This is the best way and will work 100%. This will ensure you match
> the correct compiler to the correct JRE Virtual Machine.


The OP did say 'The problem is that on client pc there is only java version
1.4.2_06 and it is not possible to install the newer one.'


> Second:
> If you only are able to compile with the 1.4.07 then try this compiler
> flag: -source 1.4 . Or try 1.3 even (but 1.3 misses a lot of 1.4).
> The -source compiler flag tells that compiler how to compile. So you
> can tell it to compile for a previous version.


The OP does not say that he is trying to compile any program ... only trying to
run it (this is the normal case where the end user is only given the classes to
run the program and not the source).

That said - the OP should persuade the owner to install JRE 1.4.2_07 or newer
(and keep the old one if she must). This is not an onerous request IMO. It is a
technical requirement of the said program.
Use the 1.4.2_07 JVM (or whatever) for the particular program which requires
that later version. This resolves the immediate problem. (I think it is a bad
idea to try make _06 pretend it is an _07 version by messing around with the
registry as has been suggested. It is a sure way to create future problems).
Test all the other programs with the later JRE (and I bet that if they work
with _06, they will work with _07) and then dispose of the _06 version.

--
You learn to write as if to someone else because NEXT YEAR YOU WILL BE
"SOMEONE ELSE."
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com