Here's an ebuild for native java execution support. You can run jar and class files directly, after doing a simple chmod +x. The code is taken from http://www.linuxhq.com/java.html. A patch from myself is applied upon emerging, which provides improved JAR execution, and fixes handling of pathnames that include spaces. For this ebuild to be useful, you should add the following to /etc/conf.d/local.start: echo ':Java:M::\xca\xfe\xba\xbe::/usr/bin/javawrapper:' >/proc/sys/fs/binfmt_misc/register echo ':ExecutableJAR:E::jar::/usr/bin/jarwrapper:' >/proc/sys/fs/binfmt_misc/register Have fun, and don't forget to post your improvements here !
Created attachment 50375 [details] /usr/local/portage/dev-java/java-kernel-support/java-kernel-support-1.01.ebuild
Created attachment 50377 [details] Create a files/ subdirectory, and unpack this .tar.bz2 into it.
This ebuild needs major work before it can be added to the tree. I will be looking into it at this seems quite fun.
I will be working on the ebuild in the experimental tree: https://gentooexperimental.org/svn/java/gentoo-java-experimental/dev-java/java-kernel-support/ The files probably need to be distributed as a separate tarball and it's better to write an init script than telling people to put stuff in local.start.
Hi Petteri, I'm glad that my modest contribution may help :-) - Your init.d script idea seems great, I hadn't thought of it - Would it be better, in your opinion to package the vanilla "linuxhq.com" files into a tar.bz2, or to patch them beforehand ? Please tell me if you want me to do the init.d script (I have some spare time here and there) Thanks again, Jo
Hi Petteri, I'm glad that my modest contribution may help :-) - Your init.d script idea seems great, I hadn't thought of it - Would it be better, in your opinion to package the vanilla "linuxhq.com" files into a tar.bz2, or to patch them beforehand ? Please tell me if you want me to do the init.d script (I have some spare time here and there) Thanks again, Joël
If you want to write the init script, go ahead. Usually we download the tarball from upstream as it is, but now that there isn't an upstream tarball available I think we can just package the patched version. But probably best to ask for comments from java devs.
The tarball. https://gentooexperimental.org/svn/java/gentoo-java-experimental/distfiles/
Comment on attachment 50377 [details] Create a files/ subdirectory, and unpack this .tar.bz2 into it. The tarball is now in the experimental tree.
The files are now patched in the tarball and the tarball will be uploaded to the gentoo mirrors if/when we release this to the public.
Created attachment 91868 [details] New version of the tarball - improved jar support with manifest detection
Created attachment 91870 [details] New ebuild version (note: I also added unzip dependency) NOTE: should I use "java-config -J", or is it okay to just run "java" ?
Petteri, I'm willing to help and make an init script for java-kervel-support, but I don't know if it's possible to remove a binfmt_misc registration in the kernel once it's done.
Assuming you're using the new Java system, it is sufficient to just use java.
New Location seems to be: http://overlays.gentoo.org/proj/java/browser/java-overlay/dev-java/java-kernel-support Adding proper KEYWORD
Ebuild removed from overlay, domain dead since 1999.