Netbeans (and other Java apps) runs slow on Linux - java

I would like to create Java applications, but my first “brake” is that it is impossible to run Netbeans at a decent speed under Ubuntu 9.10 with a Radeon X1300 Pro graphics card, P4 3.2GHz.
If I use other software, like Monodevelop or any other non-Java app, I don’t have this run-slow problem.
This could perhaps be my Radeon card with my high resolution (1600x1050), so would I be better off if I bought another video card? Or is it a problem with Linux, the Java Virtual Machine or something else?
Are there any settings I should try changing in the netbeans.conf file? Would setting opengl=true or any other settings improve my Netbeans experience?
If you can run Netbeans without problems, what PC configuration do you have?
I know this is not strictly a programming question, but it is about developer tools and configuration.

Your CPU speed is fine.
Your video card is powerful enough. Video driver issues are possible, but not terribly likely.
NetBeans is RAM-hungry, there's just no way around it:
Make sure you have enough free physical RAM on your machine when running NetBeans. Ask Google for information about how to inspect and watch memory usage for your OS.
Maybe try closing one or two other RAM-hungry apps, if you have them running.
Try using the Sun JDK/JRE, it is more heavily optimized than other offerings.

i think you should check your java virtual machine, i have used netbeans on various machines for java development and got no problems up to now.

I've run Netbeans on Ubuntu 9.10 and a Radeon card with no problems. One thing you may want to do is increase the memory size that the JVM allocates to Netbeans. this Netbeans wiki article should help you figure out how to configure it.

I have personally noticed Netbeans slowness on Fedora 14 under a couple conditions:
Using OpenJDK seems to be slower than Sun Java
Using the radeon open source video driver
I've been meaning to install fglrx on my laptop to confirm this hypothesis about #2. See this thread for more.

Related

How can I speed up my pc for Android development ft. Android studio

Now you can easily notice I am new on app development path when I am setting up Android studio for Android development I find that my pc need specific requirements (Hardware) to start
But I have desktop that
CPU : Core 2Duo
RAM : 4 GB
HDD : 500 GB
It's been week when I just run some basic apps but it's very headache to do it for basics app because my android studio every minute got hang and start lagging I can't open chrome there full of warehouse of my problems related to pc because of android studio
Anyone know any hacks or by tips for me you can feel free for it.
Putting it bluntly: those specs are simply not enough to do any serious modern development. If you could replacing the HDD with an SSD (even a small, cheap one) would be the highest priority and more memory is second. A better CPU would obviously help, but it's a luxury, the other two items are more important.
Assuming that's not an option, you can do either of those two things:
don't use an IDE (or at least a more light-weight one, such as VS Code) and build your software from the command line. This will be more painful (especially when you're just starting) and even then the resource requirements of the build will be non-trivial.
Make sure to do as little as possible on your local machine. If you have a decent internet connection, then you might be better off developing on a free remote cloud computer and use something like Projector to show the UI in the browser. I've found this repo with instructions on how to use it with Android Studio, which seems useful, but I've not verified that it works.
The only hacks I can think of are:
Make sure you are not using a remote mounted file system or "share" for either your Android Studio + Java installation or your AS workspace.
Shutoff (quit) all other applications that are using significant amounts of RAM; e.g. your web browsers, your email tool, Slack, Zoom, etc.
If you are using Windows, switch to Linux.
Better idea: get a better development machine. I think that the RAM is most important, because it sounds like your machine is thrashing.
It may seem unfair but Android Studio is not really suitable to run in a lower end device. It used to lag/hang in my device with Core i7 and 8GB Ram. The best thing you can do is to use an SSD instead of HDD. SSDs with smaller memory are often cheap and this alone can somewhat lessen your problems with Android Studio.
i think you should change your HDD to 240 GB SSD and it will works fine

eclipse performance arm vs intel

I'm using Intel Core 2 Duo T5550 with 3 GB ram, and SSD HDD for java development under Ubuntu 64, all is tweaked, but it's still slow. I mean switching between windows and other simple actions, even when it starts up, especially when you open few big projects.
I heard that arm has jazelle and thumb on newer processors, which execute java bytecode directly, and it's fast.
If I switch to such machine would eclipse(java) work faster?
Edit:
Thanks for anwserws. I know that Core i7 is at least 4 times faster for java ( just have a look http://infoscreens.org/benchmark_en.html ), but I thought that ARM, which are 2x2GHz and execute java directly would be faster (for java only).
I have Oracle Java, also I used JRockit, but it was strangely crashing during debugging.
I thing I'l buy i7 desktop in near future. Thanks :)
A Core 2 Duo machine with 3 GB of RAM should have not problem running Eclipse. An ARM chip running standard desktop-oriented OS and JVM is going to be extremely slow. Far slower than your Core 2 Duo machine. Regarding those new ARM instructions, in order for them to be useful, there needs to be a JVM that can work with them. If one exists, it is going to be of specialized sort likely designed for mobile device operating systems.
One common problem that Linux users have with Eclipse is that OpenJDK that comes with Linux distributions just doesn't perform as well as Oracle/Sun JDK. If you haven't installed Oracle JDK, I recommend installing it for use with Eclipse. Your performance problem may just go away.
If it doesn't and you are still considering buying a new machine, an i3/i5/i7 machine would be a far far better choice for a development platform than anything ARM that exists today or likely to exists in the near future.
Oh and one more thing... Eclipse has native components (SWT UI and file I/O) and there isn't a build available for any ARM architecture.
My guess is you are running low of memory, not just for the application but tocache disk access. Having more memory, regardless of your process is likely to be your problem.
When your system is running slow is you system waiting on IO or consming CPU. e.g. have a look on top.
BTW: I use IntelliJ CE with about 15,000 classes open and it works fine on a machine with 24 GB. ;)
ARM CPU is not as powerful as x86 CPU, so no. Also, I doubt eclipse will run on an ARM machine.

