wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Warning: SomeClassName.java modified in the future. -- what's this error? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Warning: SomeClassName.java modified in the future. -- what Watch "Warning: SomeClassName.java modified in the future. -- what New topic
Author

Warning: SomeClassName.java modified in the future. -- what's this error?

Ls chin
Ranch Hand

Joined: Jun 28, 2008
Posts: 99
Hi,

I'm getting an error "Warning: SomeClassName.java modified in the future".

Not every file is giving me this error, only certain files do. I can't figure out what's wrong with them, there's nothing weird or extraordinary in those files that produce this error though.

Any idea what is it?

Thank you for your help.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38436
    
  23
Sounds like a warning from the OS; you have got timekeeping problems and the last modified time on some of your files is shown as being later than "now."

I don't think that is a specific Java problem, but an operating system problem.
Ls chin
Ranch Hand

Joined: Jun 28, 2008
Posts: 99
Hi Campbell,

Thanks for your reply. I think it's an OS problem too because this afternoon I downloaded a stopwatch applet and after that NetBeans have been giving me this error.

I feel better, now that I know my java files are okay!

Thanks again. :-)
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

I am familiar with that warning in Netbeans.
It is usually displayed when you execute code without recompiling.


SCJP, SCWCD.
|Asking Good Questions|
Yogesh Tyagi
Ranch Hand

Joined: Apr 30, 2004
Posts: 39

Ls chin wrote:Hi,

I'm getting an error "Warning: SomeClassName.java modified in the future".

Not every file is giving me this error, only certain files do. I can't figure out what's wrong with them, there's nothing weird or extraordinary in those files that produce this error though.

Any idea what is it?

Thank you for your help.



This is because, The time of the system is not current on which you are running the build file. There are some classes in directories that get modified later the date your system is showing currently.....your system time is not up to date...or you modified the file with future date....check your system time when you are running the build file...

Regards
Yogesh Tyagi


Yogesh Tyagi
SCJP1.5, SCWCD5.0, SCBCD5.0
shareef hiasat
Greenhorn

Joined: Jul 15, 2011
Posts: 8
This is because, The time of the system is not current on which you are running the build file. There are some classes in directories that get modified later the date your system is showing currently.....your system time is not up to date...or you modified the file with future date....check your system time when you are running the build file..




True because this error occurred when i made today yesterday !!
Virgil Banowetz
Greenhorn

Joined: Mar 02, 2012
Posts: 1
I got that same "modified in the future" warning because my clock on my old motherboard is unstable and keeps getting the date and time wrong.
NetBeans warns of this when it sees the date/times on files don't make sense.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19672
    
  18

You may want to replace the little battery on your motherboard. That often solves BIOS time issues.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3615
    
  14

It's still weird that the compiler does this. Is there a good reason for it?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38436
    
  23
And welcome to the Ranch
 
Don't get me started about those stupid light bulbs.
 
subject: Warning: SomeClassName.java modified in the future. -- what's this error?