Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » jdk7 & jdk6 coexist on windows XP
jdk7 & jdk6 coexist on windows XP [message #635057] Mon, 25 October 2010 10:37 Go to next message
albertkao is currently offline albertkao
Messages: 46
Registered: February 2010
Member
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)
Re: jdk7 & jdk6 coexist on windows XP [message #635102 is a reply to message #635057] Mon, 25 October 2010 12:00 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3146
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

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 #635124 is a reply to message #635102] Mon, 25 October 2010 12:56 Go to previous messageGo to next message
albertkao is currently offline albertkao
Messages: 46
Registered: February 2010
Member
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?
Re: jdk7 & jdk6 coexist on windows XP [message #635148 is a reply to message #635124] Mon, 25 October 2010 13:50 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3146
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

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 17:25 Go to previous messageGo to next message
albertkao is currently offline 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 19:55 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3146
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

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.
Re: jdk7 & jdk6 coexist on windows XP [message #635379 is a reply to message #635180] Tue, 26 October 2010 11:29 Go to previous message
Eric Rizzo is currently offline Eric Rizzo
Messages: 2227
Registered: July 2009
Senior Member
On 10/25/10 5:25 PM, albertkao wrote:
> 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 3.6 (Helios) does not support Java 7; Java 7 is still
alpha/beta, so if you're trying to use new language features from it,
you're out of luck with the latest release of Eclipse.
There might be some Java 7 support in the milestone builds of Eclipse
3.7 (Indigo). Java 7 support is in the project plan for 3.7, but I don't
know the current state of the implementation. Best to ask on the JDT
forum group.

Hope this helps,
Eric
Previous Topic:default editor color settings
Next Topic:android market
Goto Forum:
  


Current Time: Wed Aug 20 03:05:18 EDT 2014

Powered by FUDForum. Page generated in 0.01828 seconds