Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » I knew it was a bug (serialVersionUID)
I knew it was a bug (serialVersionUID) [message #39576] Tue, 20 May 2003 08:25 Go to next message
Eclipse UserFriend
Originally posted by: hans.schwaebli.schwaebli.de

I wrote that the classes compiled by Ant have a different serialVersionUID
than the classes compiled by Eclipse itself. But it was difficult to prove
it.

Now we know that it is a bug of Eclipse 2.1.

Ant of Eclipse 2.1 uses the Java compiler provided by the system variable
JAVA_HOME. Ant doesn't use the SDK chosen in the Eclipse Preferences!

The one who spotted the bug said he has posted a bug report to Eclipse.

So I hope it will be corrected in version 2.1.1.
Re: I knew it was a bug (serialVersionUID) [message #39826 is a reply to message #39576] Tue, 20 May 2003 09:49 Go to previous messageGo to next message
Eclipse UserFriend
Ant within Eclipse does NOT use the Java compiler provided by JAVA_HOME. It
does NOT use the SDK chosen in the Eclipse preferences. Ant is executed
within the same VM that Eclipse is run within.

Ant looks for the compiler using the build.compiler property and defaults to
the compiler found in the tools.jar on the Ant runtime classpath.

In the 3.0 stream, it is possible to more easily launch Ant in a separate
VM. See bug 24129.

HTH
Darins

"Hans Schw
Re: I knew it was a bug (serialVersionUID) [message #40541 is a reply to message #39826] Tue, 20 May 2003 12:18 Go to previous messageGo to next message
Eclipse UserFriend
And even if ANT uses the SDK choosen in the preferences
than it still has that same problem because then the same
compiler will still not be used...

To get ANT generating the same serial (same classes) ANT should
use the build in compiler of eclipse. And i don't think this is possible
right now..

johan



"Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message news:badbm6$9qi$1@rogue.oti.com...
> Ant within Eclipse does NOT use the Java compiler provided by JAVA_HOME. It
> does NOT use the SDK chosen in the Eclipse preferences. Ant is executed
> within the same VM that Eclipse is run within.
>
> Ant looks for the compiler using the build.compiler property and defaults to
> the compiler found in the tools.jar on the Ant runtime classpath.
>
> In the 3.0 stream, it is possible to more easily launch Ant in a separate
> VM. See bug 24129.
>
> HTH
> Darins
>
> "Hans Schw
Re: I knew it was a bug (serialVersionUID) [message #40695 is a reply to message #40541] Tue, 20 May 2003 13:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Olivier_Thomann.ca.ibm.comNOSPAM

On Tue, 20 May 2003 18:18:21 +0200, "Johan Compagner"
<jcompagner@j-com.nl> wrote:
>To get ANT generating the same serial (same classes) ANT should
>use the build in compiler of eclipse. And i don't think this is possible
>right now..
This is possible if you use the ant javac adapter provided by
JDT/Core. This adapter is a wrapper of the Eclipse compiler. It allows
the Eclipse compiler to be used inside an ant script.
--
Olivier
Re: I knew it was a bug (serialVersionUID) [message #40792 is a reply to message #40695] Tue, 20 May 2003 15:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hans.schwaebli.schwaebli.com

If you mean the Ant parameter
"-Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter": This didn't
remove the serialVersionUID problem!

The solution was to change the JAVA_HOME environment variable in Windows.


"Olivier Thomann" <Olivier_Thomann@ca.ibm.comNOSPAM> wrote in message
news:jhpkcv8pk385iu59nl0kki5tn61fvd1okc@4ax.com...
> On Tue, 20 May 2003 18:18:21 +0200, "Johan Compagner"
> <jcompagner@j-com.nl> wrote:
> >To get ANT generating the same serial (same classes) ANT should
> >use the build in compiler of eclipse. And i don't think this is possible
> >right now..
> This is possible if you use the ant javac adapter provided by
> JDT/Core. This adapter is a wrapper of the Eclipse compiler. It allows
> the Eclipse compiler to be used inside an ant script.
> --
> Olivier
Re: I knew it was a bug (serialVersionUID) [message #41882 is a reply to message #40792] Wed, 21 May 2003 09:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Olivier_Thomann.ca.ibm.comNOSPAM

On Tue, 20 May 2003 21:00:53 +0200, "Hans Schwäbli"
<hans.schwaebli@schwaebli.com> wrote:
>If you mean the Ant parameter
>"-Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter": This didn't
>remove the serialVersionUID problem!
Are you using the same version of the compiler?
If yes, please open a bug report against JDT/Core and provide a test
case.
--
Olivier
Re: I knew it was a bug (serialVersionUID) [message #42362 is a reply to message #41882] Wed, 21 May 2003 12:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hans.schwaebli.schwaebli.com

Don't ask me such hard questions...

I simply used Eclipse 2.1. Everythink was compiled with Eclipse 2.1 and
using the parameter I wrote down.

The man who solved the problem said he already wrote a bug report.

I tried to write a simple test for a bug report 2 weeks ago, but I didn't
manage to reproduce this bug. It costed me too much time to write such a
test so I stopped it.

But believe me, this is really the reason (JAVA_HOME variable). We tested it
on many PCs.


"Olivier Thomann" <Olivier_Thomann@ca.ibm.comNOSPAM> wrote in message
news:m01ncvo22o28uguedag4uajvlrrm4b26m3@4ax.com...
> On Tue, 20 May 2003 21:00:53 +0200, "Hans Schw
Re: I knew it was a bug (serialVersionUID) [message #42487 is a reply to message #42362] Wed, 21 May 2003 12:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Olivier_Thomann.ca.ibm.comNOSPAM

On Wed, 21 May 2003 18:00:52 +0200, "Hans Schwäbli"
<hans.schwaebli@schwaebli.com> wrote:
>But believe me, this is really the reason (JAVA_HOME variable). We tested it
>on many PCs.
My concern is that JAVA_HOME would make no difference for the Eclipse
compiler as far as I know.
This is why I asked for a test case to try to see how this could have
a side-effect on the Eclipse compiler.
My guess was that javac is used behind and this would explain the
serialVersionUID problem. I don't see why the Eclipse compiler would
produce two different .class files that would lead to two different
serialVersionUID if you compile the same source with the same options.
--
Olivier
Re: I knew it was a bug (serialVersionUID) [message #42962 is a reply to message #42487] Wed, 21 May 2003 17:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hans.schwaebli.schwaebli.com

Maybe I'll try to provide a test on weekend.


"Olivier Thomann" <Olivier_Thomann@ca.ibm.comNOSPAM> wrote in message
news:1sbncvgo3j5b4ga9vev7ag8prcjesiq93p@4ax.com...
> On Wed, 21 May 2003 18:00:52 +0200, "Hans Schw
Re: I knew it was a bug (serialVersionUID) [message #43410 is a reply to message #42962] Thu, 22 May 2003 05:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: darin_swanson.oti.com

I believe this is the bug report as reported against the Ant component
https://bugs.eclipse.org/bugs/show_bug.cgi?id=37940

Darins

"Hans Schw
Re: I knew it was a bug (serialVersionUID) [message #43800 is a reply to message #42487] Wed, 21 May 2003 17:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: muelleimer.usenet.katzien.de

* Olivier Thomann <Olivier_Thomann@ca.ibm.comNOSPAM> wrote:
> My guess was that javac is used behind and this would explain the
> serialVersionUID problem. I don't see why the Eclipse compiler would
> produce two different .class files that would lead to two different
> serialVersionUID if you compile the same source with the same options.

BTW: There is a already a plugin, which includes a sVUID when pressing
a key. Why not make that part of eclipse, provide a small
builder/resource change listener, which checks for changes, which
should affect the sVUID and change them if needed.

Or do a quickfix for this, which is also trigert by the <whats the
name..>-interface.

This topic comes up almost every two weeks, seems like a perfect
improvment reason :)

Jan, no I'm not volunteering :)
Re: I knew it was a bug (serialVersionUID) [message #43831 is a reply to message #43410] Thu, 22 May 2003 10:24 Go to previous message
Eclipse UserFriend
Originally posted by: Olivier_Thomann.ca.ibm.comNOSPAM

On Thu, 22 May 2003 04:18:47 -0500, "Darin Swanson"
<darin_swanson@oti.com> wrote:
>I believe this is the bug report as reported against the Ant component
>https://bugs.eclipse.org/bugs/show_bug.cgi?id=37940
I annotated it. This is an issue with the way we set the compliance
level in the ant javac adapter. See my note in the bug report.
You can move it to JDT/Core. This is not related to ant directly.
--
Olivier
Previous Topic:Problems with launching plugin
Next Topic:vi Editor Plugin
Goto Forum:
  


Current Time: Sun Nov 09 17:19:39 EST 2025

Powered by FUDForum. Page generated in 0.05704 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top