Unleash Process in Eclipse - eclipse

Is is possible to 'unleash', or whatever, a process in Eclipse that you've been debugging, or simply started with 'run'? Would be nice. After such an 'unleash-ment', the unleashed process should not die when Eclipse is shut down, and should be removed from the debug view, to avoid accidentally killing it. Essentially, become a regular application process.
thanks, -j

There is no such command/option in Eclipse and it might not even possible depending on the OS. If you want a Java process to survive the end of Eclipse, you must start it outside.
It's sad that, after more than a decade, creating standalone processes in Java is still so painful. There is the -jar option but there is no way to have more than a single main() method this way, few people know how to build a working classpath when starting your app this way.

Related

How to delete the local processes - maven[id]?

I am using JBoss Developer studio 10.1.0.GA.
I have a fuse integration project. In my JMX Navigator there are so many unused maven[id] formed. How can they be removed/deleted?
Please refer the image.
Wow, how did that happen? I guess you ran a Camel context locally several times? Did you stop the process in DevStudio console view? That should usually make those processes disappear. In your case there might be several running processes in the console view so stop and close one by one.
Alternatively you could terminate them manually either via the Task Manager (Windows) or by invoking "kill " (Linux).
I would really love to hear what you did to get into that state.

How can I debug why eclipse won't start?

I've been having trouble getting a weblogic server to run in eclipse, which have resulted in me not being able to open eclipse ni my current workspace at all. It is not my first attempt to work with weblogic servers in eclipse, and I do not know why it suddenly decided to stop working. I have had multiple errors, which all seem to be related to an abnormal high memory consumption.
One of my last errors, before eclipse quit on me for good, was an out of memory exception, on PermGenSpace. I set variables to 1024m, but it still complained it wasn't enough. After a lot of restarts, Eclipse suddenly wouldn't open my current workspace. I have tried others, and they work fine, but with my current one, the splash/loading screen disappears after about 10% of the loading bar is complete, and nothing happens at all. Except the fact that eclipse.exe shows up in the running processes tab on Windows task list. It does not show in the running programs list.
My attempts to start weblogic servers had the exact same symptoms. They showed in the process list, but did not respond when I tried to open the console in my browser.
Both eclipse and the weblogic tasks (shown as java.exe) has had over 400.000KB of memory consumption each, which I find very high.
I do not expect anyone to be able to find a complete solution here, but I am absolutely stuck. I cannot access any of my previous error messages. I have no experience debugging an error like this. Does anyone have any idea on how to find the error in a case like this?
My Weblogic version is 10.3.2, which is a company standard for now.
My Eclipse version is:
Eclipse Java EE IDE for Web Developers.
Version: Kepler Service Release 2
Build id: 20140224-0627
Adding the comment as an answer since it provided some help.
Try starting up to a new empty workspace; If you dont get to select workspace at startup use the argument "-data " If you still get issues, look at the log in /.metadata/.log

Convenient way to run eclipse plugin

I have recently started developing an Eclipse plugin (which is basic stuff for now) and I am struggling with "default" way to run Eclipse plugin ("Run as Eclipse application").
The Eclipse is starting another instance with my plugin already installed in it (this is default behaviour).
The problem is that when I want to re-run my plugin project and I press "run" button again (or Ctrl + F11) (and the another Eclipse instance still running) I get following message:
"Could not launch the application because the associated workspace is currently in use by another Eclipse application".
The error makes sense, and when I close "testing" Eclipse instance I am able to run my plugin again.
The question is - "is it normal routine for plugin development?". Maybe I am missing something, e.g. special arguments for Eclipse?
This seems all pretty normal. The error message is since the run configuration is specifing a workspace and when you start a second instance using the same workspace it is locked and considered in use.
What I usually do when testing a plugin is to create a run configuration (click "Run...") where I disable all the plugins I wont need when testing. This makes sure that the test starts up a couple of seconds quicker. Make sure you save that run configuration as a *.launch file aswell, that makes it quicker to test the next time. Or it can be used to share the configuration.
There's a lot you can configure in the run configuration, such as eclipse arguments, vm argument, if you want environment variables set, etc. So be sure to experiment a little.
In your run configuration. Main tab->Workspace Data ->Location text box add this:
${workspace_loc}/../runtime-EclipseApplication${current_date:yyyyMMdd_HHmmss}
Note the suffix ${current_date:yyyyMMdd_HHmmss} by this every time you launch your application new workspace will be created. So you will not get any error message saying workspace is locked.
But be careful as the folder .metadata will be different for different instances as their work-spaces are different. Thus preferences stored/retrieved by different instances are NOT in sync.
You are probably missing one important point: Eclipse supports the Java hot code replacement. Therefore in many cases you can modify your Java code while your application Eclipse instance is running, save the code and continue without restarting.
If hot code replacement is not possible, Eclipse will tell you, so you always know whether the editing changes are applied to the running instance.
This works best with more recent versions of the JVM, so consider upgrading to the latest Java 7 version, even if you write code to be compliant with Java 1.5 or 6.

