Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ls chin
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 49734
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am familiar with that warning in Netbeans.
It is usually displayed when you execute code without recompiling.
 
Yogesh Tyagi
Ranch Hand
Posts: 40
Eclipse IDE Java Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
shareef hiasat
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20606
60
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may want to replace the little battery on your motherboard. That often solves BIOS time issues.
 
Stephan van Hulst
Bartender
Pie
Posts: 6083
71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's still weird that the compiler does this. Is there a good reason for it?
 
Campbell Ritchie
Sheriff
Pie
Posts: 49734
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic