I tried the following example in Eclipse and it works. I went through and configured setsdkenv_unix.sh.
https://api.libreoffice.org/examples/java/Text/SWriter.java
Yet, when I export the program as jar file and try to run the jar, it says that it can’t find the executable. What gives?
[brian@localhost pkg]$ java -jar simpleSwriter.jar
com.sun.star.comp.helper.BootstrapException: no office executable found!
at com.sun.star.comp.helper.Bootstrap.bootstrap(Bootstrap.java:338)
at com.sun.star.comp.helper.Bootstrap.bootstrap(Bootstrap.java:302)
at bookmarks.SWriter.main(SWriter.java:27)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Brian