473,406 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

how to get rid of a warning in java prog

2
Hello frnds

I have problem
whenever i try to compile any java file in linux platform
I get a warning as
"The serializable class menu does not declare a static final serialVersionUID field of type long"
I dont understand how to to get rid of this warning
But the prg executes nicely
Please anyone do tell me a soln of this problem
Oct 30 '07 #1
2 1731
r035198x
13,262 8TB
Hello frnds

I have problem
whenever i try to compile any java file in linux platform
I get a warning as
"The serializable class menu does not declare a static final serialVersionUID field of type long"
I dont understand how to to get rid of this warning
But the prg executes nicely
Please anyone do tell me a soln of this problem
Do not post questions in the articles section.
Well the warning is telling what to do to get rid of it. Declare a final static serialVersionUID of type long and see what happens.
Eclipse likes to see it there.
Oct 30 '07 #2
JosAH
11,448 Expert 8TB
The Serialization machanism (framework?) is not just about sending objects back
and forth over a wire, it also deals with *versions* of classes that are supposed to
be serialized. That same framework uses that long ID for that matter. Although
you can forget about it in your particular circumstances, formally speaking your
classes don't really fit in the Serialization framework and the compiler warns you
for it. Note that it is a warning diagnostic, not an error diagnostic.

btw, if you're using Eclipse you can either disable that warning (the bad choice)
or make Eclipse generate an ID value for you (the good choice).

kind regards,

Jos
Oct 30 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Steven Green | last post by:
I have a java app at work I used when I had Windows 98 and never had a problem. I did a clean install of Windows XP and of course Java was not included. I went to Sun, download Java 2 Runtime...
13
by: BlackHawke | last post by:
Our program, game program Andromeda Online (www.andromedaonline.net) uses two programs- one to play the game, another to patch the game as updates come out. Players actually launch the updater...
109
by: Andrew Thompson | last post by:
It seems most people get there JS off web sites, which is entirely logical. But it is also a great pity since most of that code is of such poor quality. I was looking through the JS FAQ for any...
3
by: Vittorix | last post by:
Hi all, I'm talking about of the following warning: "myClass.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details." Usually when this warning occours...
0
by: balaji krishna | last post by:
Hi, I need to handle the return set from COBOL stored procedure from my invoking Java program. I do not know, how many rows the stored proc SQL fetches.I have declared the cursor in that proc, but i...
1
by: pankhudi | last post by:
Hi everyone... I have to do a project work related on online audio system in Java...I have done the server-client prog(socket prog) n playing audio files..But how to stream my audio file from one PC...
1
by: true blue | last post by:
hi, can anyone plz help by giving a code snippet on how to implement two threads in a single prog. i was trying with difeerent classes and different run (start) calls but only the thread in init()...
5
by: rahana | last post by:
Hello , Presently for compiling a simple java prog i am placing my .java file in C:---->j2sdk1.4---->bin----->rahana----->my .java progs. but my friend was suggesting not to keep...
7
by: svpriyan | last post by:
Dear Buddies, I have two Java Prog: My task is to read the Content of the file and write to an XML file. so i started doing it perfectly... What i have problem is when i tried to execute the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.