NetBeans locks on startup on Ubuntu 64 - java

I made the mistake of installing NetBeans as root:
sudo sh /opt/myDirectory/netbeansInstaller.sh
I installed it, launched it, and created a dummy project just to get familiar with it. Then I closed NetBeans and came back to it later on in the day. When I try to open/run NetBeans as my normal user, it launches with all sorts of error messages complaining about denied permissions.
So I uninstalled NetBeans completely using the uninstaller, and even deleted the project I created with it. I even deleted the installer itself out of my Downloads folder.
I re-installed NetBeans as normal user, and am still getting permissions errors. Now what happens is it launches, generates some error popups, and then freezes completely. I notice that it is still attempting to launch my deleted project by default!
Here is what I think is happening:
I run NetBeans as normal user
NetBeans has cached, somewhere, that my old project (which was created when I was using the old NB install as root) is the project to load at startup
It automatically complains that it can't load the project properly because I'm not root
It can't find my old project (because its deleted) and so it freezes in this "wait state"
Has anybody else ever had this problem? Any way to force NetBeans (perhaps from the terminal) to do a "clean load" where it won't attempt to load any projects? ANy other obvious solutions?
Thanks!

You could try deleting the .netbeans folders in the /root and in your home directory respectively. Netbeans maybe wants to read the /root/.netbeans folder for which it has no permission.

Related

Netbeans fails to build because the .jar file cannot be deleted

Netbeans fails to build because .jar file from the previous build cannot be deleted. I am unable to delete the file manually or change/view its owners either even with Administrative Privileges. Is netbeans locking these files?
I think I just had this problem. Netbeans isn't the real issue here. The problem is that Java SE is getting stuck for some odd reason. Windows has this problem with apps hanging in the background in general but it also could be the program not exiting correctly due to code.
Here's how I fixed it:
1) Closed NetBeans (may not actually be necessary though)
2) Opened task manager
3) Manually ended Netbeans processes if it's still hanging (again, may not be necessary)
4) Look for any process with "Java SE" in the name and end that process
5) Try to build again.
Worked for me.

NetBeans 8.0.2 Java "Project Folder already exists and is not empty"

I've been getting this error message when I want to create a new project in NetBeans. There are two old answers for this question, Project Folder already exists and is not empty- Error in netbeans and Netbeans error: Project Folder already exists and is not empty. Not only they are addressed for NetBeans 7, but also they didn't work.
I tried:
deleting project directory,
deleting userdir under C:\Users..\AppData\Roaming\NetBeans,
deleting cache under C:\Users..\AppData\Local\NetBeans,
uninstalling and installing 8.0.2
updating JDK to 8.40
but none of them worked!
I really appreciate if you'd suggest a solution. Thanks already!
SOLVED: I uninstalled NetBeans from C directory and installed it to the D directory. Then while creating a new project I choose a directory under D. It works fine now!
There is a 99% chance that this is caused by your antivirus application.
You can check on allow file modification for NetBeans in your antivirus application.
I have Bit-defender total security 2018, so if you have it follow me:
Open Bit-defender
On protection tab click on (View features >)
Either you disable (Safe Files) or allow access for NetBeans.
By the way I think Bit-defender is blocking applications to access files on the C drive if I'm not mistaken, so that's probably why it worked for you when you put it on the D drive...
Go to Program Files, delete the NetBeans folder and reinstall it.
Go to C:\Program Files (x86) and delete NetBeans Folder And try to install it again
This might be because of your antivirus. I got the same problem sometime back.
I then switched off the DataLocker option in my antivirus app, after this the problem didn't recur.
I had the same problem when i was messing around with some templates, after undoing the edits and saving the error message stopped occurring.
When netbeans says project folder already exists, it isn't a total error. It still creates the project, it just ran into an error while re-creating one of the template files. If you have the original tab still open, all you have to do is undo to the point before you ruined some template.
Uninstalling and re-installing will fix the problem but i hope this knowledge helps.

Eclipse stuck with Android Library Update at 3%

I'm at a standstill in Eclipse due to an "Android Library Update" that never finishes. I tried restarting Eclipse, restarting my computer, deleting the .metadata folder under my Eclipse workspace, and several other shots in the dark. Under Window -> Preferences, I also already checked "Skip packaging and dexing (...)"
I have only two projects open: a small demo app and the Google Play Services Library linked to it. So the problem can't be too many projects, per this question.
Does anybody have any other ideas?
See the various steps in this post:
Eclipse hangs at the Android SDK Content Loader
One of the answers is mine (delete "workbench.xmi") which works for me the best. I find I have to do this every month or so.
If you are using windows, Open Windows Task Manager and serach for process named 'aapt.exe' and kill the same. This makes library update will start frome begining and it will continue further.
Please try the below:
Make sure that eclipse is not active. If it is active kill eclipse from the processes tab of the task manager
Open %USERPROFILE%/ on Windows or simply ~ on Linux/OS X (You can
locate this folder from the Desktop)
Go to .android folder (This may be a hidden folder)
Delete the folder cache which is located inside
.android folder
Delete the file ddms.cfg which is located inside
.android folder
Start Eclipse
I tried the above and it worked for me.
Hope it works for you as well.

Sudden weird errors on a project

