JODconverter error android

I want to know how to make file conversions on android using Jodconverter library. I see a lot of examples and questions but all are based on java and not answering android specific questions not even the official website. Though I did see the owner himself has used the library in one android app he released so its possible to make conversions on android with JODconverter.

The code is below from official site with android version:

OfficeManager officeManager = new DefaultOfficeManagerConfiguration().buildOfficeManager();   
officeManager.start();   
OfficeDocumentConverter converter = new OfficeDocumentConverter(officeManager);   
try{  
    converter.convert(new File("/sdcard/tsxt.doc"), new File("/sdcard/tsx465t.docx"));   

}catch(Exception e){  
    e.printStackTrace();  
}  
officeManager.stop(); 

Logcat output of crash I get at run time on including all libraries except unoil library (because adding unoil gives me Conversion to Dalvik failed error):

06-28 05:28:50.086: E/AndroidRuntime(28629): FATAL EXCEPTION: main
06-28 05:28:50.086: E/AndroidRuntime(28629): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.jopendocs/com.example.jopendocs.JODActivity}: java.lang.IllegalStateException: officeHome not set and could not be auto-detected
06-28 05:28:50.086: E/AndroidRuntime(28629):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2246)
06-28 05:28:50.086: E/AndroidRuntime(28629):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2296)
06-28 05:28:50.086: E/AndroidRuntime(28629):    at android.app.ActivityThread.access$700(ActivityThread.java:151)
06-28 05:28:50.086: E/AndroidRuntime(28629):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1281)
06-28 05:28:50.086: E/AndroidRuntime(28629):    at android.os.Handler.dispatchMessage(Handler.java:99)
06-28 05:28:50.086: E/AndroidRuntime(28629):    at android.os.Looper.loop(Looper.java:137)
06-28 05:28:50.086: E/AndroidRuntime(28629):    at android.app.ActivityThread.main(ActivityThread.java:5293)
06-28 05:28:50.086: E/AndroidRuntime(28629):    at java.lang.reflect.Method.invokeNative(Native Method) 
06-28 05:28:50.086: E/AndroidRuntime(28629):    at java.lang.reflect.Method.invoke(Method.java:511)
06-28 05:28:50.086: E/AndroidRuntime(28629):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
06-28 05:28:50.086: E/AndroidRuntime(28629):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
06-28 05:28:50.086: E/AndroidRuntime(28629):    at dalvik.system.NativeStart.main(Native Method) 
06-28 05:28:50.086: E/AndroidRuntime(28629): Caused by: java.lang.IllegalStateException: officeHome not set and could not be auto-detected
06-28 05:28:50.086: E/AndroidRuntime(28629):    at org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration.buildOfficeManager(DefaultOfficeManagerConfiguration.java:163)
06-28 05:28:50.086: E/AndroidRuntime(28629):    at com.example.jopendocs.JODActivity.onCreate(JODActivity.java:22)
06-28 05:28:50.086: E/AndroidRuntime(28629):    at android.app.Activity.performCreate(Activity.java:5250)
06-28 05:28:50.086: E/AndroidRuntime(28629):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
06-28 05:28:50.086: E/AndroidRuntime(28629):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2210)
06-28 05:28:50.086: E/AndroidRuntime(28629):    ... 11 more

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.