Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index

On 08/18/2016 03:51 PM, Zenaan Harkness wrote:
Got stuck needing a simple fix, for the following bug:

$ ... set up LO sdk as per ./setsdkenv_unix ...
$ cd sdk/examples/DevelopersGuide/FirstSteps
$ make FirstStepsExamples

$ make
"/usr/bin/java""/opt/l/libreoffice/program" -jar 
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/star/lib/loader/Loader$1
Caused by: java.lang.ClassNotFoundException:$1
   at java.lang.ClassLoader.loadClass(
   at sun.misc.Launcher$AppClassLoader.loadClass(
   at java.lang.ClassLoader.loadClass(
   ... 2 more
make: *** [] Error 1
Makefile:96: recipe for target '' failed

So this is a simple problem, the makefile includes most required files
into the jar file, but not the missing

Happened to get fixed just yesterday for LO 5.2.1, <> "Add missing Loader$1.class".

The current settings/ recipe includes each required file from the
same directory, one by one, but omits this one. Just adding all the
files from that dir (which are all needed to be in the jar file) is
better (will catch any additions/ removals in future versions

Here's the git diff patch which makes things work properly:

diff --git a/settings/ b/settings/
index 9fe1e79..ac2d4aa 100644
--- a/settings/
+++ b/settings/
@@ -82,12 +82,5 @@ JAVAMAKER="$(OO_SDK_HOME)/bin/javamaker"

-    -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/Loader.class$(SQM) \
-    -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/Loader$$Drain.class$(SQM) \
-    -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/Loader$$CustomURLClassLoader.class$(SQM) \
-    -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/Loader$$Drain.class$(SQM) \
-    -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/InstallationFinder.class$(SQM) \
-    -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/InstallationFinder$$StreamGobbler.class$(SQM) \
-    -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/WinRegKey.class$(SQM) \
-    -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/WinRegKeyException.class$(SQM) \
+    -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/$(SQM) \
     -C $(CLASSES_DIR) $(SQM)win/unowinreg.dll$(SQM)

If you need a different format, for this or future patches,
please let me know.

NOTE: Currently I'm just working in a local lo sdk directory created
from the distribution tar file. I intend to clone a full sdk repo when I
have adequate network access to do so. IN OTHER WORDS, the git hashes
above are most likely incorrect/ not related to the actual repo - please
tell me how to create a "repo neutral" patch.

Yeah, your fix looks much better indeed. Please see <> for how to send a patch for review.

To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.