• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Doubt on "compiling with javac"

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In kathy sierra book.They have mentioned about -classpath as one of option can be given in javac compiler .They have mentioned about this in an line as example :
javac -classpath com:. -g Foo.java Bar.java

They have told like here we pass a compiler 2 options .iam not clear what it does option does. Can anyone explain me about this -classpath and -g along with example or in detail.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
-classpath com:. tells the compiler to look in the com package (under the current directory) as well as the current directory (the "." means current directory) for classes that Foo.java and Bar.java need to compile.

-g tells the compiler to generate debug information.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the tool documentation for javac.

Also, just typing "javac" without any other arguments gives you a short overview of the options that are available.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!