Eclipse (Oxygen) Stops Responding When Accessing EGit? - java

I can't seem to access eGit or use any related features in Eclipse Oxygen.
I have tried everything, and even wiped the meta, pool, and eclipse information to a complete re-install but still end up with the same issue.
For your information, I have 2 versions of Eclipse installed, Java and Java EE (if that might be a problem). I also have GitHub for Windows installed.
Some symptoms (i.e. when Eclipse stops responding):
Opening eGit perspective (it is possible if I don't have any projects in explorer, and open it from start after deleting metadata folder). Then it works until I open git projects.
Importing git & eclipse projects. Auto share git projects does not complete (or takes a long time - I stop it after 5-10 minutes).
Importing git project as Git Project (from import screen).
Importing git project from eGit perspective.
Edit: Additional symptoms:
Clone external git repository.
Load got project without git autoshare, and share project...then no response.
Accessing Team->Git->Configuration in Preferences.
Attempt to share new project.
Edit: I have now discovered (after installing previous Eclipse Neon version) that EGit still fails to work. Which may mean there is something deeper wrong with my setup/system. I hope I don't have to reinstall Windows on my system with a clean wipe. :(
I have tried just about everything. Any suggestions are greatly appreciated.

EDIT: As suggested, here is another fix to a similar (or same?) issue:
Eclipse not respond when try to configure GIT
As I was working on my project, an exclamation point popped up. Attempting to resolve this issue, I came across this solution from here:
Right click on your project -> Close Project. it will Close your project and all opened file(s) of the project
Right click on your project -> Open Project. it will Open your project and rebuild your project, Hopefully it will fix red exclamation mark
This not only fixed my project, but finally granted me access to eGit features in Eclipse.

Related

Why is Intellij Idea freezing during indexing?

I'm on Manjaro linux using Intellij Idea community 4:2022.1.3-1 and jdk 17 for this project, maven is also present
Intellij always hangs after it starts indexing the jdk, it's responsive for a period of time but if I type anything or open a new menu after it's begun indexing the jdk it will immediately freeze and I have to kill the process.
This behavior started after I began attempting to use the luaj-jse-3.0.2 library. I got it to successfully start by removing this library once but have been unable to replicate this since.
I have tried -
Reinstalling intellij
Installing a different version
Removing the luaj library (only successful once)
Deleting the .idea folder
Running intellij in strace
Waiting for it to resolve
Several combinations of all of the above at once
I'm really at my wits' end on this, anyone know anything?
project github (this is up to date to the project): https://github.com/MorticiaGrey/CompSim
Apparently maven was having an issue with the jar I imported through intellij as a library. On a new project without maven but with the offending jar and code copied and pasted from the original project it worked fine, I also got it to work by deleting the old project and importing it again from github without building any of the maven stuff and deleting all the maven files
It may have been my fault for configuring something incorrectly somewhere, but I was using the normal method to add a library in intellij so if that's the case whoops I guess

IntelliJ : Cannot resolve method 'run(java.lang.Class, String[])'

I've encountered a problem where on all of my applications, there's a red cross on the top right. I can run it, but the cross doesn't seem to go away.
I've opened the run/debug configurations and it says Warning : Main method not found. I don't understand why it's not found when I already have a corresponding main class and method for each and every application.
I tried to close the project, restarting IntelliJ, restarting my laptop, refreshing my desktop, refresh Gradle by clicking Reimport All Gradle Projects, rebuild the project and clicking Invalidate Caches / Restart. I also tried other suggestions I found on StackOverflow such as deleting the .idea folder. Nothing. The red cross still shows up. I've also realized that I do not have the out folder in all of my Applications.
I just set the language level to equal my SDK version at Project Structure. Finally, it is disappeared.
In Project Settings, First make sure SDK path is correct. Preferably install and use your own SDK. Then use the same SDK in Project and Modules in Project Settings.
File->Project structure ->SDKs
Choose JDK home path, if no jdk is in the path,
you'll see an icon download jdk
download then ok
Try to copy src and gradle folders and buil.gradle and settings,gradle files in separate folder. Then open this new folder as new project in intellij. Then intellij will propose Import as gradle project... - push it.
If problem remained see you build.gradle

Spring boot project can not recognize after Windows blue screen Crash

I had a windows crash with blue screen as often happens. in this time my Intellij-Idea Data is gone and reset to default value and also my project data. so Intellij-Idea do not recognize my project as Spring-boot and I can not Run it.
I reimporetd the project, it is not working. clean, clear cache, Invadidate and restart and result was same. I check the project structure and see every dependency in module is gone although all dependency is still in my pom.xml ! so how I can fix it?
One thing you can try is to click the Reimport all maven projects button in the maven projects view , the circled arrows.
As a last possibility you can try - after closing IntelliJ - to delete from your project directory the *.iml file defining the IntelliJ project and the .idea folder. As this folder name starts with a dot, it's a hidden directory in some OS, so the best thing is to do this from a shell.
After that start IntelliJ and do a File/Open... and select the pom (or the directory containing the pom) to recreate the project.
Hope that helps.
I finally solve this problem by re Installing JDK. I find out that JDK is damaged by Windows blue screen cause the Intellij Idea even do not recognize Java classes of project like String.
after install last version of JDK every things worked fine.

Why I can't remove this Eclipse plugin after failed installation?

I am using Eclipse Mars and I have the following problem.
After the installation of a plugin, the Adoe Flash Builder plugin, it is a plugin that is installed outside Eclipse (executing an installer and selecting the Eclipse folder) I have some problem.
The plugin installation failed (because this plugin is supported only on the 32 bit version of Eclipse). So the plugin was not completly installed.
When I start Eclipse I obtain a lot of error messages caused by this failed installation and it is impossible to me work.
So I have tried to disinstall this plugin but it doesn't give me the possibility to uninstall it (the Uninstall button is disabled).
Here the screenshot where you can see that, selecting the plugin that I want to uninstall, the Uninstall button is disabled:
Why? Can I manually delete this plugin in some way? (I have not directory related to it into my Eclipse folder). It seems that in some way Eclipse have the information of this plugin but that this is not effectively present. How can I remove it? Or is faster reinstall and configure again my environment (Eclipse + SVN plugin + project configuration)
I have tried sometimes to get rid of "messed up" eclipse configurations.
In the end, it just didn't work out. I always ended up throwing away everything.
Besides: Eclipse Neon R2a was released already; so just download that and say goodbye to Mars.
And the real answer (in my opinionated eyes): I decided at some point to enable myself to install eclipse "from scratch" as quickly as possible (for example by having automation where possible; and "checklists" to follow where manual interaction is required). Simply because "installing from scratch" helps avoiding a lot of problems over time.
And while we are talking about eclipse best practices: if your OS is Linux, consider to switch to git-svn instead of SVN. Your machine still talks SVN to the remote SVN server, but you can enjoy the full beauty of git locally. No more SVN plugins, no more hours of waiting for that SVN plugin doing refresh ... I can't tell you how much time that simply change saved for me.

How to avoid "Refreshing external Folders" in Android development in Eclipse

I am having this annoying problem which takes 10-20 seconds and sometimes more every time my android project is refreshed or rebuilt.
I searched for android forums and also in stackoverflow and but solutions does not make sense. Please give me the solution or link to it.
My android project depends on two external java libs and android libs. Tell me if you need more info.
Earlier I asked this question and it solved the problem by removing 'source attachment'. But I believe it is not a good solution because I need source to be attached with jar. It helps while debugging, code browsing. If source is not attached then, your breakpoint stops there and you can't go in readable source.
Better Solution Needed. Is there a launcher option? which disables when app launched. or build options?
Instead of attaching a source folder to the .jar file, you should zip the source folder and attach the zipped file to the .jar.
See this answer for more info https://stackoverflow.com/a/9699242/637754
The reason for this is that you have attached source with your dependent jars. Just the remove the source from the class path. This how it can be done.
Right click on the project -> Select Build Path -> Configure Build Path.. -> Select Libraries
Select the Source attachment and Remove button will highlight. Press Remove and OK.
I think that should fix your issue.
this helped me so you can try too:
Go to your Workspace root/.metadata/.plugins/org.eclipse.jdt.core/ and remove .org.eclipse.jdt.core.external.folders folder
it contains .project file with links to external folders which takes too long to refresh
You can disable "Refresh on access" option in Window->Preferences->General->Workspace - it have no effect as I think, because even it's turned on you must manually refresh projects if you modify them outside of Eclipse
If anything else fails (my case), install a fresh copy of Eclipse Juno
Go to Help-Install Software, and add this repo:
https://dl-ssl.google.com/android/eclipse/
Check all options and install.
For migration reasons I was trying to install Eclipse on MAC OS Yosemite, since Android Studio is now the official IDE, it is hard to find Eclipse setups with the ADT plugin included. I tried several versions of Eclipse, and JUNO did the work.

Categories