How to run the Google App Engine server without restart?

I am using Google App Engine plugin with eclipse to create some web application, every time after I modify the program and run it, the modification does not take effect instantly. I have to kill the one (sometime mistakenly will kill the eclipse program) of the javaw.exe process and re-run again. Sometime it will hang at the "datanucleus enhancer".
I know it happen because the new javaw.exe run on the same port as the previous instance. But no point to kill the previous javaw.exe instance manually everytime, it is very annoying.
I thought I can save the source file and it will be automatically deploy to the development server, but it does not. What can I do so I do not have to manually kill the process?
If you run your app in debug mode-- that is, via Debug As > Web Application (rather than Run As > Web Application)-- it should reflect your changes to source. (For some changes it may need to terminate and restart the server, in which case it will notify you).

Eclipse hangs while debugging

I searched lot about this topics but can't find a proper solution.
I am using eclipse 3.6 Helios version with operating system fedora15. In my application I am using GWT2.4 for front end development.
Now while I work with debug mode and want to debug at some point at the same time eclipse hangs for 3-4 mins.It resumes after and again start to debug process.
I am using this eclipse from last 3 years with windows but not faced this issue.In fedora I am using it from last 4 months and this problems stated to occur from last one month.
I am not getting what is the issues with eclipse.
Please help me out.
Thanks in advance.
Is this something that happens with different projects/code, or is it the same code that causes freezes? I've had issues where threads have started in the background and caused problems.
You say "(...) hangs for 3-4 mins.It resumes after and again start to debug process.", what do you mean? Does it continue to debug and move to the next line, or is there a crash and it restarts?
How long has it been since you changed workspace? I've found this, rather than the Eclipse installation, to be an issue over time. Create a new workspace folder, export all your projects and preferences and start fresh.
You are using GWT 2.4 and I think you might be working with UI.xml too... There is a tag in each ui.xml at the top like
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
Which means eclipse is going to get that xhtml.ent file each time and there is a issue in GWT eclipse plugin have a look to below link
http://code.google.com/p/google-web-toolkit/issues/detail?id=5265
There is one comment which says
For me, removing
SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"
and saving the document,
solves the problem..
maybe it is needed for something, so better you copy that locally somewhere, and link that.
Try it out and let me know.
I had experienced the exact same problem on a less-powerful notebook I had to use.
Try one of the following
Download the latest Eclipse version (It needs, just as helios, a lot of RAM and CPU because it's based on a new "architekture", in contrast to, for instance, galileo)
Make sure you are using the latest JDK and JRE
Download Eclipse Galileo, which does require pretty less resources and goes still very very fine with most projects!
It sounds like you are experiencing the features of the latest Eclipse arch. In the latest versions of Eclipse I have noticed that the more plugins and add-ons you have installed, the slower the environment runs. There are a lot of similar posts regarding performance on the new platform
I have removed all but the plugins I am using and never install anything not needed into the Eclipse environment.
I "may" have experience this. Not sure. Suddenly started working again. I was getting a hang every time I would try to debug an app, in the part of the code (inside GWT) that creates a "table" element. Could be that there is something that just takes a while and you just have to "wait it out" the when it happens. Go get a cup of coffee, type thing. anyway I HAD stepped deep into the GWT code, plenty so I'm convinced it IS a GWT issue of some kind.
I was thinking it was some infinite recursion possibly in the logging system (like logger code accidentally trying to log itself, and going into loop?). Also there's a 50/50 chance that it was simply clicking on 'run' instead of 'debug' made it start working again. So at least try that if you have problems. My gut instinct and 30yrs programming under my belt tells me it's logger related. I can rule out "slow computers" because I never had this happen until I got a new machien which is Dell XPS, Core i7, 8 GB ram, and massive disk. So I wouldn't blame hardware, or Eclipse bloat.