Today I came to work, happy. But when I opened my Eclipse, I saw that one of my projects has errors.It's weird because it shows that it has errors only in the window bar, and not in the Navigator. I don't have any Java errors, this is a valid project that was fine all the time:
Some of the errors on the error log of Eclipse:
JavaBuilder handling ImageBuilderInternalException while building: SP_Procedure
Cannot connect to VM
File <SomeFile> has been skipped, problem while reading ('Resource is out of sync with the file system')
Unhandled event loop exception
Internal error
When I run an application from this project, I get a warning message but when I proceed, it works fine, but still. It's very disturbing and I'm not sure if it's harmless.
I tried to:
Restart Eclipse
Restart my machine
Clean projects and recompiling them.
Refresh projects
Pray
Nothing helped. What could be the problem? (I'm using Indigo Service Release 2)
The following nuclear option has desperation written all over it. But I have been where the OP has been with the Juno version of Eclipse.
Run a "Synchronize with Repository" and save all of your local updates to a different directory.
Delete the project. (Check the box to delete the contents on disk. Scary step, but that's OK, because you saved it in a different directory in the previous step, right?)
Read in a fresh project from the repository. It builds happily at this point.
Integrate your local updates.
Keep on praying.
Looks that one unused JAR was deleted, but for some reason, I didn't get errors in any file, even in the files that imports this JAR! So what I did was restoring this JAR, delete unused imports and deleted the JAR again.
I've found this error after two days of navigating on this project on each file.. This is weird that Eclipse didn't recognize that1 this is an error, and throw many unrelated errors such as:
Cannot connect to VM
File has been skipped, problem while reading ('Resource is out of sync with the file system')
Unhandled event loop exception
Is this a bug in Eclipse? (All errors and warnings are enabled!)
1 As seen in the image in the question..
A class from the list of imports for the file seems to have moved out or the jar file containing the class is missing.
Expand the imports section and check if you find some classes that are missing but have been imported.
Though it is a pain, sometimes the easiest solution is to back up all your projects (either in a repository or somewhere else on your computer) then uninstall and reinstall eclipse. No it's not fun, but it should reset eclipse so everything works again. The downfall though is that you have to reconfigure eclipse to any special settings you had/reinatall any extra functionality currently installed (eg. android add-on) and reconnect to any repositories you have. While punting isn't fun, it can be effective... I hope you don't have to resort to this though.
I have went through that problem a lot of times, and tried everything you tried. Rebuild, recompile, refresh, remove and add JDK, remove and reinstall Eclipse... nothing worked
The only thing I concluded is that the workspace metadata was corrupted.
What I did (every time it happened) was
Create an empty workspace
Import -> existing projects into worskpace
Mark the "copy projects" (else it will only link them)
Wait for the copy, and start working with the new workspace
If you work with SCM systems (Git, SVN, etc), making a full checkout will do the trick too, but the worskpace import will let you retrieve those changes you didn't get to commit (if any).
It's a little painful if you have somethings already set (like JDK names, servers, etc), but then I realized it was faster than keep searching how to fix the workspace
Regards!
PS : I've been working with Kepler lately, and everything works fine till now
Click Window -> Show View -> Other -> General -> Problems
This view will show you what is wrong.
Did you, by any chance, update your virtual machine outside of Eclipse? I can't help but feel that we're both missing a finer detail here. I just keep seeing "cannot connect to VM" and thinking that it's a major clue.
Have you tried running anything from the terminal? Does it work there?
If so, do you know where your current edition of Java is located? Is Eclipse looking somewhere else?
Is this exclusive to one project? Do you use any additional libraries to the JDK?
Maybe try this for Resource is out of sync with the file system error:
Right click project in Eclipse Package Explorer
Close Project.
Right click project in Eclipse Package Explorer
Open Project.
Other things not mentioned:
project properties > java build path, see if any of those tabs got changed, local file got moved? read/write permissions on some file you are linking to?
project properties > java compiler, see if workplace settings have changed? maybe under errors/warnings, you can systematically set them to 'ignore' until the error goes away to determine what type of error it is?
maybe update some of the eclipse plugins?
I saw something like this happening for a number of reasons. Mainly because of validation in files other Java source code. See if you are validating XML for instance.
Right click your project and chose Properties (Alt+Enter) and Validation to see the related configuration.
As for the danger, I lived with those marks for ages and nothing wrong ever happened.

Eclipse not starting after hanging

My eclipse was working till now. After installing new software in the eclipse, it closed down and whenever I try to restart it, a dialog box appears saying:-
An error has occurred. See the log file in Workspace.metadata.log.
For the log file. please visit:-
https://docs.google.com/file/d/0B6ZcK0Ed_jdCMFA2RjBPUGdjeHM/edit?usp=sharing
Can any one tell me how to resolve this issue.
I know that I have the option to install Eclipse again. But I want to know is there any other way other then reinstalling?
It looks like some of the sub-components in the eclipse directory have been corrupted, possibly during an update or forced close of eclipse. You probably are best reinstalling it (point at the same workspace and you will only lose your preferences- better than losing everything! If you are using Java EE you may lose the servers depending on whether they are stored in workspace or in eclipse).
If you dont want to reinstall, you could try copying the plugins folder from a fresh copy over the existing folder. Then start eclipse with the -clean option
Edit: If you have updated anything, make sure it is for the correct version of Eclipse- wrong versions of plugins/updates can cause this kind of problem.

Categories

Resources