Permalink
Browse files

use "lzma." prefix for LZMA-compressed embedded jars

Previously, we used "lzma:", which worked fine on Windows (where the
path separator is ";") but not on Unix-style OSes (where the path
separator is ":").  In the latter case, the VM would parse
"[lzma:bootJar]" as a path containing two elements, "[lzma" and
"bootJar]", which is not what was intended.  So now we use "lzma." as
the prefix, which works on all OSes.
  • Loading branch information...
dicej committed Jan 19, 2014
1 parent c730a93 commit 66bd7e0814cb761c25425f46d61d574f058c391a
Showing with 2 additions and 2 deletions.
  1. +1 −1 README.md
  2. +1 −1 src/finder.cpp
View
@@ -503,7 +503,7 @@ compress the jar before generating the object:
boot.jar.lzma boot-jar.o _binary_boot_jar_start _binary_boot_jar_end \
${platform} ${arch}
-Note that you'll need to specify "-Xbootclasspath:[lzma:bootJar]"
+Note that you'll need to specify "-Xbootclasspath:[lzma.bootJar]"
instead of "-Xbootclasspath:[bootJar]" in the next step if you've used
LZMA to compress the jar.
View
@@ -566,7 +566,7 @@ class BuiltinElement: public JarElement {
virtual void init() {
if (index == 0) {
if (s->success(s->load(&library, libraryName))) {
- bool lzma = strncmp("lzma:", name, 5) == 0;
+ bool lzma = strncmp("lzma.", name, 5) == 0;
const char* symbolName = lzma ? name + 5 : name;
void* p = library->resolve(symbolName);

0 comments on commit 66bd7e0

Please sign in to comment.