Ilya Zee

Greenhorn
+ Follow
since Nov 22, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ilya Zee


We're writing an app that performs some text processing. It can only work on raw UTF-8 text so we need some means of taking input files in common formats like RTF, DOC, PDF (with text) etc and extracting text from them. This text would then be passed to our app for processing.

I have been trying to port Tika and its parsers to Android with a lot of pain and little luck. A lot of incompatibilities of various 3rd party parser components... Then I remembered that when we wrote a similar app for the desktop a couple of years ago, we actually used OpenOffice (via a macro) to extract text by invoking OO as an external process.

So my question is this: do you know of a tool that (i) is not Tika; (ii) can extract Unicode text from common file formats and (iii) can somehow be forked off by our app so that we can pass the input files to it and then collect the extracted text?

By the way, even though this might be a topic for a separate question, but if you have successfully ported Tika to Android, can you let me know: I still have a glimmer of hope that it can be done.

Thanks much!
11 years ago
I am new to Android development and fairly new to Java altogether. I am trying to develop an Android app that uses some classes from an external JAR. I've run into a strange problem. I managed to reduce the amount of code to "toy" sizes and so now the external JAR is extremely simple: it contains a class that computes a square of a number and returns the result as a String:



The code of the app is basically "Hellow world++" based on the 1st app in the Android dev tutorial:



Now, here's the problem. I am developing for Android in Eclipse. However, if I also create the JAR in Eclipse by creating a regular Java project with the class, then exporting it into a jar file, and then add this JAR to the build path of the Android project, I get a run time exception that this class cannot be found.

If, on the other hand, I create the JAR in Netbeans and add that JAR to the build path (in Eclipse), all works well.

I actually unzipped both jars to compare contents. It appears that the difference is in .class files but they are not human readable so I can't get any further.

So my q is this: what can I change in the Eclipse export to make the external jar "good"? What is NB doing right that Eclipse is doing wrong? Or do I simply resort to building all my external JARs in NB? Is this a symptom of a badly installed Eclipse? If so, what components should I try to reinstall/fix?

Thanks much!!!
12 years ago