• Forums
    • Public Forums
      • Community Connect
      • Dynatrace
        • Dynatrace Open Q&A
      • Application Monitoring & UEM
        • AppMon & UEM Open Q&A
      • Network Application Monitoring
        • NAM Open Q&A
  • Home /
  • Public Forums /
  • Application Monitoring & UEM /
  • AppMon & UEM Open Q&A /
avatar image
Question by Urs L. · Oct 22, 2013 at 05:41 PM ·

How can I start a Java client via webstart with dynaTrace?

Hi

I’m trying to install the dynaTrace agent with a fat-client. This client is started via jnlp file. All my trials faild. The client was started always without dynaTrace.

Does anybody have some experienses in this subject? How do I have to setup the configuration?

All the following I tried already:

Versions:

java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b16)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)

DynaTrace Server 5.0

I downloaded the agent from

https://downloads.compuwareapm.com/downloadglb/DownloadFile.aspx?file=ad6adbb9-b2c8-46de-80a1-ac263771fc92

(All dynaTrace Agents for Windows)

and installed only the Java components.

Trial 1: Straigth forward

Adapting  java-vm-args in the JNLP files

  <resources>

    <j2se version='1.7' initial-heap-size='256m' max-heap-size='512m' java-vm-args= -XX:MaxPermSize=256m -agentpath:"C:\Program Files U80796706\dynaTrace\dynaTrace Agent 5.0.0\agent\lib\dtagent.dll"=name=CLIENT,server=dtserveri.admin.ch:9999,logpath="C:\Program Files U80796706\dynaTrace\dynaTrace Agent 5.0.0\log",loglevel=error />

According to the syntax guide for jnlp file the parameter agentpath is not supported in java-vm-args

http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/developersguide/syntax.html#resources

Trial 2: Environment variable

According to the document „Troubleshooting Guide for Java SE 7 Desktop Technologies“ chapter 7.1.4 „ Passing parameters to the JRE “

http://docs.oracle.com/javase/7/docs/webnotes/tsg/TSG-Desktop/html/plugin.html

it should be possible to define startup parameters be the environment variable JAVAWS_VM_ARGS. So I executed the following commands in a dos shell:

set JAVAWS_VM_ARGS = -agentpath:"C:\Program Files U80796706\dynaTrace\dynaTrace Agent 5.0.0\agent\lib\dtagent.dll"=name=CLIENT,server=dtserver.admin.ch:9999,logpath="C:\Program Files U80796706\dynaTrace\dynaTrace Agent 5.0.0\log",loglevel=error

"Program Files\Java\jre7\bin\javaws.exe" "\\adb.intra.admin.ch\userhome$\BIT-01\U80796706\config\Desktop\client.jnlp"

unfortunatly again without success

Trial 3: -J Parameter

Again according to the above mentioned document the –J parameter may be used when calling javaws

"Program Files\Java\jre7\bin\javaws.exe" "\\adb.intra.admin.ch\userhome$\BIT-01\U80796706\config\Desktop\client.jnlp" -J-agentpath:"C:\Program Files U80796706\dynaTrace\dynaTrace Agent 5.0.0\agent\lib\dtagent.dll"=name=CLIENT,server=dtserver.admin.ch:9999,logpath="C:\Program Files U80796706\dynaTrace\dynaTrace Agent 5.0.0\log",loglevel=error

and the same again, it does not work

The Java console was activated, but I didn’t got any hint on what is going wrong.

 

Comment

People who like this

0 Show 0
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

3 Replies

  • Sort: 
  • Most voted
  • Newest
  • Oldest
avatar image

Answer by Martin W. · Oct 24, 2013 at 11:39 AM

Hi!

I want to share my experiences concerning your 2nd attempt using environment variables.

The javaws process that is initially launched spawns another java process (not "javaws"). I guess that the new java process doesn't apply options set by JAVAWS_VM_ARGS since it's no javaws process.

But you can use the JAVA_TOOL_OPTIONS environment variable instead. In the shell (or script) you can use the following template:

set AGENT_NAME=CLIENT
set SERVER_ALIAS=dtserver.admin.ch
set SERVER_PORT=9999
set DT_AGENT_LIB=C:\Program Files U80796706\dynaTrace\dynaTrace Agent 5.0.0\agent\lib\dtagent.dll

set JAVA_TOOL_OPTIONS="-agentpath:%DT_AGENT_LIB%=name=%AGENT_NAME%,server=%SERVER_ALIAS%:%SERVER_PORT%"

Afterwards you can launch the Web Start application from the shell (or script) and the agent will connect to your server.

Instead of launching the Web Start application directly you can also start the web browser via shell/script and start the Web Start application later manually by launching the JNLP file with your browser. The JAVA_TOOL_OPTIONS variable is passed to spawned processes.

Martin

 

Comment

People who like this

0 Show 1 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Urs L. · Oct 25, 2013 at 08:43 AM 0
Share

Hi Martin

Thanks for sharing your experiences. It's usefull to me.

Urs

avatar image

Answer by Urs L. · Oct 23, 2013 at 09:28 AM

Hi Wolfgang

Of course, the -J Parameter must stand before the path to the jnlp file. This way it works.

Thanks a lot,

Urs

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Wolfgang G. · Oct 23, 2013 at 08:37 AM

Hi,

the -J approach worked for me - although I have to admit I only tried it with the dynaTrace web start client. Starting it using

c:\Program Files (x86)\Java\jre7\bin>javaws -J-agentpath:"c:\Program Files\dynaTrace\dynaTrace 5.6.0\agent\lib\dtagent.dll"=name=dtClient,server=localhost:9998 http://localhost:8020/webstart/Client/client.jnlp

resulted in a dt_dtClient...log in the dynatrace\log directory. Are you getting any error messages or logs?

Thanks,

Wolfgang

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

How to get started

First steps in the forum
Read Community User Guide
Best practices of using forum

NAM 2019 SP5 is available


Check the RHEL support added in the latest NAM service pack.

Learn more

LIVE WEBINAR

"Performance Clinic - Monitoring as a Self Service with Dynatrace"


JANUARY 15, 3:00 PM GMT / 10:00 AM ET

Register here

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Forum Tags

dotnet mobile monitoring load iis 6.5 kubernetes mainframe rest api dashboard framework 7.0 appmon 7 health monitoring adk log monitoring services auto-detection uem webserver test automation license web performance monitoring ios nam probe collector migration mq web services knowledge sharing reports window java hybris javascript appmon sensors good to know extensions search 6.3+ server documentation easytravel web dashboard kibana system profile purelytics docker splunk 6.1 process groups account 7.2 rest dynatrace saas spa guardian appmon administration production user actions postgresql upgrade oneagent measures security Dynatrace Managed transactionflow technologies diagnostics user session monitoring unique users continuous delivery sharing configuration alerting NGINX splitting business transaction client 6.3 installation database scheduler apache mobileapp RUM php dashlet azure purepath agent 7.1 appmonsaas messagebroker nodejs 6.2 android sensor performance warehouse
  • Forums
  • Public Forums
    • Community Connect
    • Dynatrace
      • Dynatrace Open Q&A
    • Application Monitoring & UEM
      • AppMon & UEM Open Q&A
    • Network Application Monitoring
      • NAM Open Q&A