|
Java 8's java.time library is heavily influenced by JodaTime, and is really good enough to use on its own. Plus, java.time.Instant is going to generally interact more cleanly with third-party libraries than org.joda.time.Instant is. It's especially handy in your particular instance: Instant.parse(String str) does exactly the right thing here.
|
# ? May 1, 2015 08:16 |
|
|
# ? Jun 10, 2024 06:55 |
|
Java 8's API is fine, but I just assumed he wasn't on Java 8, because he's using SimpleDateFormat.
|
# ? May 1, 2015 08:29 |
|
fletcher posted:Is Joda Time still necessary with Java 8? I've just been using the built in stuff now.
|
# ? May 1, 2015 18:19 |
Can someone recommend a book, website, or resource for learning Java for a complete programming beginner? I am looking into taking a course on database development that utilizes Java with Oracle, and I have some experience with MySQL. I'm looking to get the basics of Java so I won't fall behind in the course. Free or cheap would be great but not a requirement. vv Awesome, thanks for the suggestions. denzelcurrypower fucked around with this message at 23:50 on May 2, 2015 |
|
# ? May 2, 2015 23:08 |
|
The official Java "Trails" tutorials are a pretty decent primer on the language. Check out "Learning the Java Language," "Essential Java Classes," and "Collections." I'd recommend using an IDE as you're getting started. IntelliJ IDEA Community Edition is great, and free, and they have a good tutorial for getting the IDE set up and building a simple program.
|
# ? May 2, 2015 23:31 |
|
MoosetheMooche posted:Can someone recommend a book, website, or resource for learning Java for a complete programming beginner? I am looking into taking a course on database development that utilizes Java with Oracle, and I have some experience with MySQL. I'm looking to get the basics of Java so I won't fall behind in the course. Free or cheap would be great but not a requirement. I always recommend Head First Java for complete beginners. Very detailed explanations and pictures to help get the points across.
|
# ? May 3, 2015 01:44 |
FateFree posted:I always recommend Head First Java for complete beginners. Very detailed explanations and pictures to help get the points across. The idea behind the book looks good but it says it teaches Java 5.0. Is that worth learning or should I look for a newer edition?
|
|
# ? May 3, 2015 14:20 |
|
MoosetheMooche posted:The idea behind the book looks good but it says it teaches Java 5.0. Is that worth learning or should I look for a newer edition? You're fine with Java 5, since it includes Generics. You can pick up things introduced in newer runtimes via their appropriate Trails. Make sure you get the latest JDK, they're backwards compatible.
|
# ? May 3, 2015 14:44 |
|
Please just use the Oracle site instead of becoming yet another Java programmer stuck a decade in the past. Trying to do any kind of file IO without at least Java 7 is painful.
|
# ? May 3, 2015 15:10 |
|
I think a book using Java 5 would be fine as long as they realize it is pretty out of date. The basics of the language haven't really changed since then, only a few new features and better library classes. Not that the official Java tutorials are bad, but the Head Start series is a bit more targeted to absolute programming beginners and its style is probably a bit nicer in the absence of an instructor to reinforce the reading (in high school, their C# version was to me, as someone who learns much more effectively from lecture + reading than just reading alone.) Of course, you could ask in here if you get confused on something no matter what tutorials you follow.
|
# ? May 3, 2015 16:15 |
|
hooah posted:Just reinstalled, similar behavior, but I see the content of secondary windows more often. No further suggestions to make JARs run properly?
|
# ? May 4, 2015 00:59 |
|
more like dICK posted:Please just use the Oracle site instead of becoming yet another Java programmer stuck a decade in the past. How does it feel to not work in large corporate enviroments? As to the Oracle site, it is pretty good, but is mediocre at best for someone who doesn't have at least some experience with object oriented programming. I find the examples are often very simplistic without always have a clear explanation of why they are doing something. They also tend to miss the more complex and interesting use cases.
|
# ? May 5, 2015 16:50 |
|
hooah posted:No further suggestions to make JARs run properly? It's pretty clear at this point that you've got something wrong with your JRE or underlying operating system. I mean, you could download the source for that Portecle and try to run it and see what's happening when it freezes, but at this point I'd start looking for alternate ways to use the software (a VM, maybe? Or if your school offers a remote desktop session, just use that for your assignment.) Unfortunately, you may not be able to see a full resolution of the problem without reinstalling your OS.
|
# ? May 5, 2015 17:00 |
|
carry on then posted:It's pretty clear at this point that you've got something wrong with your JRE or underlying operating system. I mean, you could download the source for that Portecle and try to run it and see what's happening when it freezes, but at this point I'd start looking for alternate ways to use the software (a VM, maybe? Or if your school offers a remote desktop session, just use that for your assignment.) Unfortunately, you may not be able to see a full resolution of the problem without reinstalling your OS. Yeah, I ended up running the thing over RDP to a school machine. loving Java.
|
# ? May 5, 2015 17:04 |
|
carry on then posted:.... Unfortunately, you may not be able to see a full resolution of the problem without reinstalling your OS. That's harsh. No matter what, you don't reinstall an entire OS over a JVM issue. Java is just a program that can be run from any folder without any issues whatsoever. Copy it, move it, anything, it will still work. And "loving Java" ... is not really helpful either. If you'd study the problem a bit more, you will probably find the root cause then be able to fix it (I have no idea, the thing worked on my machine). You may even learn a thing or two in the process. Throwing your arms up in the air is a coward-ish way to get out.
|
# ? May 5, 2015 19:31 |
|
Are you real? He's noticed issues across multiple pieces of software from very different sources and across multiple clean reinstalls of his JDK. Meanwhile no one else can reproduce the issues he's had in either. At this point, you have to look at the things which haven't changed, and that could mean something is wrong with his OS. Nothing you have suggested addresses this.
|
# ? May 5, 2015 19:47 |
|
carry on then posted:Are you real? He's noticed issues across multiple pieces of software from very different sources and across multiple clean reinstalls of his JDK. Meanwhile no one else can reproduce the issues he's had in either. At this point, you have to look at the things which haven't changed, and that could mean something is wrong with his OS. Nothing you have suggested addresses this. Haha, have you actually read the posts? They look like they're written by somebody who has trouble working with computers, much less has any programming training/experience. They're full of "i don't know", "i think i did", "maybe reinstalled some time ago", maybe X, maybe Y. He never said they were clean reinstalls it was simply: hooah posted:Just reinstalled, similar behavior, but I see the content of secondary windows more often. after you suggested to use Revo Uninstaller. Did he? I don't know, maybe he did, maybe he didnt. The entire " dunno, it just doesn't work" dance doesn't help. FYI, no, you don't need to "uninstall" Java, just simply delete the drat folder (s) (two if you installed jdk, one for jre as well). Are there issues on that machine? Certainly. Does the lack of information (and how vague it is) help in pinpointing the issue? Not at all. Maybe it's java , maybe it's completely something else. While reinstalling the OS will probably solve the issues, that's still a bit harsh. Using a shotgun to kill a cockroach. So let me ask you this: Are you real? Is this your standard reply to people when they say "poo poo doesn't work" you say "reinstall your OS"? Really? WTF? The information provided is minimal, the work done to fix it (as stated) looks minimal (to zero), and the solution you find to the problem, in spite of the lack of data, is to reinstall? And given the apparent lack of experience, what makes you think that the user will be able to successfully complete an OS reinstall (that is from scratch, not just over the old one)?
|
# ? May 5, 2015 20:27 |
|
Alright, I'll try to give more detail. I did use Revo when I uninstalled the existing Java. However, when I reinstalled, the installer found an installation of Java 7 that Revo was apparently unaware of. The Java installer removed the outdated version, then installed the new one. I am still unable to have a JAR GUI (either the Stanford NER program or the previously-mentioned portecle) be responsive beyond one mouse click. I'm sorry if I haven't satisfied your specificity requirements; I'm pretty busy at the end of the semester, and don't currently have a lot of time for super-detailed troubleshooting. I was just responding to what was asked.
|
# ? May 5, 2015 20:43 |
|
hooah posted:Alright, I'll try to give more detail. I did use Revo when I uninstalled the existing Java. However, when I reinstalled, the installer found an installation of Java 7 that Revo was apparently unaware of. The Java installer removed the outdated version, then installed the new one. I am still unable to have a JAR GUI (either the Stanford NER program or the previously-mentioned portecle) be responsive beyond one mouse click. The fact that you don't have time to troubleshoot this issue is completely understandable, especially since you most likely don't care about it enough to troubleshoot it, you just need the drat thing to work. However, "reinstalling an OS" to fix a java problem is a completely out there kind of suggestion (most likely don't have time for that either). The problem that you have (as described) is something that nobody here has ever seen or heard about (me included), therefore without a lot more detective work from you there's not much people can do or say. The other suggestions were reasonable given the information provided, except the "reinstall the OS" one, which is with what I had an issue. hooah posted:However, when I reinstalled, the installer found an installation of Java 7 that Revo was apparently unaware of. The Java installer removed the outdated version, then installed the new one. I am still unable to have a JAR GUI (either the Stanford NER program or the previously-mentioned portecle) be responsive beyond one mouse click. Anyway, it doesn't matter. Since you're busy and you had a workaround for your issue, let it be. After the exams and projects and so on, it may be worthwhile spending a bit more time with this. Or just reinstall the OS....
|
# ? May 5, 2015 20:54 |
|
M31 posted:That is a ISO8601 date time, and SimpleDateFormat can not parse them according to the specification. Jackson has a ISO8601 parser, which is included in jackson-databind ISO8601Utils. You should probably be using databinding anyway: I used SimpleDateFormat with jackson JSON mapper like this and its working: code:
|
# ? May 5, 2015 20:56 |
|
Haha holy poo poo dude my offhand suggestion sure has made you mad for some reason.
|
# ? May 5, 2015 20:56 |
|
hooah posted:How the hell do I get a jar GUI to actually be responsive when I run it on Windows 8.1? I didn't make the file, so I can't really edit it (Stanford's NER tagger, for the record). It starts up OK and I can click a menu, but as soon as it opens that menu, nothing else responds except the close button.
|
# ? May 5, 2015 22:12 |
|
carry on then posted:Haha holy poo poo dude my offhand suggestion sure has made you mad for some reason.
|
# ? May 6, 2015 01:41 |
|
Elias_Maluco posted:I used SimpleDateFormat with jackson JSON mapper like this and its working: It will accept the vast majority of ISO8601 dates, but not all of them (eg. 2015-05-06T08:53:45.222Z). Yes, you can probably get away with it, but why use a partial implementation when you can get full support for free.
|
# ? May 6, 2015 08:57 |
Why is maven pulling in the wrong version of a transitive dependency?code:
That's the only place 'lucene' appears in my dependency:tree output...why is it still using 4.8.1?
|
|
# ? May 7, 2015 00:24 |
|
Try mvn dependency:tree -Dverbose
|
# ? May 7, 2015 01:45 |
Sedro posted:Try mvn dependency:tree -Dverbose Thank you, that helped me track down the outdated snapshot that was causing it to pull in lucene 4.8.1
|
|
# ? May 7, 2015 01:57 |
On the subject of maven, I've come to realize that my understanding of Java's class/jar/internals is pretty weak. I learned it as a course in my undergrad career and have continued using it, but I realize when it comes to doing things like building ant files or importing jars from external applications, I'm fuzzy. Is there a book or a collection of tutorials which don't really cover the details of learning the Java language, but highlight things like linking/gradle/maven? Is that even something wise to care about, or should I just fudge my way through it and rely on IntelliJ to build and maintain my build scripts? EDIT: Actually, going through the Oracle docs as recommended above and doing some work with Gradle has been really helpful. Jo fucked around with this message at 06:26 on May 9, 2015 |
|
# ? May 8, 2015 06:37 |
|
Sedro posted:Get a JVM stack dump using jstack or jvisualvm Ok, here's the stack dump from jstack: pre:Attaching to remote server Files\Java\jdk1.8.0_31\bin\jstack.exe 1390464, please wait... Error attaching to remote server: java.net.MalformedURLException: invalid URL String: //Files\Java\jdk1.8.0_31\bin\jstac k.exe 1390464/SARemoteDebugger sun.jvm.hotspot.debugger.DebuggerException: java.net.MalformedURLException: invalid URL String: //Files\Java\jdk1.8.0_31 \bin\jstack.exe 1390464/SARemoteDebugger at sun.jvm.hotspot.RMIHelper.lookup(RMIHelper.java:115) at sun.jvm.hotspot.HotSpotAgent.connectRemoteDebugger(HotSpotAgent.java:517) at sun.jvm.hotspot.HotSpotAgent.setupDebugger(HotSpotAgent.java:374) at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:304) at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:183) at sun.jvm.hotspot.tools.Tool.start(Tool.java:196) at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118) at sun.jvm.hotspot.tools.JStack.main(JStack.java:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at sun.tools.jstack.JStack.runJStackTool(JStack.java:140) at sun.tools.jstack.JStack.main(JStack.java:106) Caused by: java.net.MalformedURLException: invalid URL String: //Files\Java\jdk1.8.0_31\bin\jstack.exe 1390464/SARemote Debugger at java.rmi.Naming.parseURL(Naming.java:243) at java.rmi.Naming.lookup(Naming.java:96) at sun.jvm.hotspot.RMIHelper.lookup(RMIHelper.java:113) ... 13 more Caused by: java.net.URISyntaxException: Illegal character in authority at index 2: //Files\Java\jdk1.8.0_31\bin\jstack.e xe 1390464/SARemoteDebugger at java.net.URI$Parser.fail(URI.java:2848) at java.net.URI$Parser.parseAuthority(URI.java:3186) at java.net.URI$Parser.parseHierarchical(URI.java:3097) at java.net.URI$Parser.parse(URI.java:3063) at java.net.URI.<init>(URI.java:588) at java.rmi.Naming.intParseURL(Naming.java:273) at java.rmi.Naming.parseURL(Naming.java:237) ... 15 more
|
# ? May 9, 2015 12:53 |
|
hooah posted:[pre] This looks wonky. What did you type into the command prompt to actually run jstack?
|
# ? May 9, 2015 13:14 |
|
Jabor posted:This looks wonky. What did you type into the command prompt to actually run jstack? After changing to the jdk \bin directory, "jstack.exe [PID]". I had done that after clicking on a menu. Here's a dump from just after starting the jar: pre:C:\Program Files\Java\jdk1.8.0_31\bin>jstack.exe 1394468 2015-05-09 08:19:39 Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode): "D3D Screen Updater" #22 daemon prio=7 os_prio=1 tid=0x0000000018840000 nid=0x154520 in Obj 0] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e15e7fb8> (a java.lang.Object) at sun.java2d.d3d.D3DScreenUpdateManager.run(Unknown Source) - locked <0x00000000e15e7fb8> (a java.lang.Object) at java.lang.Thread.run(Unknown Source) "TimerQueue" #20 daemon prio=5 os_prio=0 tid=0x00000000187b5800 nid=0x1545cc waiting on con java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000000e15e0a80> (a java.util.concurrent.locks.AbstractQ ject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unkn at java.util.concurrent.DelayQueue.take(Unknown Source) at javax.swing.TimerQueue.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "Swing-Shell" #18 daemon prio=6 os_prio=0 tid=0x0000000018721000 nid=0x1547b8 waiting on co java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000000e1394df0> (a java.util.concurrent.locks.AbstractQ ject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unkn at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "DestroyJavaVM" #15 prio=5 os_prio=0 tid=0x0000000001e30800 nid=0x15478c waiting on conditi java.lang.Thread.State: RUNNABLE "AWT-EventQueue-0" #14 prio=6 os_prio=0 tid=0x0000000017368000 nid=0x154240 waiting on cond java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000000e0ff5c10> (a java.util.concurrent.locks.AbstractQ ject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unkn at java.awt.EventQueue.getNextEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) "AWT-Windows" #12 daemon prio=6 os_prio=0 tid=0x0000000017367800 nid=0x1545f4 runnable [0x0 java.lang.Thread.State: RUNNABLE at sun.awt.windows.WToolkit.eventLoop(Native Method) at sun.awt.windows.WToolkit.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "AWT-Shutdown" #11 prio=5 os_prio=0 tid=0x000000001730f000 nid=0x1545f8 in Object.wait() [0 java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e0ff2050> (a java.lang.Object) at java.lang.Object.wait(Unknown Source) at sun.awt.AWTAutoShutdown.run(Unknown Source) - locked <0x00000000e0ff2050> (a java.lang.Object) at java.lang.Thread.run(Unknown Source) "Java2D Disposer" #10 daemon prio=10 os_prio=2 tid=0x000000001730e800 nid=0x1509b8 in Objec java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e0fec898> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked <0x00000000e0fec898> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at sun.java2d.Disposer.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "Service Thread" #9 daemon prio=9 os_prio=0 tid=0x00000000157ce800 nid=0x1543f8 runnable [0 java.lang.Thread.State: RUNNABLE "C1 CompilerThread2" #8 daemon prio=9 os_prio=2 tid=0x0000000015772800 nid=0x154408 waiting 0000] java.lang.Thread.State: RUNNABLE "C2 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x0000000015771800 nid=0x154040 waiting 0000] java.lang.Thread.State: RUNNABLE "C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x000000001576c800 nid=0x153dcc waiting 0000] java.lang.Thread.State: RUNNABLE "Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x000000001576a800 nid=0x1547ac waiting on 0] java.lang.Thread.State: RUNNABLE "Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x0000000015769000 nid=0x1544b8 runnable java.lang.Thread.State: RUNNABLE "Finalizer" #3 daemon prio=8 os_prio=1 tid=0x0000000001f25800 nid=0x154780 in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e0c06f58> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked <0x00000000e0c06f58> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source) "Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x0000000001f1d000 nid=0x1547c0 in Obje ] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e0c06998> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Unknown Source) at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source) - locked <0x00000000e0c06998> (a java.lang.ref.Reference$Lock) "VM Thread" os_prio=2 tid=0x0000000015737800 nid=0x154410 runnable "GC task thread#0 (ParallelGC)" os_prio=0 tid=0x0000000001e46800 nid=0x154790 runnable "GC task thread#1 (ParallelGC)" os_prio=0 tid=0x0000000001e48000 nid=0x15476c runnable "GC task thread#2 (ParallelGC)" os_prio=0 tid=0x0000000001e4a000 nid=0x154788 runnable "GC task thread#3 (ParallelGC)" os_prio=0 tid=0x0000000001e4c000 nid=0x1547c4 runnable "VM Periodic Task Thread" os_prio=2 tid=0x000000001701d800 nid=0x154008 waiting on conditio JNI global references: 489
|
# ? May 9, 2015 13:21 |
|
I say it looks weird because that's the output you'd expect if you ran jstack Files\Java\jdk1.8.0_31\bin\jstack.exe 1390464, which makes me suspect a typo. Or typing in the unquoted path from the root of the drive and having the shell "helpfully" run the correct program, without fixing the command line. Could you try it again?
|
# ? May 9, 2015 13:26 |
|
Sure, but first, one thing that I'm unsure about is the process ID. I used Task Manager to get it, but all I could find was a PID for java.exe. Should that be the correct PID, or should I look for a different one?
|
# ? May 9, 2015 13:39 |
|
hooah posted:Sure, but first, one thing that I'm unsure about is the process ID. I used Task Manager to get it, but all I could find was a PID for java.exe. Should that be the correct PID, or should I look for a different one? jps
|
# ? May 9, 2015 14:48 |
|
Y'know, I think you could be more cryptic. I don't have any process that starts with jps.
|
# ? May 9, 2015 14:54 |
|
hooah posted:Y'know, I think you could be more cryptic. I don't have any process that starts with jps. Phone post but if you would type those cryptic letters in Google the first hit is http://docs.oracle.com/javase/7/docs/technotes/tools/share/jps.html which looks promising.
|
# ? May 9, 2015 15:08 |
|
Ah, I see now. Here's a dump from what should be the correct JVM:pre:2015-05-09 10:24:49 Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode): "D3D Screen Updater" #23 daemon prio=7 os_prio=1 tid=0x0000000017efb800 nid=0x156ce4 in Obj 0] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e1690838> (a java.lang.Object) at sun.java2d.d3d.D3DScreenUpdateManager.run(Unknown Source) - locked <0x00000000e1690838> (a java.lang.Object) at java.lang.Thread.run(Unknown Source) "TimerQueue" #21 daemon prio=5 os_prio=0 tid=0x0000000017eb4000 nid=0x157260 waiting on con java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000000e1689300> (a java.util.concurrent.locks.AbstractQ ject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unkn at java.util.concurrent.DelayQueue.take(Unknown Source) at javax.swing.TimerQueue.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "Swing-Shell" #19 daemon prio=6 os_prio=0 tid=0x0000000017817000 nid=0x1571cc waiting on co java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000000e1394f78> (a java.util.concurrent.locks.AbstractQ ject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unkn at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "DestroyJavaVM" #15 prio=5 os_prio=0 tid=0x00000000022a0800 nid=0x1572e0 waiting on conditi java.lang.Thread.State: RUNNABLE "AWT-EventQueue-0" #14 prio=6 os_prio=0 tid=0x00000000177f8000 nid=0x15714c waiting on cond java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000000e0ff59c8> (a java.util.concurrent.locks.AbstractQ ject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unkn at java.awt.EventQueue.getNextEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) "AWT-Windows" #12 daemon prio=6 os_prio=0 tid=0x00000000177f3000 nid=0x15705c runnable [0x0 java.lang.Thread.State: RUNNABLE at sun.awt.windows.WToolkit.eventLoop(Native Method) at sun.awt.windows.WToolkit.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "AWT-Shutdown" #11 prio=5 os_prio=0 tid=0x00000000177f1000 nid=0x157060 in Object.wait() [0 java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e0ff1e08> (a java.lang.Object) at java.lang.Object.wait(Unknown Source) at sun.awt.AWTAutoShutdown.run(Unknown Source) - locked <0x00000000e0ff1e08> (a java.lang.Object) at java.lang.Thread.run(Unknown Source) "Java2D Disposer" #10 daemon prio=10 os_prio=2 tid=0x0000000017e03800 nid=0x157128 in Objec java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e0fec650> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked <0x00000000e0fec650> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at sun.java2d.Disposer.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "Service Thread" #9 daemon prio=9 os_prio=0 tid=0x0000000017470800 nid=0x157134 runnable [0 java.lang.Thread.State: RUNNABLE "C1 CompilerThread2" #8 daemon prio=9 os_prio=2 tid=0x0000000015be2800 nid=0x156a90 waiting 0000] java.lang.Thread.State: RUNNABLE "C2 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x0000000015be1800 nid=0x156ac4 waiting 0000] java.lang.Thread.State: RUNNABLE "C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x0000000015bdc800 nid=0x1573d8 waiting 0000] java.lang.Thread.State: RUNNABLE "Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x0000000015bda800 nid=0x157124 waiting on 0] java.lang.Thread.State: RUNNABLE "Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x0000000015bd9000 nid=0x157320 runnable java.lang.Thread.State: RUNNABLE "Finalizer" #3 daemon prio=8 os_prio=1 tid=0x0000000002395800 nid=0x1572d4 in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e0c06f58> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked <0x00000000e0c06f58> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source) "Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x000000000238d000 nid=0x1572dc in Obje ] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e0c06998> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Unknown Source) at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source) - locked <0x00000000e0c06998> (a java.lang.ref.Reference$Lock) "VM Thread" os_prio=2 tid=0x0000000015ba7800 nid=0x1572d8 runnable "GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00000000022b6800 nid=0x1572f0 runnable "GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00000000022b8000 nid=0x156a30 runnable "GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00000000022ba000 nid=0x1569ec runnable "GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00000000022bc000 nid=0x1572f4 runnable "VM Periodic Task Thread" os_prio=2 tid=0x0000000017471800 nid=0x157114 waiting on conditio JNI global references: 507
|
# ? May 9, 2015 15:25 |
|
Post the stack dump after the process is frozen
|
# ? May 9, 2015 17:50 |
|
Alright, here you go:pre:Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode): "D3D Screen Updater" #22 daemon prio=7 os_prio=1 tid=0x0000000017da8800 nid=0x159e10 in Object.wait() [0x000000001beee0 0] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at sun.java2d.d3d.D3DScreenUpdateManager.run(Unknown Source) - locked <0x00000000e15ed320> (a java.lang.Object) at java.lang.Thread.run(Unknown Source) "TimerQueue" #20 daemon prio=5 os_prio=0 tid=0x0000000017d63800 nid=0x15a1e0 waiting on condition [0x000000001b22e000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000000e15e5de8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionO ject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) at java.util.concurrent.DelayQueue.take(Unknown Source) at javax.swing.TimerQueue.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "Swing-Shell" #18 daemon prio=6 os_prio=0 tid=0x00000000176ca000 nid=0x157fd4 waiting on condition [0x000000001963e000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000000e139a1a0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionO ject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "DestroyJavaVM" #15 prio=5 os_prio=0 tid=0x00000000020a0800 nid=0x158d28 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE "AWT-EventQueue-0" #14 prio=6 os_prio=0 tid=0x00000000176ab000 nid=0x15a1d0 waiting on condition [0x0000000018a2f000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000000e0ff5d08> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionO ject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) at java.awt.EventQueue.getNextEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) "AWT-Windows" #12 daemon prio=6 os_prio=0 tid=0x0000000017697800 nid=0x15a06c runnable [0x000000001876f000] java.lang.Thread.State: RUNNABLE at sun.awt.windows.WToolkit.eventLoop(Native Method) at sun.awt.windows.WToolkit.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "AWT-Shutdown" #11 prio=5 os_prio=0 tid=0x0000000017695800 nid=0x1592f0 in Object.wait() [0x000000001866e000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e0ff2148> (a java.lang.Object) at java.lang.Object.wait(Unknown Source) at sun.awt.AWTAutoShutdown.run(Unknown Source) - locked <0x00000000e0ff2148> (a java.lang.Object) at java.lang.Thread.run(Unknown Source) "Java2D Disposer" #10 daemon prio=10 os_prio=2 tid=0x0000000017694800 nid=0x15a6ac in Object.wait() [0x000000001856f000 java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e0fec960> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked <0x00000000e0fec960> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at sun.java2d.Disposer.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "Service Thread" #9 daemon prio=9 os_prio=0 tid=0x0000000017318800 nid=0x15a778 runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE "C1 CompilerThread2" #8 daemon prio=9 os_prio=2 tid=0x0000000015a82800 nid=0x15a7b4 waiting on condition [0x00000000000 0000] java.lang.Thread.State: RUNNABLE "C2 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x0000000015a81800 nid=0x15a1d4 waiting on condition [0x00000000000 0000] java.lang.Thread.State: RUNNABLE "C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x0000000015a7c800 nid=0x159e20 waiting on condition [0x00000000000 0000] java.lang.Thread.State: RUNNABLE "Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x0000000015a7a800 nid=0x159480 waiting on condition [0x00000000000000 0] java.lang.Thread.State: RUNNABLE "Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x0000000015a79000 nid=0x157334 runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE "Finalizer" #3 daemon prio=8 os_prio=1 tid=0x0000000002195800 nid=0x159834 in Object.wait() [0x0000000016dee000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e0c06f58> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked <0x00000000e0c06f58> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source) "Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x000000000218d000 nid=0x159ed0 in Object.wait() [0x0000000016cee00 ] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e0c06998> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Unknown Source) at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source) - locked <0x00000000e0c06998> (a java.lang.ref.Reference$Lock) "VM Thread" os_prio=2 tid=0x0000000015a47800 nid=0x159f38 runnable "GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00000000020b6800 nid=0x156954 runnable "GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00000000020b8000 nid=0x156c9c runnable "GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00000000020ba000 nid=0x15a2a4 runnable "GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00000000020bc000 nid=0x15a014 runnable "VM Periodic Task Thread" os_prio=2 tid=0x0000000017322800 nid=0x15a550 waiting on condition JNI global references: 470
|
# ? May 9, 2015 18:02 |
|
|
# ? Jun 10, 2024 06:55 |
|
I don't understand this trace all that well but are you doing anything wacky with threading in this app? Are you using SwingWorker correctly? Is it possible some deadlock condition is happening or you are running logic on the main UI thread?
|
# ? May 10, 2015 04:02 |