 |
AppPerfect Java Profiler |
Tutorial : Profiling a Local/Desktop Application
This tutorial provides a brief introduction to the Java Profiler product of the
AppPerfect DevTest4J using a set of hands-on practice exercises. This tutorial assumes you have
successfully downloaded and installed AppPerfect DevTest4J on your machine with the default
options. Apart from this pre-requisite, this tutorial is self contained. Instructions given below
are Windows-specific; if you are using a non-Windows machine, please use equivalent
commands/instructions.
This document is divided into following sections
- Creating Common Project
- AppPerfect Java Profiler
Within each section, multiple exercises are listed. Each exercise forms a logical unit
which is expected to take no more than a few minutes to perform.
All exercises assume you have installed the product in C:\AppPerfect\DevTest folder and will
be referred as DEVTEST_HOME henceforth in tutorial. If you have installed the product in
some other folder, modify the instructions below appropriately.
This tutorial is not intended as a comprehensive training guide. Please refer to the
product documentation for detailed information. However, this tutorial will give you a very good overview
of the products and substantially improve your productivity with the product.
Creating Common Project
In AppPerfect DevTest4J, you can create a common project and use the same project to perform tests in all
the bundled products.
Exercise 1: Launch AppPerfect DevTest4J
Action:
- Click on Start -> Programs ->AppPerfect DevTest4J x.x.x -> AppPerfect DevTest4J
- On launching AppPerfect DevTest4J a Welcome page will be displayed. Go through the brief description
given for each product and click on the product icon to view its perspective.
NB: Welcome page is displayed only when DevTest4J x.x.x is launched and last time no project
was opened.
- To switch between different product perspectives click on corresponding project button in toolsbar.
Exercise 2: Creating a Common Project
Action:
- Launch the Common Project Wizard by clicking File ->New... menu option.
The New Project wizard will be launched.
- Go through the instruction provided on top of the General tab.
- Keep the default project name and location for the purpose of this exercise. We don't have to provide
"Notification" settings or "Remote Application/AppServer" settings for this exercise.
Click on the Next button.
- In the Source tab provide the source files and folders of your local application. Click the Next button.
- Either use the default JDK which is bundled with AppPerfect DevTest4J or provide the proper JDK
which you want to use with your application and click on the Next button.
- In the "Environment" tab provide the classpath for the sources added in the project.
- Click on "Verify Classpath" button to validate the classpath.
- Classpath validation dialog will be launched and the classpath will be verified. A message saying
that the classpath specified is correct should be displayed. Click on the "OK" button.
Click on the Next button.
- In the "Target" tab select project type as "LOCAL".
- Provide the working folder. Working folder is that folder from where you want to run your application,
this is specially useful when you are using relative paths in your application to fetch various
things like images etc.
- Specify the Main Class and Main Class arguments (if any).
- Select the "Launch target application automatically" checkbox. Click on the Finish button.
- A confirmation message saying that the project is saved will be displayed. Click on the OK button.
Now using this common project we will create tests to demonstrate the
functionalities of AppPerfect Java Profilfer product.
AppPerfect Java Profiler
The steps henceforth will be same in case of Server and Local profiling, hence
please refer to the Profiling Server Application for further details.