Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure absolute path is used for library extraction and loading #16

Merged
merged 1 commit into from
Oct 7, 2014

Conversation

NJAldwin
Copy link

@NJAldwin NJAldwin commented Oct 7, 2014

System#load requires an absolute path. If the extraction
directory (library.${name}.path or java.io.tmpdir) is relative, the
extraction will succeed, but the System#load call will fail, resulting
in the library not being loaded. This commit rectifies that by
obtaining the absolute path to the directory before extracting. Now,
the extracted file will be referred to by its absolute path, which
should make the System#load call succeed.

[`System#load`][1] requires an absolute path.  If the extraction
directory (`library.${name}.path` or `java.io.tmpdir`) is relative, the
extraction will succeed, but the `System#load` call will fail, resulting
in the library not being loaded.  This commit rectifies that by
obtaining the absolute path to the directory before extracting.

[1]: http://docs.oracle.com/javase/7/docs/api/java/lang/System.html#load(java.lang.String)
chirino added a commit that referenced this pull request Oct 7, 2014
Ensure absolute path is used for library extraction and loading
@chirino chirino merged commit d10c4b0 into fusesource:master Oct 7, 2014
@chirino
Copy link
Member

chirino commented Oct 7, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants