Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine "repackaged" package

What is the purpose of the classes in this package?

I want to use Base64 encoding in my app. As I'm typing away in Eclipse, I am prompted if I want to import a class called "com.google.appengine.repackaged.com.google.common.util.Base64"

I can't find any documentation about what this class does. No javadoc, or no mention in the Google App Engine manual (that I can see). Is this some kind of "hidden" API that I'm not supposed to have access to?

like image 714
bpapa Avatar asked Aug 04 '09 03:08

bpapa


1 Answers

Is this some kind of "hidden" API that I'm not supposed to have access to?

Yes.

The purpose of repackaging Java classes is to have a private copy of a library that otherwise might conflict with another version of that some library (that the application developer adds to his project as a jar file).

It is one possible answer to JAR-hell.

Even the JDK makes use of this mechanism, e.g. with com.sun.org.apache.xerces which is an XML parsing library developed by the Apache Project that Sun choose to include (repackaged).

Do not call these classes directly. (You could, and they would probably work okay, but as they are not part of the official API, they could disappear in the next version).

like image 126
Thilo Avatar answered Nov 18 '22 09:11

Thilo