Question

Here's my problem: I'm working on a program which decompiles an APK file. It was working. After the previous Java Update my application is giving me an exception.

Please help me.

UPDATE:

  • New Java version - Version 7 Update 2

  • Stack trace:

    Exception in thread "main" java.lang.IllegalArgumentException: Executable name has embedded quote, split the arguments at java.lang.ProcessImpl.isQuoted(Unknown Source) at java.lang.ProcessImpl.getExecutablePath(Unknown Source) at java.lang.ProcessImpl.(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) at java.lang.ProcessBuilder.start(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at ro.etrandafir.mate.PC.decompile.StartingPoint.execute(StartingPoint.java:146) at ro.etrandafir.mate.PC.decompile.StartingPoint.main(StartingPoint.java:25)

  • Source code:

    try {
        Process p = Runtime.getRuntime().exec("\"" + apktoolBat
                .getAbsolutePath() + "\" d -s " + fn);
        BufferedReader br = new BufferedReader(
                new InputStreamReader(p.getInputStream()));
        String line = null;
        while ((line = br.readLine()) != null) {
            System.out.println("Apktool: " + line);
        }
    } catch (IOException e) {
        System.err.println("ERROR: Could not use APKTOOL!");
        e.printStackTrace();
        return;
    }
    

Thanks in advance!

Was it helpful?

Solution

This feature has been changed in the new java release. See oracles documentation of the feature change for more details.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top