FaqProfilerWorkingDirectory

If I want to attach the Profiler to a running application, why do I need to give the Profiler the "working directory" for this application?

Working directory is needed, since the Profiler has to pass some information to the target JVM in order to establish a socket connection with it. This information is currently passed via a file with a predefined name, that the tool creates and puts into the JVM's working directory (considered both convenient and safe location).

How do I find out what this directory is (say if my application is really an Application Server, launched by a complex script)?

If you are not sure about the working directory for your application, you may consult its documentation or experiment, e.g. write a servlet that would simply invoke and print the result of
System.getProperty("user.dir")
. For Application Servers, the working directory is usually stable, so you will need to do this check just once.

Back to NetBeans IDE Profiling FAQs

Back to NetBeans User FAQs

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo