• Post Reply Bookmark Topic Watch Topic
  • New Topic

java command  RSS feed

 
nagul samy
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

i came across a java command line arguments which is similar to this.... "C:\Program Files (x86)\Java\jdk1.6.0\bin\java" -jar framework/base/lib/ant-launcher-1.7.1.jar -lib framework/base/lib/ant
what actually this command does?? i know that - jar is used to start a jar but what about -lib ???
 
Nam Ha Minh
Ranch Hand
Posts: 515
Eclipse IDE Firefox Browser Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see the -lib option for java command. Maybe it's the argument of the program specified in JAR file.
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look through this link and see whether “lib” is a recognised option. I couldn’t find it either.
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's because it isn't. Only two of the arguments are handled by the JVM directly: -jar and framework/base/lib/ant-launcher-1.7.1.jar. This will launch the JVM with the main class from that JAR file. The other two arguments, -lib and framework/base/lib/ant, are sent as the arguments to the main method of the main class.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!