how to share a project Windows<->Mac? [message #258296] |
Mon, 26 January 2009 21:30  |
Eclipse User |
|
|
|
Originally posted by: dsb.not.here
I have what I'd think is a fairly common situation: an Eclipse Java
project maintained under source control and worked on by a team, with
some team members using Windows and the rest Macs. Unfortunately this
leads to a problem, despite the general cross-platform nature of both
Java and Eclipse.
When the project is created on Windows its .classpath file has the
following line:
<classpathentry kind="con"
path=" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.inte rnal.debug.ui.launcher.StandardVMType/jre5 "/>
whereas when the logically identical project is made on MacOS X it says:
<classpathentry kind="con"
path=" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.inte rnal.launching.macosx.MacOSXType/JVM
1.5.0 MacOS X Default"/>
Notice the literal references to MacOS. There's a similar one in the
..settings/org.eclipse.jst.common.project.facet.core.prefs file, e.g.:
classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\: org.eclipse.jdt.internal.launching.macosx.MacOSXType\:\:JVM\
1.5.0\ MacOS X Default/owners=jst.java\:5.0
In all other respects the projects are identical whether created on
Windows or Mac, but this one difference essentially makes it impossible
to maintain the .classpath file under source control and still develop
on both platforms.
I've tried creating an alias JRE definition with the same name on both
platforms and hand-tweaking .classpath to refer to it, but nothing so
far has resulted in a project which builds on both platforms. Has
anybody solved this?
Thanks,
DSB
PS Eclipse Ganymede for Java EE and trying to stick with Java 5 for now.
|
|
|
Re: how to share a project Windows<->Mac? [message #258299 is a reply to message #258296] |
Tue, 27 January 2009 01:27   |
Eclipse User |
|
|
|
"David Boyce" <dsb@not.here> wrote in message
news:gllrjl$mcs$1@build.eclipse.org...
>I have what I'd think is a fairly common situation: an Eclipse Java project
>maintained under source control and worked on by a team, with some team
>members using Windows and the rest Macs. Unfortunately this leads to a
>problem, despite the general cross-platform nature of both Java and
>Eclipse.
>
> When the project is created on Windows its .classpath file has the
> following line:
>
> <classpathentry kind="con"
> path=" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.inte rnal.debug.ui.launcher.StandardVMType/jre5 "/>
>
> whereas when the logically identical project is made on MacOS X it says:
>
> <classpathentry kind="con"
> path=" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.inte rnal.launching.macosx.MacOSXType/JVM
> 1.5.0 MacOS X Default"/>
I think something funky is going on on your Macs.
First data point: I just tried creating a plain Java project and a plug-in
project on Eclipse 3.4.1 on my Mac. In both cases, the .classpath was the
same as on Windows: for the plain Java project,
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
and for the plug-in project,
<classpathentry kind="con"
path=" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.inte rnal.debug.ui.launcher.StandardVMType/J2SE-1.5 "/>
Second data point: looking at Eclipse SDK plug-in projects from the Eclipse
CVS repository, they are all "Windows style" but I know that there are
plenty of Mac developers also working on Eclipse Project plugins.
Third data point: my team at my non-Eclipse day job also has both Mac and
Windows, and I don't think we've ever run into this kind of problem. That
said, for the most part we don't check the Eclipse artifacts into the
repository, rather we've got a tool that builds the Eclipse artifacts for
each person individually, but I'm pretty sure we have some projects shared.
So, I'm not sure what's going on on the Macs, but that's where to look.
Does the Windows-style entry work on the Mac?
|
|
|
Re: how to share a project Windows<->Mac? [message #258324 is a reply to message #258296] |
Tue, 27 January 2009 10:04   |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
On 1/26/2009 9:30 PM, David Boyce wrote:
> I have what I'd think is a fairly common situation: an Eclipse Java
> project maintained under source control and worked on by a team, with
> some team members using Windows and the rest Macs. Unfortunately this
> leads to a problem, despite the general cross-platform nature of both
> Java and Eclipse.
When creating or configuring the projects, make sure to use an Execution
Environment (EE) instead of selecting a JRE - this is exactly why EEs
were introduced, to avoid this kind of situation.
Hope this helps,
Eric
>
> When the project is created on Windows its .classpath file has the
> following line:
>
> <classpathentry kind="con"
> path=" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.inte rnal.debug.ui.launcher.StandardVMType/jre5 "/>
>
>
> whereas when the logically identical project is made on MacOS X it says:
>
> <classpathentry kind="con"
> path=" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.inte rnal.launching.macosx.MacOSXType/JVM
> 1.5.0 MacOS X Default"/>
>
> Notice the literal references to MacOS. There's a similar one in the
> .settings/org.eclipse.jst.common.project.facet.core.prefs file, e.g.:
>
> classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\: org.eclipse.jdt.internal.launching.macosx.MacOSXType\:\:JVM\
> 1.5.0\ MacOS X Default/owners=jst.java\:5.0
>
> In all other respects the projects are identical whether created on
> Windows or Mac, but this one difference essentially makes it impossible
> to maintain the .classpath file under source control and still develop
> on both platforms.
>
> I've tried creating an alias JRE definition with the same name on both
> platforms and hand-tweaking .classpath to refer to it, but nothing so
> far has resulted in a project which builds on both platforms. Has
> anybody solved this?
>
> Thanks,
> DSB
>
> PS Eclipse Ganymede for Java EE and trying to stick with Java 5 for now.
|
|
|
|
|
Re: how to share a project Windows<->Mac? [message #258347 is a reply to message #258324] |
Tue, 27 January 2009 18:31   |
Eclipse User |
|
|
|
Originally posted by: dsb.not.here
Eric Rizzo wrote:
> On 1/26/2009 9:30 PM, David Boyce wrote:
>> I have what I'd think is a fairly common situation: an Eclipse Java
>> project maintained under source control and worked on by a team, with
>> some team members using Windows and the rest Macs. Unfortunately this
>> leads to a problem, despite the general cross-platform nature of both
>> Java and Eclipse.
>
> When creating or configuring the projects, make sure to use an Execution
> Environment (EE) instead of selecting a JRE - this is exactly why EEs
> were introduced, to avoid this kind of situation.
This seems to have done the trick. There are a couple of minor glitches
- first, I can't seem to make an EE the default but rather have to
create a project and then fix the classpath to use the EE. Second, I get
a persistent warning on Windows to the effect that the execution
environment doesn't "precisely" match any known JRE[*]. But despite the
warning, the same project now works on both Windows and Mac, so thanks!
-DSB
[*] Come to think of it, this may be because the Windows machine on
which I tested has only Java 6 installed. Eclipse was happy to suggest
it for the "J2SE-5" EE so I figured it would be used in backward
compatibility mode, but I should try installing and using an actual Java
5 JRE before jumping to any conclusions.
|
|
|
Re: how to share a project Windows<->Mac? [message #258355 is a reply to message #258347] |
Wed, 28 January 2009 04:35  |
Eclipse User |
|
|
|
Originally posted by: mauro.molinari.cardinis.com
David Boyce ha scritto:
> [*] Come to think of it, this may be because the Windows machine on
> which I tested has only Java 6 installed. Eclipse was happy to suggest
> it for the "J2SE-5" EE so I figured it would be used in backward
> compatibility mode, but I should try installing and using an actual Java
> 5 JRE before jumping to any conclusions.
Yes, you should install a JRE 5. Although the JRE 6 is
"retro-compatible", the libraries (API) are different. This is the
reason of the "not perfect match" warning.
Mauro.
|
|
|
Powered by
FUDForum. Page generated in 0.04263 seconds