This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 145933 - Can not direct attach profiler to running application
Summary: Can not direct attach profiler to running application
Status: RESOLVED INVALID
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-02 15:06 UTC by Rashid Urusov
Modified: 2008-09-02 15:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rashid Urusov 2008-09-02 15:06:07 UTC
Product Version: NetBeans IDE Dev (Build 200809010201)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
System: Linux version 2.6.24-19-generic running on i386; UTF-8; en_US (nb)
Userdir: /home/tester/.netbeans/dev

Steps to reproduce :
-Create AnagramGame project
-Clean and Build AnagramGame
- run it in terminal using command:
  java -jar "/home/tester/NetBeansProjects/AnagramGame/dist/anagrams.jar"
-agentpath:/home/tester/netbeans-dev-200809010201/profiler3/lib/deployed/jdk16/linux/libprofilerinterface.so=/home/tester/netbeans-dev-200809010201/profiler3/lib,5140

- Invoke Attach Wizard and set:
  Analyze performance / Entire Application / Profile only project classes
  Target type : Application
  Attach method : Local
  Attach invocation : Direct
  Java platform that will run your Java Application: Java SE 6.0 
- Push Attach button

Progress bar Connecting to target VM works longtime without any results.
Comment 1 J Bachorik 2008-09-02 15:40:16 UTC
The order of arguments given to java is important. You should use java
-agentpath:/home/tester/netbeans-dev-200809010201/profiler3/lib/deployed/jdk16/linux/libprofilerinterface.so=/home/tester/netbeans-dev-200809010201/profiler3/lib,5140
-jar "/home/tester/NetBeansProjects/AnagramGame/dist/anagrams.jar" instead of java -jar
"/home/tester/NetBeansProjects/AnagramGame/dist/anagrams.jar"
-agentpath:/home/tester/netbeans-dev-200809010201/profiler3/lib/deployed/jdk16/linux/libprofilerinterface.so=/home/tester/netbeans-dev-200809010201/profiler3/lib,5140

The "-jar" part must be the last part of the command.