File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 36508
    
  16
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: 2712
    
    5

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: 19543
    
  16

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: 3378
    
    9
It's still weird that the compiler does this. Is there a good reason for it?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36508
    
  16
And welcome to the Ranch
 
 
subject: Warning: SomeClassName.java modified in the future. -- what's this error?
 
Similar Threads
warning for XmlSerializer
Deployment stuck
Error with taglib during portlet deployment.
I losted my ant file (build.xml)
Need help on generics