## Starting remote sessions |

| To start your application or application server in such a way that you can connect to it with a remote session from JProfiler's GUI front end, the following steps are required: Adjust your startup command Add the following command line parameters to your startup command: A VM parameter that tells the VM to load the profiling agent: Java <= 1.4.2 (JVMPI) `-Xrunjprofiler` Java >= 1.5.0 (JVMTI) `-agentlib:jprofilerti` A VM parameter that adds JProfiler-specific classes to the boot classpath: Windows `-Xbootclasspath/a:{JProfiler install directory}\bin\agent.jar` all other supported platforms `-Xbootclasspath/a:{JProfiler install directory}/bin/agent.jar` other JVM-specific options found in the remote session invocation table Adjust the native library path The native library path is an environment variable whose name depends on your operating system. Additionally, you have to specify a different directory if you are using a 64-bit JVM: Windows 32-bit Add `{JProfiler install directory}\bin\windows` to the `PATH` environment variable. 64-bit Add `{JProfiler install directory}\bin\windows-x64` to the `PATH` environment variable. Linux 32-bit Add `{JProfiler install directory}/bin/linux-x86` to the `LD_LIBRARY_PATH` environment variable. 64-bit Add `{JProfiler install directory}/bin/linux-x64` to the `LD_LIBRARY_PATH` environment variable. Solaris SPARC 32-bit Add `{JProfiler install directory}/bin/solaris-sparc` to the `LD_LIBRARY_PATH` environment variable. 64-bit Add `{JProfiler install directory}/bin/solaris-sparcv9` to the `LD_LIBRARY_PATH` environment variable. Solaris x86 32-bit Add `{JProfiler install directory}/bin/solaris-x86` to the `LD_LIBRARY_PATH` environment variable. 64-bit Add `{JProfiler install directory}/bin/solaris-x64` to the `LD_LIBRARY_PATH` environment variable. Mac OS Add `{JProfiler install directory}/bin/macos` to the `DYLD_LIBRARY_PATH` environment variable. HP-UX 32-bit Add `{JProfiler install directory}/bin/hpux-parisc` to the `SHLIB_PATH` environment variable. 64-bit Add `{JProfiler install directory}/bin/hpux-parisc64` to the `SHLIB_PATH` environment variable. AIX 32-bit Add `{JProfiler install directory}/bin/aix-ppc` to the `LIBPATH` environment variable. 64-bit Add `{JProfiler install directory}/bin/aix-ppc64` to the `LIBPATH` environment variable. The remote session invocation table shows the complete commands for all supported JVMs.

| Please note that the profiling interfaces JVMPI and JVMTI only run with the standard garbage collection. If you have VM parameters on your command line that change the garbage collector type such as `-Xincgc` `-XX:+UseParallelGC` `-XX:+UseConcMarkSweepGC` `-XX:+UseParNewGC` please make sure to remove them. It might be a good idea to remove all `-XX` options if you have problems with profiling.

| If you start your application from an ant build file, you can use the ant task to easily profile your application.