I had a windows vista machine with much lower specs and Netbeans6.8+Scala2.8 worked fine.
old specs: Vista home premium, 4 GB ram, 320 gb hdd 5400 rpm, java 1.6.0.16
new specs: Win 7 professional, 8 GB ram, 250 gb ssd, java 1.6.0.21
The compilation on the new machine is much slower. Java and javaw take up to 95% cpu during compile.
any ideas how this can be fixed?
I am not able to upgrade NB due to some restrictions.
All I can say is try to ask to see if you can get a newer version of Netbeans. Netbeans 6.9.1 has many performance improvements, with Netbeans Dev being faster. You can make an argument saying that the slow performance is impacting your work.
Really the only other things you can do is disable modules you don't need which might free up some resources.
With that much memory you could try to run NB on Vista or Linux in a VirtualBox instance.
Answering my own question since I found the cause:
The reason (don't know if it applies to other Netbeans versions apart from 6.8):
the new PC runs 64 bit Windows 7 and a 64 bit JDK (I forgot to mention this in my question)
the old PC rund 32 bit Vista and 32 bit JDK
Netbeans currently runs in 32 bit mode only, so when on the new PC, it was an issue with running the 64 bit JVM from Netbeans. This problem is discussed here:
Issues with running 64 bit JDK under Netbeans
The easiest solution for me was to install a 32 bit JDK and force Netbeans to use it as the default platform (required modifying netbeans.conf). Additionally, -J-Xmx512m
did not work on the 32-bit JDK, so I had to set it to -J-Xmx400m
The following stackoverflow link was also helpful in figuring out the optimal settings:
Netbeans config options for optimal performance
Related
I'm trying to install Oracle jdk 17 on my netbook but with no success.
The installer says that the processor (Intel Atom Z3735F) is not supported.
On my desktop Intel i5 the same package is working fine.
I need Java on the netbook to bring at school.
Edit:
The netbook is running on Win 10 Home 32bit on Atom 64 bit processor.
I did a fast research I found out that the CPU (processor) you're rocking on your netbook is quite outdated today - it's from 2014 (check Intel Atom Z3735F on the official website). But it surprisingly should not be the issue (well, it might be - some instructions might be outdated, but I don't think that's the problem), because it actually is 64-bit CPU (it support 64-bit instruction set and it can address more memory - thanks to the wider address bus, OS has to support this as well). Since the new Java JDK 17 LTS is for x64 (64-bit) systems only, and you said that the installer reports that it's not supported on your device. I think that you're not using 64-bit operating system (OS). Do you think this could be the issue? You could easily find out by just easily looking at the task manager to see how much GB (gigabytes) of RAM you got. If it's 4 GB or less, then it's quite obvious thing. To make yourself sure, just type out systeminfo command to the CMD (if you are on Windows) and there under System Type record you will see what type you got (x86-based PC or x64-based PC).
Edit: If you are looking for the latest JDK release by Oracle that supports 32-bit systems, then JDK 13 would probably be the best go for you. If you don't need the features introduced in these newer releases, then I would recommend Java JDK 11 LTS, because it's going to be supported until September 2026. And as mentioned by matt in the answer, there is also JDK 17 LTS for x86 systems (32-bit) by Adoptium. Well, or reinstall the 64-bit OS, but that is probably the hardest option.
Thank you all for pointing me to the right direction.
The issue was caused by the 32bit Os
As suggested by #matt , I installed Adoptium JDK17 x86 that solved my problem.
I have 4 GB of ram and a core 2 duo processor . I am running eclipse for android on it and its running slow. There are no other programs running on it and its only using 40% of the CPU.
I thought that if i could dedicate a CPU only to this program it might run faster. Any idea on how it can be achieved. Any help on this matter would be appreciated.
This problem also made me think on how a multi core processor runs and why is it better then other single core systems any verified literature on this available on web.
These are some general methods to speed up your eclipse,
1.Make sure you have latest JDK installed and eclipse has reference to it.
2.You are currently using Juno(4.2) , try to install latest version like Mars or Luna(4.4) . It is preferable to use Android Studio because it is official IDE for Android development.
3.As you have 4GB of RAM ,try to modify eclipse.ini file
-Xms128m
-Xmx350m
Replace -Xmx350m with -Xmx4G so that it gets 4 GB of RAM instead of 350MB .
There is noting magical to seed up your PC or eclipse. It seems that your CPU is not faster enough as your desire. And obviously eclipse is not very lightweight too. So there is no solution actually. And don't be frustrate by thinking that your PC or eclipse is doing something unusual. Its normal.
I'm developing in Eclipse in Java and I noticed that the software execution in my eclipse is much slower (like 6 or 7 times) than the same code run in eclipse in another similar pc (both have 8gb ram 8 cores). The only difference is that I'm running on windows 7 and the other pc is running ubuntu 13.04.
I already checked and I'm using the right virtual machine (jre 1.7, the linux one is with jre 1.6) and there are at most about 20 prints on the console over a 6 minute run. Also I'm running as "run" and not debug.
What can it be? Is it possible that under linux is much faster?
UPDATE:
I installed a partition with Debian 7 on the same laptop with windows (where it was running slower). With both the default open jdk 1.6 and the new java 1.8 Debian is much faster. I would say ok if it was like 2 times slower, but a 6 minute execution instead of a 1 minute one is a bit strange.
Linux is in fact faster (usually) than Windows. It depends on alot of things though, RAM and cores are not only things that matter. CPU architecture, clock speed, OC or not and so on. If you´d post both computers specifications then it would be easier to answer but until then there's your answer.
One thing you can do is use a Terminal on each platform:
First do a java -version to make sure both are really using the Oracle JVM (for example, on Ubuntu, a trivial installation of Oracle JDK may not guaranee that you're not still using the original Open JDK).
Then, run your Java program in the terminal on each machine, and see if the difference persists. If it doesn't (i.e. if you only have the big performance gap when running from Eclipse), then it might be Eclipse's fault. While Java does tend to be faster on Linux/Debian vs. Windows, Eclipse might not have the same trend. If your experiment shows that Eclipse is the reason for the performance gap:
make sure that Eclipse is configured to use the Oracle JVM on each platform
make sure Eclipse itself and all it's possible plugins are updated (and if not, update first Eclipse, then its plugins).
so the questions as in the title, I need to run my server application in Tomcat on a System which is 32 bit Windows XP, I am working and compiling on my 64 bit Windows 7 in Eclipse. How do I compile it to 32 bit, what do I need to do? I assume it won't work on the 32 bit Windows when I'm compiling it on a 64 bit machine?
Java doesn't build 32-bit or 64-bit applications - bytecode is portable across different bit architectures.
The only exception is native libraries that you might be using in your code. If there are any then you will have to manually compile those for the respective platform. Otherwise the java code is totally portable across 32-bit and 64-bit platforms.
The problem is your JNI DLL, which needs to be compiled for 32-bit to match the 32-bit JRE.
Java is independent of the OS.
You can compile with your 64bit machine and run this on a 32bit computer as long as this computer has a 32bit VM.
If you're still searching for some "simple" solution, one would be to install a 32 bit os in a virtual machine and run eclipse from there.. Very ugly I know, but it works.
Another approach is mentioned here. How to launch java swing app which used precompled DLL from cmd?
You could install a 32bits jdk on a 64bits machine. point the JAVA_HOME to this jdk and use it. It
I got eclipse RCP juno 64 bit crashes on Mac OS X, and I posted this question in StackExchange Mac - https://apple.stackexchange.com/questions/67104/eclipse-rcp-juno-64-bit-crashes-on-mac-os-x. And, I guess I have no choice but to use 32 bit version now.
Is it just OK to use 32 bit eclipse on 64 bit OS (Lion), and 64 bit java (java 1.7 sdk)?
How about the code compatibility? Can I open the workspace with 64 bit eclipse created from 32 bit eclipse?
What's the difference between 32bit and 64bit eclipse? Or, what are cons and pros between them? Why do they keep 32bit eclipse in 64 bit world?
You need to 32-bit JVM to use 32-bit Eclipse, and you need 64-bit JVM to use 64-bit Eclipse.
Note that a 32-bit JVM can run on 64-bit OS. I have Windows 7 64-bit with both 32-bit and 64-bit JVMs installed. I do have to sometimes edit eclipse.ini file to make sure that the correct JVM is selected.
There are no workspace compatibility differences between 32-bit/64-bit variants of the same version. The native bits that are 32-bit/64-bit specific are for native UI and file system integration.
If you are running 64-bit OS, you should favor using 64-bit JVM/Eclipse. Doing so will avoid a lot of memory issues that plague 32-bit installs. For instance, it isn't uncommon for a 32-bit JVM/Eclipse to fail to start with -Xmx1024m due to address space fragmentation.
The 32-bit Eclipse builds are still produced because there are still quite a few 32-bit OS installs out there.