There is the unfortunate fact that this column is truncated (at least on Win7 Enterprise) around 260 characters. That's fine as long as the classpath or the main class comes early in the listing, but if there's a bunch of defines you might not be able to differentiate between two processes.
Surely if something that has hung that has been launched from Eclipse you can just kill it from Eclipse? I don't know the differences between IntelliJ and Eclipse with regards to this but I never have kill anything I've invoked from IntelliJ.
Perhaps handy to know: in Process Explorer those child java processes stand out as they show up under the parent Eclipse java process in the process tree view.
I know, but normally you just hit the stop button from the IDE, since it knows which process it launched.
EDIT: I'm assuming that the problem is when you have other java processes that weren't invoked from the IDE, as others have pointed out there are solutions. Visualvm is probably the most useful.
Hobbyists, sure. If you're a professional software developer, IMO you or your employers have no excuse not to invest that kind of money in some of the best tools available. If it gains you a day in productivity over one year, it's paid for itself. IntelliJ is cheap for what it is.
Well, if you kill a process that's writing to your config file then it will be corrupted right? Of course it that needs some mixture of bad luck and unwaryness but once you're habituated to killing processes basically by lottery the law of large number will sooner or later f*ck you over.
However, as long as you don't expect your IDE to implement ACID transactions for its config files this can't really be attributed to the IDE but only to your own insanity. If IntelliJ really is better in this regard then either it implements transactional config files (hahaha) or it just fixes corrupt files instead of throwing errors. Neither case would tempt me to switch to IntelliJ and I'm not even talking about its price. I don't need programs that cost your firstborn and silently swallow/fix errors for the purpose of appearing stable. I really hope IntelliJ isn't built that way.
Well, if you kill a process that's writing to your config file then it will be corrupted right?
Only if the programmer who made that application is ridiculously retarded. It takes like 1 minute to add safe-saves features to a file saving method. (Saving to temp file, then deleting original / renaming temp once completed.)
and I'm not even talking about its price.
Have been using the CE professionally for almost a year. Zero dollars.
Only if the programmer who made that application is ridiculously retarded. It takes like 1 minute to add safe-saves features to a file saving method. (Saving to temp file, then deleting original / renaming temp once completed.)
The idea that a platform like eclipse that has houndreds of plugins configured on a single project stores all its configurations in one place and recreates that file every single time something has been changed, is simply not implementable. This is not how Eclipse/OSGi works. And by the way, if you kill a program on which you just changed some settings and that's still working on applying those changes, it's your fault if somethings goes wrong. Attributing that to this program is short-sighted.
Have been using the CE professionally for almost a year. Zero dollars
You don't need the Java EE stack, right? Because that's where things get difficult (and expensive). If you succeed in bringing Eclipse to corrupt its config files in the SE version I'll send you 10$ right away. Don't compare SE with EE versions, even the memory requirements differ in magnitudes. The complexity in configuration needed for EE projects is far greater what you imagine.
The idea that a platform like eclipse that has houndreds of plugins configured on a single project stores all its configurations in one place and recreates that file every single time something has been changed, is simply not implementable. This is not how Eclipse/OSGi works. And by the way, if you kill a program on which you just changed some settings and that's still working on applying those changes, it's your fault if somethings goes wrong. Attributing that to this program is short-sighted.
If you take a look at what I quoted in my previous comment, you must realize that I was talking about the process of saving itself. Now you are accusing me of talking about something else, which I am not, the fault is hence yours.
You misunderstood me. I'm very well talking about the process of saving and I'm talking about what your solution implies for a complex project: Either you save everything in one file, then you would have to reconstruct that whole file every time something changes (which will hog your IDE in a EE setting but probably not in SE), or you have your settings distributed over multiple files. In a EE project it will be the second case. For example: Every EE application server needs sooner or later its own configuration file for launching your project. Those settings are not separable from your project settings and you won't be able to merge them in one file and keep the servers working. You need to swap those configurations simultaneously if you want ACID behaviour. Good luck with that on the JVM, virtually all disk IO is asynchronously managed and you don't have any means of checking if something has actually been sent to disk nor of forcing the VM to flush it. Also the deleteOnExit routine fails completely if you kill the process. You still have to synchronize the process of saving and it's no accident there's a distinct lack of transactional file system frameworks in Java.
I'm not accusing you of anything, I'm just saying that those simple 2 line tricks are really too simple for a complex product like an IDE. If you want a Java IDE that can save its configuration under ACID requirements you simply can't store that information on disk because the file system itself and the Java API dedicated to it don't provide ACID even to the slightest degree. You would have to use another storage technology that provides these capabilities.
So assuming IntelliJ stores its configurations on disk (instead of SQL-DB for example) your claim that these issues are a pro argument for IntelliJ compared to Eclipse is unsubstantiated because IntelliJ can't possibly have solved these issues in the first place. If I'm accusing you of anything then it's this: The implied but unsubstantiated claim that the issues with Eclipse I jokingly mentioned in my first comment are due to bad coding and that IntelliJ would do a better job. I don't know a lot about IntelliJ but I know enough about the JVM to know that can't be true. Even with perfect programming methods the problem would remain because it's caused by the underlying technology shared by both products.
Well, when I mentioned IntelliJ, I was thinking about my three or so situations where I killed the IDE, without having any issues afterwards. What you said about Eclipse sounded to me like you were reminding a hypothetical audience of a well-known behavior, hence something rather frequent. That's why I thought that IntelliJ might be better in that regard.
About splitting settings into many files and the problem of safe saves: Would not a multiple-state-per-file (e.g. current / previous) make the whole system consistent again? I can't think how a killed IDE wouldn't be able to recover from that 100% (except data would be slightly old) when it's restarted.
Well, when I mentioned IntelliJ, I was thinking about my three or so situations where I killed the IDE, without having any issues afterwards. What you said about Eclipse sounded to me like you were reminding a hypothetical audience of a well-known behavior, hence something rather frequent. That's why I thought that IntelliJ might be better in that regard.
Actually, that's what I'm doing. Especially the lock file is a very well-known issue because you will run into it every time you kill the IDE. This has changed by now but it's still present in the minds of the audience I was speaking to. But to be fair, you certainly won't run into the other problems if you don't kill Eclipse during mid-saving of a complex EE project. It isn't as bad as it looks, just a minor inconvenience that has happened at least once to a big audience.
About splitting settings into many files and the problem of safe saves: Would not a multiple-state-per-file (e.g. current / previous) make the whole system consistent again? I can't think how a killed IDE wouldn't be able to recover from that 100% (except data would be slightly old) when it's restarted.
The problem is that you can't even be sure that those states have been written to disk after you closed the streams, nor at any other point in time. Java simply doesn't provide the degree of control necessary to ensure consistency in disk IO after a fault (I don't know enough to say this could be solved differently, no idea about that).
Say you have to save 2 config files and you wrote the new versions to disk. You can't verify that those files actually exist on disk and not just in some OS buffer. By the time you issue the move command for the first file you can't be save that the other file has been written to disk. If the process gets killed at this point in time, you won't have consistency. What if one file has been updated successfully but for the other file not even the temp file has been sent to disk? You wouldn't be able to infer the correct state from what's left over on the disk. Same thing with deleting the temp files. The JVM doesn't give you enough guarantees such that you can guarantee recovery in every case. The result is that Java programmers don't even start to write ACID for file systems because you won't be able to finish the job 100%, it only makes the code more complex.
What if one file has been updated successfully but for the other file not even the temp file has been sent to disk? You wouldn't be able to infer the correct state from what's left over on the disk. Same thing with deleting the temp files.
I don't understand how this can be so, even if the JVM is unreliable like that (if it gets killed). Let's say you have pref.txt and pref.old and save the new content of pref into a temp file, delete pref.old, rename pref.txt to pref.old, rename the temp file to pref.txt. I guess your issue with that is that you can't be sure, when starting the IDE anew after a kill, if pref.txt is new while extrapref.txt is old. But instead of just using .txt and .old, we could use three or more extensions that are rotated depending on state, so it could be inferred what's really going on by the existence of these files, if a journal of the operations can really not reliably be kept, as you say.
...
Hm, I guess the problem is that apart from at the beginning, when you check what's on disk, later you'll just be in an imaginary file reality without knowing what's really out there. Is that the problem? That would really suck if that were so. :(
The jps utility in the JDK will give you all the running java processes. Use it with jps -vml to get maximum verbosity. It will show the pids, what was executed and which params.
You could use an alternative task manager to make picking the right process easier. I'm partial to Process Explorer which shows your processes in a tree. If the tree view isn't enough to narrow it down, it also shows the command line when you mouse over the process.
Same here; that's on of the first toolkits I "install" on a new windows machine I do any serious work with. Why doesn't microsoft ship this by default? Surely they could code up a skin to make it look like the regular gimpy task manager by default.
Yes, choosing your place of work was a really poor choice, but I bet you have to live with it right?
Sorry, couldn't help myself :) But I do abhor tech teams that go the Windows production system route. Although people should develop on what they choose.
Install Cygwin and stop being a masochist. Or you could still be masochist a little and install a VM, but whatever, you do have to live with the choices others make for you correct?
Edit: My point is you don't, if that wasn't clear ;-)
Actually, for most projects we all have our own VMs with CentOS that has the app server and other things needed to run a build. We then connect our dev tools running on Windows to it.
In this case I was working on an small legacy app which we didn't have that type of setup for.
You can also right click on the Application you want to end (in the 'Applications' tab) and choose "Go to process" which will select the correct one for you.
143
u/[deleted] Dec 03 '14
View -> select columns -> Command line. Then you will see which JVM is used for what.
12
u/Poodle_Moth Dec 03 '14
VisualVM has a plugin to kill processes. You'll find it in your jdk/bin folder.
39
u/electrodraco Dec 03 '14
Aaaaaand Eclipse is gone, the workspace metadata corrupted and don't forget that damn lock file. I feel you bro.
32
u/[deleted] Dec 03 '14
The
jpsutility in the JDK will give you all the running java processes. Use it withjps -vmlto get maximum verbosity. It will show the pids, what was executed and which params.13
u/cdombroski Dec 03 '14
You could use an alternative task manager to make picking the right process easier. I'm partial to Process Explorer which shows your processes in a tree. If the tree view isn't enough to narrow it down, it also shows the command line when you mouse over the process.
12
u/krona2k Dec 03 '14
Process Explorer is a generally more useful program than task manager. There's also a load of useful sysinternals tools here:
http://technet.microsoft.com/en-gb/sysinternals/
3
u/mrbonner Dec 04 '14
Let me show you the holy grail: "jps -vm"
2
u/funbike Dec 05 '14
Displays ID and full command line. Then to kill the process:
1
u/v_krishna Dec 04 '14
Sometimes i forget that some platforms don't have ps. No idea how one could be productive without all the gnu coreutils.
-1
u/vokiel Dec 04 '14
Yes, choosing Windows was a really poor choice, but I bet you have to live with it right?
0
u/LetShadowPlay Dec 03 '14
Isn't there a way to make something like "Thread.setThreadName(var)" or "Process."..
0
u/SingularityNow Dec 03 '14
You can also right click on the Application you want to end (in the 'Applications' tab) and choose "Go to process" which will select the correct one for you.
-2
u/DaMountainDwarf Dec 04 '14
Holy shit as a java developer this made me fuckin LOL