aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Why does Eclipse 3.1.0 show these 2 warnings? any work arounds Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Why does Eclipse 3.1.0 show these 2 warnings? any work arounds" Watch "Why does Eclipse 3.1.0 show these 2 warnings? any work arounds" New topic
Author

Why does Eclipse 3.1.0 show these 2 warnings? any work arounds

Ravi Sathish
Ranch Hand

Joined: Feb 26, 2002
Posts: 131
Hi Ranchers,

I am getting these 2 peculiar problems with Eclipse 3.1.0 on RH Linux 8.3:

Issue#1
Some of my GUI classes show these warnings

Severity 1:The serializable class xxxPanel does not declare a static final serialVersionUID field of type long

Issue#2
On the command line I get these repeated warnings:
** (<unknown>:22753): WARNING **: pango-layout.c:2435: broken PangoLayout

Anyone else facing same problems? any work-arounds

Thanks
Ravi
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

I can't say about #1, but #2 is caused by having a debug build of GTK++ 2.
Older RedHat systems often have such a library. Updating your GTK library makes these (harmless) messages go away.


[Jess in Action][AskingGoodQuestions]
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31073
    
232

Ravi,
This is an optional compilation check in Eclipse 3.1. While you could turn it off, I think you would be better served to add the constant. You can add it by running the serialver tool at the command line. Some plugins allow you to right click the message to generate the id as well. I don't recall whether Eclipse does by default.

[edited to add that I'm discussing message #1]
[ March 03, 2005: Message edited by: Jeanne Boyarsky ]

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ravi Sathish
Ranch Hand

Joined: Feb 26, 2002
Posts: 131
Jeanne

Thanks for the response.

I did a little bit of reaidng about serialVersionUID and found this from
http://serialver.sourceforge.net/serialver.html

The static member variable called serialVersionUID can be included in the code of the new class version that implements a compatible modification. So, all objects serialized by the original class are compatible with the new class.

There they say a versioned class must declare something like this:
private static final long serialVersionUID = 3487495895819393L;

My question is will adding a constant like this have any problems viz. different JVM"s ? We run our code on different platforms

TIA
RAVI
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31073
    
232

Ravi,
In that case, you are actually better off having the serialVersionUID explicitly stated. If you do not have it, the JVM has to calculate one. Aside from taking time, this introduces the [slight] risk that the platforms will calculate it different ways.

In other words using the serialVersionUID will make your code faster and more uniform across platforms.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why does Eclipse 3.1.0 show these 2 warnings? any work arounds