Eclipse Helios x86 issues on Windows 7 x64, even on clean system

I have a problem with Eclipse for some time. When I move to Windows 7 x64 on my notebook, Eclipse starts getting "Freeze", for example, when using Content Assist (Code Helper), or using any other option in Eclipse. I am using quite bunch of plugins, so, I tried to delete them all, and check clean IDE. But this didn't help. I downloaded fresh Eclipse Helios for Windows x64, didn't help. I even formated the disk, reinstall Windows, install only JDK and Eclipse but it always occur. What can I do ?
Edit:
Memory: I did not change memory, and IDE freeze, change memory to 512,1024,2048 MB, keeps freezing. (via vm parameters).
Anti-Virus: I am using ESET Smart Security, but with our without it, Eclipse keeps freezing.
After much frustration, I disabled AVG and it worked fine.
Several leads.
Check whether this freeze the freeze is linked to a huge consumption of CPU or disk usage. Unlikely.
If not then this is probably a network issue. Then disable the firewall for a while and try again. Eclipse now reports your plugin usage at the beginning of a session and it might be busy looking for a connection.
Close all editors from previous session. In the past, eclipse tried to access xml DTD with from the network instead of the local catalog and that would fail if you were offline of course.
Finally, let me tell you that if this is for running eclipse you've selected the worst OS. OSX and Linux are much better options. I used to do so as well. But for the last two years, I've run Windows only inside VirtualBox when I couldn't avoid it (TOAD, Macromedia Fireworks) and I wished I had migrated before.
The crucial point is how much memory you have for Eclipse and if you have any anti-virus software installed that needs to preparse all the class files Eclipse wants to look in.
Does it settle after some usage?

Bluescreen of death during Java development on a Leopard - any ideas how to solve this?

I develop using Java 5 and 6 on Intellij IDEA 7 and 9M1. From time to time (during run/compile) my Mac (10.5.7) will die with a Bluescreen of death.
Has anybody else had this issue and somehow managed to solve it? If so, how? Any suggestions other than running the IDE in a VM?
I suggest to file a bug against Apple's Java VM. This really should not happen.
I've heard people complaining about the latest MacOS Java updates in combination with IDEA. Maybe check out this thread
It could be specific to your hardware and/or software environment. I'd suggest performing a hardware test (faulty memory is the most likely cause). Java is a stress to the system, I've seen such situations before (other applications work fine, but Java is causing system crashes, in most cases such problems were related to memory, replacing the modules fixed them). For testing the memory you can use the Memtest OS X.
Another thing to try is Java for Mac OS X 10.5 Update 5 Developer Preview which is available via Apple Developer Connection.
Have you had a look at the system console (/Applications/Utilities/Console)? Java or the OS may have recorded some dying gasp there before the BSOD happened.

