<---- template headericclude ----->
Those annoying Java warnings...
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4
  1. #1
    Tux_in_Redhat Guest

    Arrow Those annoying Java warnings...

    I don't know if I need the code, but whenever I compile something with an inner class, or some sort of "extends," I get this warning message:
    Code:
    the serializable class <classname> does not declare a static final serialVersionUID field of type long
    I figure the program will run despite the warnings, but I want to get rid of those pesky things. I found some instructions for Eclipse, but because of my small hard drive and little memory, it's too big to load, so I have to use the command line. I compile the project by saying
    Code:
    javac <folder with classes>

  2. #2
    Join Date
    Feb 2005
    Location
    Scotland
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try

    Code:
    javac -nowarn blah
    You might not want the disabling of all warnings though.
    http://help.eclipse.org/help32/index...pi_compile.htm

  3. #3
    Tux_in_Redhat Guest
    I suppose the program will run just fine without the warnings right?
    My java libraries are pretty sparse anyway: I don't have any exception classes, or the applet class, or basically any helpful class

  4. #4
    Join Date
    Oct 2005
    Location
    GMT
    Posts
    3,242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Eclipse generates this line of code automatically for each new class, always the same:
    Code:
    private static final long serialVersionUID = 1L;
    This will get rid of the warnings, too..
    Asus K55VD, i5 3230M - Productivity/Programming (F28)
    Asus M32CD - i7-6700, Asus STRIX-GTX970-DC2OC-4GD, 1x8 GB Sk Hynix 2133 MHz DDR4 - Gaming (W10)

Similar Threads

  1. aannoying,annoying and annoying java
    By phrgarek in forum Using Fedora
    Replies: 6
    Last Post: 29th August 2007, 02:28 PM
  2. CANNOT get java installed into core6 this is so annoying !
    By dak in forum Installation, Upgrades and Live Media
    Replies: 4
    Last Post: 2nd May 2007, 02:24 PM
  3. If it weren't for warnings,
    By schwim in forum Wibble
    Replies: 3
    Last Post: 6th February 2007, 01:55 PM
  4. Sun java and tomcat warnings
    By pedrobl in forum Using Fedora
    Replies: 0
    Last Post: 11th May 2006, 02:58 AM
  5. YUM Warnings
    By Freddan in forum Using Fedora
    Replies: 8
    Last Post: 5th April 2005, 03:58 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]