Java project shows different number of processes under windows and linux - java

I wrote a client server java project using Netbeans on Windows platform. When I profile it on windows it shows 8 threads running but when I run it on Ubuntu, htop shows 21 processes(threads) attached to it. Does anyone know why?

Yes. The numbers mean different things. In Windows there are process and threads. In contrast, Linux uses a 1-1 threading model.

Related

Can JSL tool (http://jslwin.sourceforge.net/index.html) be used on Linux?

Hi I have the jsl tool (http://jslwin.sourceforge.net/index.html) already in the code to run the java process on windows as services.
But now the requirement is to run the java process as a service on Linux machine.
I have tried to run the code on Linux and getting no error/exception at run time. But as of now I am not sure this is working properly or not.
So my question is , can this tool be used on Linux machine as well?

How to test Java Desktop Application with diffrent Platform

I have develop on desktop application in java.
Now problem is that now i want test that application with different platform like
windows,Linux,MAC with 64bit and 32bit Os Comparability.
Another big issue is that i want to test maximum Java JRE version like 1.5 to 1.7.
How can i test my application?
Is there any tool available which help me solve this issue?
To test on various operating systems, use a virtual machine like VirtualBox (free). Linux is free to get, but you will have to pay for other OSes. Mac doesn't like you installing it on anything but a Mac computer, so you might have to hack that, or buy a Mac. But you do have to set up a new environment every time. The testing wouldn't work otherwise, different operating systems are very different.
It's easier to test different JREs, check out the answers for this question: Setting the JVM via the command line on Windows

Both javaw.exe *32 and javaw.exe runs in process manager

I am developing a portal based on Liferay and I use Eclipse as IDE. I am running a 64 bit windows 7 with 8gb RAM ddr2 and AMD Athlon II X2 255 3.10 GHz. My computers freezes some time when I run service builder or when I want to open an xml file in eclipse. I checked the Process Manager from Task Manager and I have seen that I have two javaw processes running , jaxaw.exe*32 and javaw.exe.Is this normal. If this is a problem can you help me to fix it. Thanks
One process is for Eclipse itself and the other one is for your application. And no that is not a problem.
That's not problem. In most cases, this is caused by two different jvm processes, one for 32 bit jvm, another for 64bit. It's rarely to see that one process can cause this issue, in fact, I have never seen in my past 15 years java career.

linux top show java threads?

In a linux server(fedora), we run a single JBOSS Application Server, and we use quartz to schedule our task.
Yesterday,
I use a top command to view process status
see more than one processes named Java with different pid are displayed.
But if i use ps aux|grep java only one java process(Jboss AS) is displayed?
So my question would be:
Is a java thread mapped to native linux thread(cloned process), or does top not show threads?
Env:
Kernerl: 2.6.18
JDK: 1.6.0-23
It depends on your versions of various tools. Most likely, you have a version of top that doesn't understand the relationship between threads and processes on Linux, resulting in it incorrectly showing each thread as its own process. The implementation of Java threads depends on your VM, but the typical implementation on modern JVMs and Linux versions is 1-to-1, that is, each Java thread is a Linux KSE created by the clone system call.
If you have a Linux distribution that came out within the past three years, you shouldn't have this issue.

Is it possible to implement / run Java Real Time program in Windows?

I am very new to Java and also Real Time Program. I am trying to run some real time code using Eclipse or Netbeans in Windows, however, I face same problem for both IDE which I could not import the javax.realtime package.
I had googled for several hours just to get this package, but I came across quite a lot resources pointing to Java real time virtual machine. Is it not possible to have the real time features in Windows? If yes, can I get some help here for me to run those real time program in Ubuntu running from a VM?
Any feedback is highly appreciated...
Thank you very much...
The answer looks like no.
Over at Java RTS is says the requirements are:
Real-Time OS:
Solaris 10 (Update 6, Update 7)
SUSE Linux Enterprise Real Time 10 Service Pack 2 (SP2) update 6 (2.6.22.19-0.22-rt kernel)
Red Hat Enterprise MRG 1.1
--note--
I was going to edit/comment on someone else's post but it looks like it has disappeared :(

Categories

Resources