Solved

Get jar file name from Java process

Posted on 2011-02-24
4
1,092 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn different types of Android Layout and some basics of an Android App.
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 …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

739 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