julianwi / javainstaller

an android application to install a full java runtime on a phone.
GNU General Public License v3.0
37 stars 9 forks source link

incompatible with versions >= 1.0.66 of jackpal's Terminal Emulator for Android #7

Closed guillaume-d closed 9 years ago

guillaume-d commented 9 years ago

After everything has been downloaded, an error alert box saying only "java.lang.NoSuchMethodException: createSubprocess" appears and it does not go further from here. It might also have happened earlier: sorry, I did not pay much attention at that time as the download process resumed correctly every time after all the many interruptions (connection and device memory problems on my side).

AFAICS https://github.com/jackpal/Android-Terminal-Emulator/commit/13a90130e1a4bdb351aabc31952f28a0302b5d7e made the API-breaking change (look there in the "*Exec.java" files at least for "createSubprocess"). (jackpal's Terminal Emulator 1.68 was installed before starting the Java Installation.)

Also in the Settings' Install section changing "run install.sh in" to "Run Activity" from "Terminal Emulator" did not change anything.

A cursory look at Java installer's code seems to indicate the same will happen also when running Java programs (not only when installing Java).

As a first stop-gap measure maybe the missing method exception should be caught and a clearer warning be given instead.

julianwi commented 9 years ago

I see, the APIs moved to the new library libtermexec. This should be easy to fix. I will try it when I have time.

julianwi commented 9 years ago

It was more complicated than I thought, because the createSubprocess method is not public anymore. So I had to use the TermExec.start method which can not be called from the main thread. But now everything should work.

guillaume-d commented 9 years ago

I could finally test it with F-Droid's 0.5.1 build (GitHub's APK refused to install itself for some reason): it seems to work great (with 1.0.70), many thanks! :+1:

Maybe 0.5.1 only working with versions >= 1.0.66 of jackpal's Terminal Emulator for Android should be documented somewhere though.