I am starting an application with remote debug and suspend on start turned on.
When I connect remotely to the process, I getting stoppe开发者_JAVA百科d in an uncaughtFileNotFoundException
in ZoneInfo.getTimeZone()
It is cause by the line: new PatternLayout("[%d{HH:mm:ss}] %-5p: %m%n")
.
apparently java is not finding timezone for Israel in jre/lib/zi directory.
I appreciate if you know how to fix it.
Thanks.
Edit: It appears the problem is that time zone is defined as "Israel" and Java only have "Asia/Jerusalem" time zone.
How can It be changed on linux machine?Israeli time zone should be Asia/Jerusalem. I see it under my jre/lib/zi.
I believe that there can be 2 reasons for failure of your program:
this file does not exist on your system.
something is wrong in definition of time zone on your computer.
So,
- Check if the file Jerusalem is there
- Check what is the default time zone returned by TimeZone.getDefault() and what is configured on control panel.
From what I found so far this is an inconsistency between suse 10 os and java. the os calls the time zone "(GMT+2:00) Israel" while java expects "(GMT+2:00) Jerusalem".
There is a workaround - starting java with the flag -Duser.timezone=Asia/Jerusalem
or -Duser.timezone=GMT+2
. the second option is not good for daylight savings. more details on this blog.
精彩评论