<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div>The jdk install image can be located anywhere, but cannot be split up.<div>All the executables and shared libraries have appropriate RUNPATH/RPATH entries using the $ORIGIN feature</div><div>so that at runtime, it locates itself and locates all other shared libraries from that location.</div><div>It can be built anywhere and installed anywhere, and these locations don't have to be the same place.</div><div>The jar files are found in a similar 'relative' way, so as long as you don't try and split things up, it should work fine.</div><div>You can't just move the java executable around and expect it to find everything else.</div><div><br></div><div>In general, the jdk image should not be broken up, it represents a tight unit that is known to work together and</div><div>the entire unit represents a particular jdk release. A system can have any number of jdk releases installed on it</div><div>and these are all separate units.</div><div>It is the jdk8 release that has a modularization plan, which should address some of this.</div><div><br></div><div>A few additional comments below...</div><div><br><div><div>On Jan 2, 2011, at 3:17 PM, Shea Levy wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p>Hi all,</p><p>I've just successfully built openjdk6, and am wondering about the best way to install it on my system, given that the /opt prefix is no longer obviously appropriate for the build. I have an install that works for now, but there are aspects I'm unhappy with. I am on a Linux From Scratch system, so I install everything into /usr (<a href="http://www.linuxfromscratch.org/blfs/view/svn/introduction/position.html">http://www.linuxfromscratch.org/blfs/view/svn/introduction/position.html</a>), but everything that follows should apply to /usr/local.</p><p>My set up for now:</p><p>I've copied build/linux-i586/bin/* to /usr/bin. No problems there.</p></blockquote><div><br></div>No you have problems already, this will not work.</div><div>And the image you really want is the build/linux-i586/j2sdk-image</div><div><br><blockquote type="cite"><p>I've copied build/linux-i586/lib/* to /usr/lib, but upon review I think it probably belongs in a separate /usr/lib/java/ since there aren't any .so files in the base of build/linux-1586/lib. If I try that, running /usr/bin/java complains of being unable to find libjli.so</p></blockquote><div><br></div>Expected problem, you can't split up bin and lib files.</div><div><blockquote type="cite"><p>I've copied build/linux-i586/classes/ to /usr. This is the most disconcerting, as I'd rather not add to the root of /usr and these files seem perfectly suited to fit in /usr/lib/java. If I try moving it there, running /usr/bin/java complains of having no class definition for Object.</p></blockquote>Don't use the classes directory, it's just a temp area where the jar files are built from.</div><div><br><blockquote type="cite"><p>I've copied build/linux-i586/j2sdk-image/man/man1/* to /usr/share/man/man1. No problems there, though it would be nice if there were a share directory in build/linux-i586/</p><p>I've copied build/linux-i586/include/* to /usr/include/java. No problems there.</p><p>I've copied build/linux-i586/docs/* to /usr/share/doc/openjdk-6-20b</p><p>Output of ldd /usr/bin/java:</p><p>linux-gate.so.1 => (0xb77b6000)<br> libpthread.so.0 => /lib/libpthread.so.0 (0xb7793000)<br> libjli.so => /usr/bin/../lib/i386/jli/libjli.so (0xb778a000)<br> libdl.so.2 => /lib/libdl.so.2 (0xb7786000)<br> libc.so.6 => /lib/libc.so.6 (0xb7626000)<br> /lib/ld-linux.so.2 (0xb77b7000)</p><p>System.getProperty("sun.boot.class.path"):</p><p>/usr/lib/resources.jar:/usr/lib/rt.jar:/usr/lib/sunrsasign.jar:/usr/lib/jsse.jar:/usr/lib/jce.jar:/usr/lib/charsets.jar:/usr/classes</p><p>1. Am I missing any important files if that's all I bring over from build/linux-i586/ ?</p></blockquote><div>It's a combination of the wrong files (use j2sdk-image) and then splitting them up which you should not do.</div><blockquote type="cite"><p>2. Am I right that some of these file locations aren't the most appropriate given Linux standards?</p></blockquote><div>Don't know how to answer that given the answer to 1.</div></div><div><blockquote type="cite"><p>3. For build/linux-i586/lib: I could manually relink all of the relevant binaries to the new library locations. Would there be any problems aside from linking in moving those files to /usr/lib/java? Is there a better way than manual relinking to specify that those files lie in a different directory (e.g. some sort of ALT env variable, or a simple modification to a Makefile?)</p></blockquote><div><br></div>Don't know what that question means.</div><div><br><blockquote type="cite"><p>3. For build/linux-i586/classes: I could globally alias java to java -Xbootclasspath:whatever, but that's ugly. I'm pretty sure there has to be some Makefile I could edit to change the built in bootclasspath, since build/linux-i586/j2sdk-image/bin/java looks in ../jre/classes, but I'm not sure where to start looking. What Makefile would I need to modify? Or is there an env variable I could set?</p><p>4. In general, are there plans to autotool the build or add an install target to the main Makefile?</p></blockquote><div><br></div>Nope.</div><div><br></div><div>-kto</div><div><br><blockquote type="cite"><p>Cheers,</p><p>Shea Levy</p></blockquote></div><br></div></body></html>