What is a good IDE for Java programming on a low end laptop? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
i have to work away from my desktop computer from time to time (for instance on trips). It is a low end laptop. I can use Eclipse but it is awfully slow.
Is there a better choice? If possible not something like vi oder emacs.
Laptop:
512 MB DDR RAM
Intel Pentium M 760 2.0 GHz
Windows XP SP3
There is no possibility to add more RAM
How low end is it? I used to use IntelliJ Idea and loved, it also ran faster than eclipse for me. DrJava is also very small and light weight. But personally I prefer vim + javac the best. :)
Netbeans is a little less sluggish than Eclipse, but it's a huge memory hog.
Emacs is always a fine choice too.
I actually don't consider that a "low end" machine.
I've used Eclipse and NetBeans on a P3 1.2 Ghz 512M RAM laptop, and they both run. They are a bit sluggish, but usable. Between the 2 I'd say NetBeans was less sluggish, probably because there aren't as many UI elements and frames all over.
My primary home laptop is a Toshiba 512M Pentium M 2 Ghz, and Eclipse runs fine on it (So does Visual Studio 2008).
It seems with these big IDEs, RAM > CPU at influencing speed.
Edit: it may be worth noting that my P3 1.2 Ghz laptop is running Ubuntu and my Pentium M 2 Ghz is running Win XP.
Eclipse is noticably faster in Linux. I once tested large project build times in:
WinXP running Eclipse
-vs-
WinXP Running VMWare Workstation Running Ubunty Running Eclipse
Suprisingly, Ubuntu in VMWare was consistently much faster, about 30-sec faster over what was a 7-minute build process on Windows.
You Could try JEdit, while it is not a true IDE, it does support a ton of Java centric functions like source formatting, syntax highlighting, and a java debugger, and bunch of other functions all of which can be added/subtracted via a plugin system. I've used it in the past when I wanted something with more power than notepad, but less bulky than Eclipse.
It's all open source and free, and portable to most systems since it is written in Java.
A nice lightweight editor is Notepad++. Based on a powerful editing component Scintilla, Notepad++ is written in C++ and uses pure Win32 API and STL which ensures a higher execution speed and smaller program size. By optimizing as many routines as possible without losing user friendlyness, Notepad++ is trying to reduce the world carbon dioxide emissions. When using less CPU power, the PC can throttle down and reduce power consumption, resulting in a greener environment.
I guess it is the JCreator Pro.. The free version, JCreator lite is OK but have limited capabilities.
You might have a look at BlueJ
The older versions of IntelliJ IDEA like 3,4,5 can run easily on that memory - provided you don't have a huge project, and are willing to miss out on some features in the new versions.
I haven't tried it yet, but recently stumbled upon JCoder, which is a Java IDE written in C++. Minimum memory requirement stated is 512MB.
Also, you could consider running an older version of Eclipse, and/or trying to tune Eclipse to run better on your hardware. A Google search for "Eclipse performance tuning" is turning up a bunch of pages with suggestions that may be applicable.
Text editor plus the Java console are your best tools if you are on a low end computer and you don't need debugging and such.
It really depends on your project more than the actual piece of hardware, so you need to think about it with pros and cons.
Good luck.
I was always partial to JCreator back in the day.
you can use netbeans with only the modules your using (same thing with eclipse) or geany (using linux?) not a ide but a really nice text editor with ide functionalities
other option is using netbeans/eclipse older versions that are way more efficient
Get more memory if you can.
SciTE, JUnit, Ant and jvisualvm used to run fine on my notebook, which had 768M, or the 2GB/1GHz netbook I now use. On the rare occasions you must use a debugger, then there's always jdb. The problems I've had with IDEs on notebooks are more to do with screen estate rather than performance. OTOH I gave up on Netbeans as its text editor was too slow on a 'standard built business desktop' machine last time I was contracting.
gvim + ctags + ant
You will run out of memory if using almost ANY modern AppServer anyway.
I hope you're not.
I have been using E Text Editor, a port of TextMate and am loving it. Comes with built in syntax highlighting, snippets, can download TextMate bundles and fully customizable/extendible in ruby.
I occasionally use TextPad for simple Java programs. It's very lightweight, free (well, nagware, but inexpensive to buy) and has a simple to use compile and run option. Also syntax highlighting, though I've never used it.
The important question is what features you think should be in a good IDE.
Code completion? JavaDoc in mouse overs? "Go to definition"? Built-in debugger? Syntax highlighting? Incremental compilation?
A good place to start, would be to get the code to build with ant as it allows you to move this out of the IDE where it hopefully needs less space to run.
I believe the requirements of older versions of JBuilder were quite low. You might want to buy a used one for this purpose.
Is there a chance of upgrading the laptop's memory? CPU doesn't matter much, but IDEs are nearly always huge memory hogs (even EMACS was considered that in its time).
I'd say that you can run eclipse quite well in 1GB (maybe even 512MB) using windows XP, if you don't do huge projects and don't run any other massive apps at the same time.
As long as I already have a project set up, I use vim/gvim for most maintenance development or fooling around.
First of all, memory is the problem.
Linux performs fairly well with low memory, but pc isn't great and mac is abysmal! (if you have 512M and less than 4gb hard disk free, it will barely work at all! This is because the mac allocates it's swap from "Free space" on your hard drive)
Macs are easy to upgrade though. I got 4gb for my laptop at fry's for less than $100, and the slots are inside the battery compartment. After the upgrade, my bottom-of-the-line mac has never once given me a single time to be concerned about its' performance.
PCs are more difficult than the mac, but vary based on model.
Okay, so let's say you don't want to upgrade.
The most important thing to do then is to be sure you have a local copy of the Javadocs. You'll miss them VERY QUICKLY if you don't have eclipse/netbeans.
After that, who cares what editor you use. Personally I'd use the built-in editor because I'm not actually that impressed with coloring and auto-formatting.
If you need context coloring, I guess vim would be the most light-weight editor with a Java mode (at least I believe it has one). JEdit is fairly light-weight, and so is emacs and I know they both have java modes.
For builds just use ant or maybe maven, building in the IDE is nice but overrated.
The biggest thing, as I said, is always have the javadocs on a browser bookmark.

Categories