Home » Newcomers » Newcomers » jdk7 & jdk6 coexist on windows XP
|
Re: jdk7 & jdk6 coexist on windows XP [message #635102 is a reply to message #635057] |
Mon, 25 October 2010 16:00 |
|
On 2010.10.25 8:37, albertkao wrote:
> My windows XP computer has jdk 6. I like to install jdk7 so that both
> jdks coexist / work. Are there any caveats I should be aware of? How to
> use the latest Eclipse to choose which jdks to use?
>
> C:\>java -version java version "1.6.0_19" Java(TM) SE Runtime
> Environment (build 1.6.0_19-b04) Java HotSpot(TM) Client VM (build
> 16.2-b04, mixed mode, sharing)
Not really.
I personally prescribe downloading and using a private JDK with Eclipse
rather than installing it for use by the greater computer host. That
way, whatever is going on with my computer doesn't influence the
behavior of my Eclipse development (and vice-versa).
|
|
| |
Re: jdk7 & jdk6 coexist on windows XP [message #635148 is a reply to message #635124] |
Mon, 25 October 2010 17:50 |
|
On 2010.10.25 10:56, albertkao wrote:
> Russell Bateman wrote on Mon, 25 October 2010 12:00
>> On 2010.10.25 8:37, albertkao wrote:
>> > My windows XP computer has jdk 6. I like to install jdk7 so that both
>> > jdks coexist / work. Are there any caveats I should be aware of? How to
>> > use the latest Eclipse to choose which jdks to use?
>> >
>> > C:\>java -version java version "1.6.0_19" Java(TM) SE Runtime
>> > Environment (build 1.6.0_19-b04) Java HotSpot(TM) Client VM (build
>> > 16.2-b04, mixed mode, sharing)
>>
>> Not really.
>>
>> I personally prescribe downloading and using a private JDK with
>> Eclipse rather than installing it for use by the greater computer
>> host. That way, whatever is going on with my computer doesn't
>> influence the behavior of my Eclipse development (and vice-versa).
>
>
> What is the procedure to use a private JDK with Eclipse?
> I installed jdk7 and the environment becomes: C:\>java -version java
> version "1.7.0-ea" Java(TM) SE Runtime Environment (build 1.7.0-ea-b115)
> Java HotSpot(TM) Client VM (build 20.0-b02, mixed mode, sharing)
> Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem ;C:
> \Program Files\Windows Imaging\;C:\Program
> Files\TortoiseSVN\bin;C:\Sun\SDK\bin
>
> How to change the default jdk to 6 when using the command line?
> How to use the latest Eclipse to choose which jdks to use?
1) You don't want to worry about that (well, not exactly). Let Eclipse
do that for you for any specific project in your workspace. There is a
Preferences setting, Java -> Java Compiler that you can use to force
earlier Java compliance on a project. (Assuming that's what you're
talking about.)
2) I suggest you quickly peruse my article on setting up an Eclipse
toolstack:
http://www.javahotchocolate.com/tutorials/eclipse-summary.ht ml
|
|
|
Re: jdk7 & jdk6 coexist on windows XP [message #635180 is a reply to message #635148] |
Mon, 25 October 2010 21:25 |
albertkao Messages: 46 Registered: February 2010 |
Member |
|
|
Russell Bateman wrote on Mon, 25 October 2010 13:50 | On 2010.10.25 10:56, albertkao wrote:
> Russell Bateman wrote on Mon, 25 October 2010 12:00
>> On 2010.10.25 8:37, albertkao wrote:
>> > My windows XP computer has jdk 6. I like to install jdk7 so that both
>> > jdks coexist / work. Are there any caveats I should be aware of? How to
>> > use the latest Eclipse to choose which jdks to use?
>> >
>> > C:\>java -version java version "1.6.0_19" Java(TM) SE Runtime
>> > Environment (build 1.6.0_19-b04) Java HotSpot(TM) Client VM (build
>> > 16.2-b04, mixed mode, sharing)
>>
>> Not really.
>>
>> I personally prescribe downloading and using a private JDK with
>> Eclipse rather than installing it for use by the greater computer
>> host. That way, whatever is going on with my computer doesn't
>> influence the behavior of my Eclipse development (and vice-versa).
>
>
> What is the procedure to use a private JDK with Eclipse?
> I installed jdk7 and the environment becomes: C:\>java -version java
> version "1.7.0-ea" Java(TM) SE Runtime Environment (build 1.7.0-ea-b115)
> Java HotSpot(TM) Client VM (build 20.0-b02, mixed mode, sharing)
> Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem ;C:
> \Program Files\Windows Imaging\;C:\Program
> Files\TortoiseSVN\bin;C:\Sun\SDK\bin
>
> How to change the default jdk to 6 when using the command line?
> How to use the latest Eclipse to choose which jdks to use?
1) You don't want to worry about that (well, not exactly). Let Eclipse
do that for you for any specific project in your workspace. There is a
Preferences setting, Java -> Java Compiler that you can use to force
earlier Java compliance on a project. (Assuming that's what you're
talking about.)
2) I suggest you quickly peruse my article on setting up an Eclipse
toolstack:
http://www.javahotchocolate.com/tutorials/eclipse-summary.ht ml
|
I installed jdk7 at C:\Program Files\Java\jdk1.7.0\bin\javaw.exe.
After reading your article, I modified eclipse.ini.
Then restarted eclipse.
In the Preferences setting, Java -> Java Compiler, Java compliance is from 1.3 to 1.6 - no 1.7.
The test java program use 1.7 feature
import java.nio.file.*;
which cannot be resolved.
eclipse.ini is as follows:
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715. jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200 .v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
C:\Program Files\Java\jdk1.7.0\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
|
|
|
Re: jdk7 & jdk6 coexist on windows XP [message #635201 is a reply to message #635180] |
Mon, 25 October 2010 23:55 |
|
On 2010.10.25 15:25, albertkao wrote:
> [snip]
>
> I installed jdk7 at C:\Program Files\Java\jdk1.7.0\bin\javaw.exe.
> After reading your article, I modified eclipse.ini.
> Then restarted eclipse.
> In the Preferences setting, Java -> Java Compiler, Java compliance is
> from 1.3 to 1.6 - no 1.7.
> The test java program use 1.7 feature
> import java.nio.file.*;
> which cannot be resolved.
>
> [snip]
Unless there's something Java 7-specific, I shouldn't think you'd need
to worry about this. Just use 1.6. I haven't tried 1.7; it may be that
Eclipse doesn't react to it yet.
If you gain a different perspective on this, I'm sure many would be
interested in hearing. Not a lot of us have worried about Java 7 yet.
|
|
| |
Goto Forum:
Current Time: Tue Sep 24 16:42:53 GMT 2024
Powered by FUDForum. Page generated in 0.09667 seconds
|