Book a Demo

Author Topic: general setup for debugging Java applications  (Read 3591 times)

ericdunn

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
general setup for debugging Java applications
« on: October 25, 2010, 05:51:20 am »
Hi everyone,

Could someone please explain in detail (each parameter) what the following line means. I especially don't
know what the "-D" means.

jre=c:\Program Files\Java\dk1.6.0_03,-Djava.class.path=%classpath1603%;c\benchmark\java\example1

The entire article is here:

http://www.sparxsystems.com/enterprise_architect_user_guide/8.0/software_development/general_setup_for_java.html

Thank you!

Eric

mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Re: general setup for debugging Java applications
« Reply #1 on: October 25, 2010, 09:05:48 am »
jre is the java runtime environment (and virtual machine) that EA will execute your application in. You may have several runtime environments , representing several versions of the java spec, on your machine so this option allows you to specify exactly which one you need to use.

The -D section are command line arguments that are passed to the virtual machine itself (not your application). The -D command line parameter is a standard java virtual machine feature, so please check the java virtual machine documentation for it.

This particular vm command line argument -Djava.class.path advises the virtual machine where it can load class files from when your application requests them (this parameter is normally passed through automatically by IDEs such as Eclipse or Net Beans). As the java debug information does not contain the paths to the source files that are being debugged, EA requires that you also provide the path to any source files in the classpath argument so that it can open the correct files up when a breakpoint is hit.
« Last Edit: October 25, 2010, 09:07:15 am by mfraser »
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8

ericdunn

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: general setup for debugging Java applications
« Reply #2 on: October 27, 2010, 10:09:48 am »
Michael,

Thank you so much for your reply!

Could you kindly direct me to which specific java virtual machine documentation that contains the -D command line parameter. Also please direct me to more documentation on JRE.

I like the way the Enterprise Architect user guide is organized, but wish that it provided more detailed examples to make things more clear.

Thank you inadvance!

Eric
« Last Edit: October 27, 2010, 10:10:40 am by ericdunn »

mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8

ericdunn

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: general setup for debugging Java applications
« Reply #4 on: October 28, 2010, 12:54:23 pm »
Thank you so much Michael!