Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes java lib loading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java lib loading" Watch "java lib loading" New topic
Author

java lib loading

Yi Meng
Ranch Hand

Joined: May 07, 2003
Posts: 270
If a have a jar file on my classpath, but i rename it such that the suffix is not .jar, e.g abc.jar_old, abc.zip, abc.txt .... etc, will it still be loaded as a java lib?

Where can i find answer of such question?

Thanks in advance.


Meng Yi
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24189
    
  34

The default Java class loader will only consider .zip, .jar, and .class files; it will ignore everything else.


[Jess in Action][AskingGoodQuestions]
Yi Meng
Ranch Hand

Joined: May 07, 2003
Posts: 270
Originally posted by Ernest Friedman-Hill:
The default Java class loader will only consider .zip, .jar, and .class files; it will ignore everything else.


where can i find such kind of info? JVM SPEC? Java language spec?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java lib loading
 
It's not a secret anymore!