• Post Reply Bookmark Topic Watch Topic
  • New Topic

possible to set classpath easily using Manifest?  RSS feed

 
ps prasad
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does javac command recognizes the Class-Path entry in the Manifest.mf file of a jar file which is set in the class path. For example,
javac - classpath lib..jar -d . MyApp.java

where the Class-Path entry of Manifest.mf file will have log4j.jar etc jar file values.Now does the complier recognize log4j.jar throught these entries.

regards,
psprasad
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. That's exactly what the Class-Path entry in a manifest file is for.

Layne
 
ps prasad
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So far i was thinking the Option is applicable to java only. But u r saying that it it can be used for javac also. Thanks a lot layne. I shall try again with javac and jar file entries.
regard,
psprasad
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!