Navigating the file system with netbeans is VERY slow - java

Since a few days, navigating the file system with Netbeans is VERY slow (more than two minutes to access a file, and if you have to navigate a file system, it is true every time. I have exactly the same problem after clearing the cache, and with Netbeans 8.2 and Netbeans 12 (Netbeans 8 with Java 8, and Netbeans 12 with Java 17 in my tests).
Strangely I don't have the same problem with regular Java file choosers which I use in my projects. For example, if I click on "Open Project", the IDE is frozen for sometimes 2 or 3 minutes before I can see the file navigator.
When I am looking in the task manager while trying to open a project for example, it appear that Network usage is very low (1% to 0%), CPU also very low (less than 2%)
I am talking about Netbeans itself, for example if I want to open an existing project, or adding a jar file to the list of Jar libraries for an existing project
The standard Swing JFileChooser works correctly. With this example code the navigation is immediate (as expected):
JFileChooser chooser = new JFileChooser();
chooser.setDialogType(JFileChooser.OPEN_DIALOG);
chooser.setDialogTitle("Test FileChooser");
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
int ret = chooser.showOpenDialog(null);
if (ret == JFileChooser.APPROVE_OPTION{
System.out.println(chooser.getSelectedFile().getAbsolutePath());
}
I am on Windows, on my workplace network (I am working on local files on my PC, but there are two remote drives which are accessible on the network). I only have problems with Netbeans, other apps have no problem with the file system.
My problem is with Netbeans itself navigating the file system (for example opening an existing project, or adding a jar file as a library for a project)
This looks to behave exactly as this bug: https://bz.apache.org/netbeans/show_bug.cgi?id=42079, except that it does not happen with the Swing JFileChooser as shown above.
Is it a known problem, and if it is, is there a mean to fix it? I was thinking for example about a setting on the command line used to start Netbeans.

There is a bug in netbeans with links from the desktop, that behaves like you described. Try to remove all links from the desktop and default location for the open file dialog.
issues.apache.org/jira/browse/NETBEANS-1537

It was a BROKEN PATH in a link on the desktop in Windows 10, in my case.
NetBeans 12.5 -> Creating a new project dialog, than "Browse" to choose appropriate directory took a very long time. I tried to test links on my desktop. I found one old "broken link". Broken in terms - it pointed out to non existent path. I corrected this path in this link and... voilĂ , magically NetBeans is working correctly.

Ok -- this is crazy -- but after trying everything listed, here is what finally worked for me.
I created a Batch file on the desktop to point to the netbeans64.exe app. the secret for me was to NOT do a cd to the netbeans location.. but to call the app in using the full path. Here is what my batch file looks like
"C:\Program Files\NetBeans-15\netbeans\bin\netbeans64.exe"
I know it seems way too easy.. but it works for me. As Sam Snead said about the latest golf gear back in the 60's "I ain't no scientist. just a believer.." LOL!!!

I had the same problem. As they wrote here, it is necessary to check the links on the desktop. Removing bad links helped me.

I had the same issue on Windows, thanks to you guys I solved it by removing the symbolic links (shortcuts) from the desktop, but not from any desktop, I mean that this method didn't work for me when I removed them from the user desktop "C:\Users\user\Desktop", it only worked when I removed them from the public desktop, which is located at "C:\Users\Public\Desktop".
I hope this clarification helps and sorry I don't have enough reputation here on StackOverflow to comment, so I had to post this as an answer....

I find that this happens when I run Netbeans without administrator rights.
With admin rights it works fine.

Had this issue with Netbeans 15. Resolved it by removing a broken shortcut from my desktop.

Related

moving netbeans project to Windows 10 home

What are all netbeans project directories, where it can store various metadata?
I'd like to move my project to other computer (with new Netbeans version)
There are some directories where Netbeans stores data for the project (not just src directory), like .netbeans..cashe
It sometimes stores additional libraries and other data somewhere else.
So, where to look for all that project data?
It is only one part of the question. The other part is : does Windows 10 home
have some problems with developing application on it? Because when I installed Netbeans 8.2 on it and tried to open (moved - maybe incorrectly) project , it made very strange things, when tried create new project, it made
nothing at all. I am totally new to Windows 10 home (had Windows XP)
Thank you and sorry for my English, if it sounds foreign
You should not approach this way at all.
In old machine,
export your project as a zip file. refer here
In new machine
Install NetBeans
Create a workspace
Then import the project to your new work space

NetBeans 7.2.1 Running old code

I have been working on a project for school and recently ran into an error. I realized that NetBeans is not updating code for GUI items that I have updated for my project. It doesn't update on the GUI designer nor when I view in designer preview or even when I run my program. The code that is always being ran is from 2 days ago. I opened an old project and this is not an issue. So far i have deleted the Cache, Cleaned the project and I have Auto Compile on save on. I reinstalled NetBeans as well. Any Suggestions?
I know this is a rather old question, but I ran across this thread while trying to solve a similar (the same?) problem and managed to find a solution, so I'll post it here for future reference.
Are you by any chance running Netbeans on a *nix platform? Chances are you transferred your project files from a filesystem that doesn't support Unix-type permissions - I started having the type of issues you're describing after copying my project over from a NTFS partition, which by default assigned read and write permissions only to my user. cd to your project directory and try chmod -R 777 * (rwx permissions for everyone recursively), then re-open Netbeans to see if your problem is solved. (You might then want re-set a less lenient permission mask on some of the files afterwards, but 777 is a quick way to check.)
(CR)EDIT: #RTOSkit's comment on the OP's question put me on the right track.

Netbeans 7.2 won't open on OS X

I installed Netbeans on OSX Mountain Lion running JDK 7. Everything was working fine. Then my machine for no reason crashed. After this I could no longer open Netbeans anymore.
If I try to start Netbeans from the commandline:
/Applications/NetBeans/NetBeans 7.2.app/Contents/MacOS/netbeans
Then it works fine. From there I can select Netbeans > About and confirm that my userdir and cachedir is:
User directory: /Users/<user>/Library/Application Support/NetBeans/7.2
Cache directory: /Users/<user>/Library/Caches/NetBeans/7.2
So, I deleted these directories and tried again, but alas, I can only start netbeans via the commandline.
Ideas appreciated...
Sounds to me like this is not a NetBeans problem at all, rather a problem with the bundle, such that OS X is not launching the app as it should.
To verify, I'd try opening NetBeans through Finder from the command line:
open -a "NetBeans 7.2.app"
This command will ask the system launcher to open the application as if you had clicked on the icon. In your case, it probably won't open. If this is true, then you know it's not something in your terminal environment that's allowing NetBeans to launch.
The next step that I would take would be to look at the package contents: examine /Applications/NetBeans/NetBeans 7.2.app/Contents/Info.plist for anything that seems amiss - this file is the information store that OS X looks for to see how to launch the package, what its icon is, etc... - in particular, I think you should look at the CFBundleExecutable value to see what command is used to launch the app. If it's not netbeans, you've found a big hint on what might be amiss: bundles are set up so that launchers should run bundle_dir.app/Contents/{platform}/{CFBundleExecutable_value}. Looking at CFBundleExecutable should show you if there's some other script used to launch the app than just running netbeans.
From this point, you'll have to do more digging, but hopefully this is enough information for you to get started tracking down how apps are launched from the OS X launcher. For more info and a better reference, check out this link, which is Apple's documentation for keys in Info.plist.
Finally, you should note that the launch information for all apps are heavily cached; I've heard that if you make a change to Info.plist, you have to rename the app bundle and name it back to have the changes picked up by the launcher.
Good luck!
Here's an idea: use Eclipse >=)
..but seriously, something got corrupted in Netbeans' metadata/cache data files. You cleared a couple of them but there may be others elsewhere.
Try comparing the launch command in your shortcut to what you're typing in the console. Are they the same?
To find the root cause, I would check the NetBeans logs, as detailed here
/Users/yourname/Library/Application Support/NetBeans/7.2/var/log/messages.log
And if that doesn't help, I'd archive your project(s) and put a clean install of NetBeans on your machine, and then import the archived project(s) back into NetBeans.

Eclipse 3.6 freeze on autocomplete/quick fix

I have a problem that seems to come up both with autocomplete and quick fix. Sometimes when I use cmd+1 for quick fix dialog, Eclipse freezes and however long I wait (30 min at least), nothing happens. When inspected in activity monitor, it seems to exhibit little to no processor activity.
I have a Mac with OSX 10.6, and Helios with no weird plugins. I program in java, so I use very standard features.
Is this a known bug? I have tried to google a lot to find useful info. I am not very good at reading bug reports though, and the concept of feature freeze kind of taints my search results.
Thanks for any help.
As for Eclipse you can not know what is happening. The whole platform is a set of plugins, and the requirements (for example responsiveness) are not strict for them. So a third party or even a bundled plugin can cause such a failure. So most of times you cannot have a clue about what is wrong. Some stuff you can do:
while hanging unplug your network connection. If you are behind a proxy for example, a plugin can wait for a long time on network io
you can check with for example resource monitor, which file eclipse opened. Some of the opened file handlers can have relation with the problem
edit .classpath file in project where code completion freezes, and it will "reset" your project stuff in eclipse
you can browse .metadata folder in eclipse workspace and you can guess which folder to remove temporaly. After removing, try if error is still present
create a new workspace and import projects into it
if new workspace do not work, then the eror is in configuration folder in eclipse root, and you can play the same thing like in step 4
use a brand new eclipse
+1. Maybe some new plugin is responsible. In eclipse Help/about/installation details/Installation history tab you can revert to some older set of plugins.
Hope it will help.
Seems that you encounter known and already fixed bug.
Issue fixed after deleting all the files in the below directory
configuration\org.eclipse.osgi\.manager
.fileTableLock
.fileTable.1
.fileTable.2
There will be fileTable lock files, delete all those files

JVM: could not open

Error - JVM - BlackBerry 9800
Simulator
--------------------------------------- JVM: could not open
C:\Users\Bayron.Tellez\Downloads\eclipse-java-helios-win32\eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29\components\simulator\Java\net_rim_bis_lib.cod
My friend installed Eclipse with the Blackberry simulator. I'm assuming it was a portable installation because at no point we were prompted to install.
Now, he zipped it up and copied it to my machine when running I receive that error above. Obviously it's because it's trying to look for something on my friends directory. How can I change it to my path?
My path is:
C:\Eclipse\eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29\components\simulator\Java\net_rim_bis_lib.cod
Where do I change this?
I would suggest not running eclipse from a copy of someone else's installation. This will probably contain lots of installation-specific files which are unlikely to match your machine.
Why not install it yourself, then install the Blackberry Java Developer plugin? It's available at http://na.blackberry.com/eng/developers/javaappdev/devtools.jsp
You can change the early installed paths of all .cod files from xml.manifest
[Eclipse Installed Path]\plugins\net.rim.ejde.componentpack7.1.0\components\simulator\[BlackBerry simulator version].xml.manifest
Eg:
C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.30\components\simulator\9800.xml.manifest
Then remove the [BlackBerry simulator version].xml.manifest.bin file.
Now it should be work.
You may also want to check file Settings.rc,
found in the folder
PATH\plugins\net.rim.ejde.componentpack4.6.1_4.6.1.49\components\bin
first you have a path to your eclipse installation, and then corresponding Simulator you are trying to run.
hope this helps,
Use notepad++ to replace all occurrances of old directory into new directory in the eclipse directory.
Start the eclipse, and click clean simulator button.
That should be all.
Though it is not advisable to run a copy of eclipse, there is a very simple way for one to solve such a problem: it is by running the clean.bat file that is in the simulator folder of the specific component pack version folder. The path to that file would look like this: PATH\plugins\net.rim.ejde.componentpack[BlackBerry version]\components\simulator\clean.bat
I think that would do.
Still, installing a new version is the best option.
It will be better you install it yourself frsh rather than copying it from friends machine.
But you can give it a try.
Goto your eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29 directory and check do on of these files contain this path:
plugin.properties
plugin.xml
META-INF/eclipse.inf
.options
Or else you could grep for problem path in your plugin directory and replace same with updated path.
This error occurse cause your simulator have previously loadded application. Removing them solve your problem.
How to remove installed Java programs on the simulator?
Quote from Reset and clean the blackberry simulator:
Are you sick of having a million icons on your BlackBerry simulator for every HelloWorld and demo project you have every tested? Try this to remove old programs from the simulator and start with a clean ribbon. From the command line browser to your rim jde directory, switch to the simulator sub directory and run clean.bat. This program takes longer than you would expect (about 30 seconds or so on my 3 ghz machine).
UPDATE
Also delete all [app name].cod|cso|debug|jar files from simulator folder Also make sure projects you don't want on simulator are not active and are not in build configuration.

Categories

Resources