diff options
3 files changed, 25 insertions, 25 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/build_messages.properties b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/build_messages.properties index 8ba43d4..3db447d 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/build_messages.properties +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/build_messages.properties @@ -48,10 +48,10 @@ DexWrapper_Unable_To_Execute_Dex_s=Unable to execute dex: %1$s DexWrapper_SecuryEx_Unable_To_Find_API=SecurityException: Unable to find API for dex.jar DexWrapper_SecuryEx_Unable_To_Find_Method=SecurityException: Unable to find method for dex.jar DexWrapper_SecuryEx_Unable_To_Find_Field=SecurityException: Unable to find field for dex.jar -ApkBuilder_UnableBuild_Dex_Not_loaded=Unable to build: the file dex.jar was not loaded from the SDK folder\! +ApkBuilder_UnableBuild_Dex_Not_loaded=Unable to build: the file dx.jar was not loaded from the SDK folder\! ApkBuilder_Using_Default_Key=Using default debug key to sign package ApkBuilder_Using_s_To_Sign=Using '%1$s' to sign package -ApkBuilder_Signing_Key_Creation_s=Signing Key Creation: +ApkBuilder_Signing_Key_Creation_s=Signing Key Creation: ApkBuilder_Unable_To_Gey_Key=Unable to get debug signature key ApkBuilder_Certificate_Expired_on_s=Debug certificate expired on %1$s\! ApkBuilder_Packaging_s=Packaging %1$s diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/DexWrapper.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/DexWrapper.java index 9981b14..a5c19c6 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/DexWrapper.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/DexWrapper.java @@ -34,18 +34,18 @@ import java.net.URL; import java.net.URLClassLoader; /** - * Wrapper to access dex.jar through reflection. + * Wrapper to access dx.jar through reflection. * <p/>Since there is no proper api to call the method in the dex library, this wrapper is going * to access it through reflection. */ public final class DexWrapper { - + private final static String DEX_MAIN = "com.android.dx.command.dexer.Main"; //$NON-NLS-1$ private final static String DEX_CONSOLE = "com.android.dx.command.DxConsole"; //$NON-NLS-1$ private final static String DEX_ARGS = "com.android.dx.command.dexer.Main$Arguments"; //$NON-NLS-1$ - + private final static String MAIN_RUN = "run"; //$NON-NLS-1$ - + private Method mRunMethod; private Constructor<?> mArgConstructor; @@ -56,14 +56,14 @@ public final class DexWrapper { private Field mConsoleOut; private Field mConsoleErr; - + /** * Loads the dex library from a file path. - * + * * The loaded library can be used via * {@link DexWrapper#run(String, String[], boolean, PrintStream, PrintStream)}. - * - * @param osFilepath the location of the dex.jar file. + * + * @param osFilepath the location of the dx.jar file. * @return an IStatus indicating the result of the load. */ public synchronized IStatus loadDex(String osFilepath) { @@ -74,28 +74,28 @@ public final class DexWrapper { Messages.DexWrapper_s_does_not_exists, osFilepath)); } URL url = f.toURL(); - + URLClassLoader loader = new URLClassLoader(new URL[] { url }, DexWrapper.class.getClassLoader()); - + // get the classes. Class<?> mainClass = loader.loadClass(DEX_MAIN); Class<?> consoleClass = loader.loadClass(DEX_CONSOLE); Class<?> argClass = loader.loadClass(DEX_ARGS); - + try { // now get the fields/methods we need mRunMethod = mainClass.getMethod(MAIN_RUN, argClass); - + mArgConstructor = argClass.getConstructor(); mArgOutName = argClass.getField("outName"); //$NON-NLS-1$ mArgJarOutput = argClass.getField("jarOutput"); //$NON-NLS-1$ mArgFileNames = argClass.getField("fileNames"); //$NON-NLS-1$ mArgVerbose = argClass.getField("verbose"); //$NON-NLS-1$ - + mConsoleOut = consoleClass.getField("out"); //$NON-NLS-1$ mConsoleErr = consoleClass.getField("err"); //$NON-NLS-1$ - + } catch (SecurityException e) { return createErrorStatus(Messages.DexWrapper_SecuryEx_Unable_To_Find_API, e); } catch (NoSuchMethodException e) { @@ -114,7 +114,7 @@ public final class DexWrapper { String.format(Messages.DexWrapper_Failed_to_load_s, osFilepath), e); } } - + /** * Runs the dex command. * @param osOutFilePath the OS path to the outputfile (classes.dex @@ -127,26 +127,26 @@ public final class DexWrapper { */ public synchronized int run(String osOutFilePath, String[] osFilenames, boolean verbose, PrintStream outStream, PrintStream errStream) throws CoreException { - + try { // set the stream mConsoleErr.set(null /* obj: static field */, errStream); mConsoleOut.set(null /* obj: static field */, outStream); - + // create the Arguments object. Object args = mArgConstructor.newInstance(); mArgOutName.set(args, osOutFilePath); mArgFileNames.set(args, osFilenames); mArgJarOutput.set(args, false); mArgVerbose.set(args, verbose); - + // call the run method Object res = mRunMethod.invoke(null /* obj: static method */, args); - + if (res instanceof Integer) { return ((Integer)res).intValue(); } - + return -1; } catch (IllegalAccessException e) { throw new CoreException(createErrorStatus( @@ -159,11 +159,11 @@ public final class DexWrapper { String.format(Messages.DexWrapper_Unable_To_Execute_Dex_s, e.getMessage()), e)); } } - + private static IStatus createErrorStatus(String message, Exception e) { AdtPlugin.log(e, message); AdtPlugin.printErrorToConsole(Messages.DexWrapper_Dex_Loader, message); - + return new Status(IStatus.ERROR, AdtPlugin.PLUGIN_ID, message, e); } } diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkConstants.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkConstants.java index c22bbba..e3f20f3 100644 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkConstants.java +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkConstants.java @@ -101,7 +101,7 @@ public final class SdkConstants { /** Skin layout file */ public final static String FN_SKIN_LAYOUT = "layout";//$NON-NLS-1$ - /** dex.jar file */ + /** dx.jar file */ public static final String FN_DX_JAR = "dx.jar"; //$NON-NLS-1$ /** dx executable (with extension for the current OS) */ |