• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Difference between -D and -X options while passing parameters to JVM.  RSS feed

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In maven we use maven_opts to pass parameters to the Java VM.

E.g. : set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000

I am aware of the -D option. It is used to send the java system property. What exactly '-X' option represent?

I am aware of the -Xms, -Xmx options which are used to set the heap size.

In the above example what exaclty the line/point "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" represent or what is does?

Thanks in advance.

Regards,
Naresh.
 
Bartender
Posts: 20725
124
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
X stands for eXtension. Any "X" parameter is vendor-specific, and unlike the other options isn't guaranteed to be available on all JVM implementations - for example, IBM's jikes or the open-source IcedTea VMs.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So if -X for eXtension, what does -D stands for?
 
Tim Holloway
Bartender
Posts: 20725
124
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Mariana Costa wrote:So if -X for eXtension, what does -D stands for?



"define". I've used it in Kettle to pass in alternative package paths for custom plugins when I didn't want them in the main Kettle package hierarchy.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The -D is used to set system properties. Any Java code can then access any property so defined via System.getProperty().
 
author
Posts: 3281
7
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to Javaranch Mariana!
 
Mariana Costa
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:

Mariana Costa wrote:So if -X for eXtension, what does -D stands for?



"define". I've used it in Kettle to pass in alternative package paths for custom plugins when I didn't want them in the main Kettle package hierarchy.



Ah, "Define"! Very creative =)
Thanks Tom.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!