Its present in the rt.jar
. You can use the JarFinder to find jars and classes.
Its present in the lib
folder of jdk installation directory.
문제
When I need to get method signatures for android.content.ContextWrapper
, I go to
"C:\Program Files (x86)\Android\android-sdk\platforms\android-18" where android.jar is placed and then execute
javap -s -classpath android.jar android.content.ContextWrapper > out.txt
Now, I need to get method signatures for java.io.File
. How is corresponding .jar named?
해결책
Its present in the rt.jar
. You can use the JarFinder to find jars and classes.
Its present in the lib
folder of jdk installation directory.
다른 팁
This is rt.jar
from your JRE or JDK, namely inside lib
on the JRE. Given that you are using Windows, I would head to:
C:\program files\java\jdk1.7.0_25\jre\lib
for a JDK (changing the location to your JDK).
android.jar
also has that file, but the former should suffice for a non-android implementation.
As of Android SDK 16 (I haven't tested this in Android 18) android.jar
also has the java.io.File
class.
Try opening it as a ZIP file and see which files it has.
ContentWrapper
is in the android/content
folder.
File
exists in the java/io
folder.
Here are the first few lines of javap output for android.jar
java.io.File
Compiled from "File.java"
public class java.io.File implements java.io.Serializable, java.lang.Comparable<java.io.File> {
public static final char separatorChar;
Signature: C
public static final java.lang.String separator;
Signature: Ljava/lang/String;
public static final char pathSeparatorChar;
Signature: C
public static final java.lang.String pathSeparator;
Signature: Ljava/lang/String;
static final boolean $assertionsDisabled;
Signature: Z
int getPrefixLength();
Signature: ()I
public java.io.File(java.lang.String);
Signature: (Ljava/lang/String;)V
public java.io.File(java.lang.String, java.lang.String);
Signature: (Ljava/lang/String;Ljava/lang/String;)V
It is present in the java runtime library
of java version you are using. For me it is in
/home/aniket/jdk1.7.0_11/jre/lib/rt.jar
Check accordingly.