I’m trying to convert a version 401 binary dictionary -- a directory called PersonalizationDictionary.en_US.dict -- to human readable .xml.
The command line utility dicttool_aosp in packages/inputmethods/LatinIME/tools/dicttool can do it like so:
dicttool_aosp makedict -s sourcedict.dict -x output.xml
I’m unable to compile the Android Lollipop version of dicttool, since dicttool has native C++ dependencies that don’t play nice with my Mac. Note this line in the NativeLib.mk file of dictool:
HACK: Temporarily disable host tool build on Mac until the build system is ready for C++11.
I am hoping someone with a compatible setup can compile this utility for me using “make dicttool_aosp” from the root of the AOSP source tree. I've spent the past few days looking for compiled versions of it, and while I’ve found many makedict.jar files online, they are too old to support my newer V401 binary dictionary. The main difference between the V401 and older versions is that a V401 is split up into multiple files with extensions like .bigrams, .freq, .header, whereas the older dicts are contained in a single file.
Thank you, please let me know if I can clarify anything!
Related
Tell me, why that if I unzip mylib.aar, the class format of Smeagol.class is of that of Java 8 format. But, if I include this mylib.aar into a freshly created empty activity Android project (latest android studio bumblebee), in build.gradle by implementation ('libs/mylib.aar') , such that I build a signed-released myapp.apk. Then, if I unzip this myapp.apk, the class format of Smeagol.class is now of a Java 6.0. In the fresh generated empty activity in Android studio, it has compilerOptions both in source and target set to VERSION_1_8.
So the bytecode class format, is not fixed in the aar?
PS: I used the opensource tool d2j-dex2jar.sh to convert myapp.apk to myapp.jar and then I unzip myapp.jar, thereby. Is this affecting it?
update: I also notice the presence of Smeagol$$ExternalSyntheticLambda69.class having bytecode format of a Java 6.0. So it seems, the IDE is doing its best to re-encode the lambda portions into Java 6.0 equivalent machine code. I get the point now that aar class bytecode format is not final, and still yet subject for re-encoding by the one who will generate the apk. Can somebody please led me to an explanation of these mysteries. Thanks.
I have ElementaryOS installed. I am running Processing IDE in the terminal by running ./processing in the processing-3.3.4 directory. I'm getting this error:
java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
This is a known issue that is being worked on. As of this moment, it doesn't look like they have released a fix, so I would try the previous version.
In the future, I recommend searching with Google for the specific error you're getting before posting to a forum. It can be hard to know what to search for, so here's an explanation of my process.
First I tried searching for "elementary os" processing cannot open shared object file "libjli.so" but since that didn't give me anything obvious, I assumed that this is not a widespread problem with Elementary OS. Note that I put quotes around "elementary os" and "libjli.so". This ensures that Google treats these as phrases, so pages with the word "elementary" and the word "os" will not match unless those two words are side-by-side.
Next I searched for processing ide cannot open shared object file "libjli.so" which gave me a link to the main Issues page on the github project. On that page, I searched for libjli.so which gave me one result, which is the issue I linked here.
I hope that helps you in the future.
Download Java SE Development Kit 8u192 in your home directory (click "Accept License Agreement")
Extract (in terminal):
tar xzvf ~/jdk-8u192-linux-x64.tar.gz
Create the symbolic links:
sudo ln -s -f ~/jdk1.8.0_192/bin/* /usr/bin/
Test:
java -version
When I try to extract apk file through apktool api, related extract process never finishes. Same code works well for Java projects. But when I use it inside Android application through virtual device, extract process never finishes.
Here is the code that I use:
ApkDecoder decoder = new ApkDecoder();
decoder.setApkFile(apkFile);
decoder.setOutDir(outputPath);
decoder.decode();
As I said on IRC.
It won't work. There are 2 dependencies in Apktool that
won't work on Android. Yaml and some java 7 code.
Thats why it works fine on Java, but not in Android environment. Bug for java7 code, and the bug for Yaml.
Yaml is only used for parsing out the apktool.yml file, which is needed for recompile. Java 7 features were introduced for SmaliDebugging and NIO2 aids. If neither are needed, you could recompile the apktool binary without those two. (Of course then missing those features)
It may be useful for you: online version of the apktool is available here: www.javadecompilers.com/apktool
Hope, it would help you to decompile the application without installation of the numerous prerequisites.
Update: The problem was solved with the help of MathWorks. I've published the answer below.
I need to control a program (Zemax) from Matlab. Unfortunately, Zemax only supports DDE for such control, which Matlab does not support any more. It works, but stops working on 64 bit platform after a few (presumable 63) DDE calls.
I wonder if there are working solutions. I could probably program a DLL with correct DDE support and then use DDE in Matlab via this DLL. This is a major effort for me. A more suitable solution would be to use Java DDE methods. Following another post here, I've discovered the JDDE library. However I cannot make it work: Even if I am in the directory with the DLL and JAR files, executing
import pretty-tools.JDDE-2.0.3.*
works fine but calling
a = com.pretty_tools.dde.client.DDEClientConversation()
afterwards (as done here) results in
Undefined variable "com" or class "com.pretty_tools.dde.client.DDEClientConversation".
I have very limited writing privileges on my PC, so I have added the javaclasspath.txt file with the jar/dll location to the directory indicated by prefdir. The file looks like this:
C:\Users\xxxxxxxx\Documents\matlab toolbox\jdde\pretty-tools-JDDE-2.0.3.jar
Calling javaclasspath shows a long listing with the last lines being:
...
C:\Program Files\MATLAB\R2012b\java\jarext\webservices\ws_client_core\mw-service-client-core.jar
C:\Users\kkarapet\Documents\matlab toolbox\jdde\pretty-tools-JDDE-2.0.3.jar
DYNAMIC JAVA PATH
<empty>
So path seems to be set correctly. What am I doing wrong?
With the help of MathWorks support, I've found the answer. Here is how to make JDDE work with Matlab 2012b, without admin privileges:
Download and unpack JDDE files (DLLs and JAR) into some folder. Let's say it's $path-to-jdde$\.
In Matlab, type prefdir. Open the resulting directory and create two files there, javaclasspath.txt and javalibrarypath.txt.
In javaclasspath.txt, add $path-to-jdde$\pretty-tools-JDDE-2.0.3.jar.
In javalibrarypath.txt, add $path-to-jdde$\.
Restart Matlab.
Now call ddeConv = com.pretty_tools.dde.client.DDEClientConversation; and start using the created object as described in JavaDoc. E.g. to connect to Zemax, run Zemax and then in call ddeConv.connect('Zemax', 'abc').
Step 2 above can only be done starting Matlab version R2012b. With an older version, if you have the write rights on the Matlab installation directory, you should be able to replace step 2 by editing the files librarypath.txt and classpath.txt in $MATLABROOT$\toolbox\local. I could not verify it so if you confirm it please let me know in the comment below.
Edit 01.02.2012:
FWIW: 4.7.0 linux packages are broken AFAIK, they
can be fixed or 4.6 packages used instead...
No need to use
custom Qt for Jambi – Smar 2 days ago
Thanks to SMAR, I was finally able to resolve this
issue by downloading the an older version of
qtjambi 4.6.3 ( http://qt-jambi.org/downloads/ ). The only problem was that the
designer did not know where to find my jvm which
I solved by adding these two entries to /etc/bash.bashrc:
# custom PATH exports
export JAVA_HOME=/usr/lib/jvm/java-6-sun
PATH=$PATH:$JAVA_HOME/bin
Then I just had to run (everything was in the qtjambi-folder):
designer.sh --> save it as .jui --> convert it with juic into a .java file --> and load it with netbeans :)
Hope this is somehow helpful to others too.
Thanks for the great and fast help!
Original post:
Good evening,
I am not completely sure if this topic is enough about programming but I am having some problems setting up Qtjambi. I have followed a lot of "howtos" and instructions so I am a little confused about what to do next. Qtjambi works as I have written a example program with netbeans. Although I have created some ui files that I want to implement which doesnt work.
I am trying to get this to run for like a week and I really need this because of my finals in 2 months. I try to give as much useful details as possible.
I am using LinuxMint (ubuntu derivate), downloaded qtjambi v 4.7.0
after trying out
bash qtjambi.sh
I got an error of mismatching versions
Cannot mix incompatible Qt library (version 0x40704) with this library (version 0x40700)
So I downloaded, compiled and installed
qt-everywhere-opensource-src-4.7.0 to /usr/local/Trolltech/Qt-4.7.0/
I know that I have to tell the system where to find all the binarys so I added to the /etc/bash.bashrc
#custom PATH exports
PATH=$PATH:/home/michi/Scripts
PATH=$PATH:/usr/local/Trolltech/Qt-4.7.0/bin/
export LD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.7.0/lib
export QT_PLUGIN_PATH=/usr/local/Trolltech/Qt-4.7.0/plugins
JAVA_DIR=/usr/lib/jvm/java-6-sun-1.6.0.26/
export JAMBI_PATH=/usr/local/lib/qtjambi-linux64-community-4.7.0/
I followed through the instructions of:
http://www.davidlauzon.net/2010/01/getting-started-with-qt-jambi-on-linux/
Which generally talks about getting jambi-designer to work.
http://jpnurmi.kapsi.fi/blog/2008/03/16/how-to-switch-qt-version-in-ubuntu/
How to manage multiple Qt versions.. These commands worked but had no effect
I finally gave up on trying to run the designer and tried to "convert" the .ui files to .jui files with the program juic which is located in the qtjambi/bin folder. But also here I get an error:
michi#BALMORA ~/Documents/unterlagen/pr_scw/Qt/Qtrainer/test $ which juic
/usr/local/bin/juic
michi#BALMORA ~/Documents/unterlagen/pr_scw/Qt/Qtrainer/test $ juic -cp .
juic: no .jui files found in CLASSPATH
michi#BALMORA ~/Documents/unterlagen/pr_scw/Qt/Qtrainer/test $ /usr/locallib/qtjambi-linux64-community-4.7.0/bin/juic -cp .
juic: no .jui files found in CLASSPATH
It would be great if you could help/guide or redirect me to "better" instructions.
Michael Kargl