Solved

Get jar file name from Java process

Posted on 2011-02-24
4
1,053 Views
Last Modified: 2012-05-11
When I am running any jar file, java.exe is shown in the task list of XP SP3
When I am running any java based website again , java.exe is shown in the task list of XP SP3

Now, I want to get which jar file is invoking that java.exe in the task list by C#. Is it possible? If possible, how?

Thanx
0
Comment
Question by:Amitava_Mukherjee
4 Comments
 
LVL 47

Accepted Solution

by:
for_yan earned 250 total points
ID: 34969084
The actual Java program which you are running from the point of view of the system (XP) is the
argument of command line command wwith which you start java virtual machine.
If you have a tool which could retrieve command lie argument(s) of the task - not just the name
of the program itself - this tool will print you the name of the initial class which Java VM uses to start
excution. As far as I know in task manager you just see only java.exe.
There may exist some tools whch also retrive command line arguments - those should help.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34969997
0
 
LVL 92

Assisted Solution

by:objects
objects earned 250 total points
ID: 34974208
> Now, I want to get which jar file is invoking that java.exe in the task list by C#. Is it possible? If possible, how?

Its not possible
for a start jar files do not invoke java.exe
java.exec May use one or more jars, but a jar file may also not be involved at all.
And just because a jar file is on the command line in no way implies that is actually being used.
Lastly many other jars that are not on the command line could also be being used by the process
0
 

Author Closing Comment

by:Amitava_Mukherjee
ID: 34977358
thanx
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now