[ https://issues.apache.org/jira/browse/HADOOP-9205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13553909#comment-13553909 ]
Thomas Graves commented on HADOOP-9205: --------------------------------------- I ran a quick job using jdk1.7.0_10 and it loads the native libraries fine. This was using jdk1.7.0_10 for execution, jars were still built with jdk1.6. Also I tried to reproduce with method you stated. On trunk I wasn't able to reproduce. Note I built all source code with jdk1.7.0_10 and then ran the test. I did have to create a symlink from hadoop-common-project/hadoop-common/target/native/target/usr/local/lib/libhadoop.so to hadoop-common-project/hadoop-common/target/native/target/usr/local/lib/libhadoop.so.1.0.0. I'm not sure what happened to libhadoop.so I'll have to investigate. I need to look at the jdk release notes in more detail but at a glance it says "Java applications invoking JDK 7 from a legacy JDK must be careful to clean up the LD_LIBRARY_PATH environment variable before executing JDK 7" which makes me wonder if it applies. > Java7: path to native libraries should be passed to tests via > -Djava.library.path rather than env.LD_LIBRARY_PATH > ----------------------------------------------------------------------------------------------------------------- > > Key: HADOOP-9205 > URL: https://issues.apache.org/jira/browse/HADOOP-9205 > Project: Hadoop Common > Issue Type: Bug > Affects Versions: 3.0.0, 2.0.3-alpha, 0.23.6 > Reporter: Ivan A. Veselovsky > Assignee: Ivan A. Veselovsky > Attachments: HADOOP-9205.patch > > > Currently the path to native libraries is passed to unit tests via > environment variable LD_LIBRARTY_PATH. This is okay for Java6, but does not > work for Java7, since Java7 ignores this environment variable. > So, to run the tests with native implementation on Java7 one needs to pass > the paths to native libs via -Djava.library.path system property rather than > the LD_LIBRARY_PATH env variable. > The suggested patch fixes the problem via setting the paths to native libs > using both LD_LIBRARY_PATH and -Djava.library.path property. This way the > tests work equally on both Java6 and Java7. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira