Slashdot Mirror


FreeBSD/Java Native Port Hits Beta

drdink writes "The long awaited FreeBSD/Java port has hit beta. The port was committed yesterday afternoon by Alexey Zelkin. 'This is complete and close to production quality native JDK with both working client and server native JVMs. Local micro benchmarks shown very little difference between Linux and FreeBSD JVMs in speed.' And more importantly, 'we are very close to passing of Sun TCK tests. Currently about 20 of >27000 tests are known to be broken (tests were run at -STABLE).'"

55 comments

  1. Great! by Hellraisr · · Score: 4, Funny

    Now maybe Sun can port this to their Solaris platform..

    1. Re:Great! by Anonymous Coward · · Score: 2, Insightful

      How about Sun actually delivers on the 'Java everywhere' advertising slogan and actually puts forth the effort to ship Java for the BSD's, just like they do for Windows, Linux etc?

    2. Re:Great! by bsd_usr · · Score: 2, Interesting

      That's what I'm saying!!!! They're run everywhere slogan is completely misleading! Java doesn't run everywhere, as it should.

      I can understand it's not Sun's job to port it to every platform out there, but they could at least make it easier. Although, if they really do want Java to dominate then they should port it to every platform out there.

      Once Java does run everywhere, then they can sell tools and software and not care where you run it and make money that way. Seems like the only people making money off Java these days is IBM, but they got the money and muscle to implement their own compilers and virtual machine.

      Any way, I'd like to see Java on the BSD's one day soon.

    3. Re:Great! by Golthar · · Score: 1

      Actually, we are making a decent sum on Java as well.
      Its not just IBM.
      Well perhaps they make money on Java itself, but making Java products is profitable.

  2. Open Source Solaris! by mnmn · · Score: 2, Interesting


    SunOS was originally taken from BSD if I'm correct. Adding Java to FreeBSD, and porting over maybe jboss would be a boost to the FreeBSD platform. BSD stability, java portability, opensource security, makes for a unique combination, and I'm sure some smart IT directors or consultants would recommend it for critical operations. But first, Java on BSD should be stabilized and left out in the sun to mature.

    --
    "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
    1. Re:Open Source Solaris! by LizardKing · · Score: 5, Informative

      SunOS was originally taken from BSD if I'm correct

      The original SunOS yes, but the modern day Solaris SunOS is actually SVR4 based. Sun have made a lot of changes to their original SVR4 codebase over the years, adding amongst other things, a lot of the best bits from the BSD SunOS.

      Chris

    2. Re:Open Source Solaris! by cant_get_a_good_nick · · Score: 3, Informative

      Minor quibble: SVR4 itself is an amalgam of SYS5 and BSD. Sun didn't didn't mix them totally on their own, it's part of SVR4.

      But since Sun was trying to transition people to new Solaris 2 (SVR4), they did go above and beyond what the SVR4 spec says, including a porting and analysis kit (search your scripts for BSD commands, substitute SVR4 equivs, I think they checked flags somewhat as well) which was good, but also foisted the horror that is /usr/ucb/cc. Sun also added bits to BSD when SUnOS 4 was around. When folks bitch about how Linux rul3z and Solaris suxx0rs cause they don't give anything back, they need to remember that Sun invented NFS and some other things.

  3. Basis for Net and OpenBSD port? by LizardKing · · Score: 5, Interesting

    I'm a little bit unsure of the licensing that surrounds Java ports, but could NetBSD (and Open perhaps) base a native port on this work? Do Sun hold the reins when it comes to Java ports by only releasing the TCK under restrictive terms?

    Currently I develop Java stuff on NetBSD using the official Sun JDK and the Linux emulation layer. If I could get a native version of the JDK then it would be quite nice to lose the need for the emulation stuff from my kernel, along with the Linux bits from SuSE.

    Chris

    1. Re:Basis for Net and OpenBSD port? by Anonymous Coward · · Score: 0

      if the source isn't there, fat chance of ever seeing it as an official port in the openbsd tree. theo keeps shit-licensed software out for a reason, and i couldn't agree with him more.

    2. Re:Basis for Net and OpenBSD port? by Dahan · · Score: 0, Flamebait

      Nobody's talking about putting it into the OpenBSD tree. Besides, who cares what Theo thinks?

    3. Re:Basis for Net and OpenBSD port? by Anonymous Coward · · Score: 1, Insightful

      An OpenBSD port is fine ... it just wont get into the main source tree, but the ports tree has lots of strictly licensed stuff.

  4. Getting Started with BSD by Quizme2000 · · Score: 1

    If I wanted to get started on BSD where is a good place to begin?

    Don't give me that ask Google BS. I already know that they have a linux specifc search, it doesn't really answer my question though.

    --
    "Get them before they get....
    1. Re:Getting Started with BSD by LizardKing · · Score: 5, Informative

      If I wanted to get started on BSD where is a good place to begin?

      If you want to try NetBSD, then download the ISO image from:

      ftp://ftp.xx.netbsd.org/pub/NetBSD/iso/1.6/i386c d.iso

      If there's a NetBSD mirror site for your country, then replace the "xx" in the FTP server address with your country code. Failing that, the canonical ftp.netbsd.org server is pretty nippy.

      Then burn the ISO to a CD-ROM, straightforward enough, although if you need extra instructions they can be found here:

      http://www.netbsd.org/Documentation/bootcd.html# cdrecord

      Finally, grab the extremely good NetBSD Guide from:

      http://www.netbsd.org/Documentation/

      Installation should take little more than 20 minutes on modern hardware. Configure the system (little more than editing /etc/rc.conf) and reboot. Then read up on pkgsrc, which is described in the NetBSD guide. This will allow you to install loads of extra software.

      FreeBSD and OpenBSD are equally worth a look, but I find Net just that little bit easier to install and configure.

      Chris

    2. Re:Getting Started with BSD by Quill_28 · · Score: 1

      What are you wanting to do?

    3. Re:Getting Started with BSD by hmendes_br · · Score: 5, Informative

      Hey, I once had the same idea (and I'm still on BSD until now), so here is a big clue: FreeBSD. This is a robust and fast OS, very well organized. It has a straightforward method for updating (you can *easily* compile the entire system by yourself) , also featuring an extremely easy-to-use and powerful ports system (the way you can install apps... it's much simpler than anything like apt-get or so). Also, on their site you can find a complete, up-to-date and freely available BOOK about using, administrating and getting the best of your system. Try it, I'm sure you would like!!!

      Get the ISO (assuming you have an i386):
      Only first CD is enough

      On the Handbook, you find the installation instructions on the second chapter:
      Here is the link

      Okay, I think it's a good start... Note that if your box is not an i386 you still have options... just search their ftp site

      Another thing, on their site, you can find two versions of the system: 4.7 and 5.0. The 4.7 is still the production release, so the link above is for 4.7. But if you want, you could also install 5.0, but be sure to read this before.

      Good Luck!

    4. Re:Getting Started with BSD by cant_get_a_good_nick · · Score: 1

      Before you get your undies all twisty, realize that you asked a fairly general question with no obvious answer. What does "Getting started" mean? Do you need help figuring out which of Free, Open, or Net to get? Then tell people what your needs or wants are and ask. Do you need help getting it downloaded? There are no Distros of {Free,Net,Open}BSD but the One True {Free,Net,Open}BSD, at http://www.{free,net,open}bsd.org/ You can download .isos for Net And FreeBSD. You can't download an .iso from www.openbsd.org, but you can buy the CD there. Go to amazon.com, buy the freebsd book, it comes with a CD. And there is a BSD search on Google as well, http://www.google.com/bsd FreeBSD isn't trying to hide, you can find loads on it fairly easily.

      I think the comment was based on the fact that you gave no info on what you wanted when it is damn easy to find at least cursory info. It's a perception whole "I'm not going to bother to think or work so I'll ask slashdot so they can do it for me".

    5. Re:Getting Started with BSD by mbadolato · · Score: 2, Informative

      And FYI, 4.8 is at the RC stage and should be released within the month

    6. Re:Getting Started with BSD by realdpk · · Score: 1

      Of course the linux specific search doesn't answer your question. It's for linux.

      Try http://www.google.com/bsd

    7. Re:Getting Started with BSD by cpeterso · · Score: 1


      I just wanted to give a thumbs up to NetBSD. I have an old Sun SPARC machine for a home firewall. I tried installing the Debian SPARC port, but the installer would randomly fail and panic. I tried installing OpenBSD, but its installer would also fail. I tried installing NetBSD. Simple install and no problems! Plus I find the NetBSD /etc/rc.conf easier to configure than Debian.

    8. Re:Getting Started with BSD by rsax · · Score: 2, Informative
    9. Re:Getting Started with BSD by Anonymous Coward · · Score: 0

      www.freebsd.org

    10. Re:Getting Started with BSD by Maxlor · · Score: 1

      Here's a great place: bsdforums

  5. Just to clarify by Larne · · Score: 5, Informative

    This is a native port of JDK 1.4.1, which has indeed been eagerly awaited. High-quality native ports of the JDK 1.3 series have been around for quite some time.

    1. Re:Just to clarify by jo42 · · Score: 1
      Beg to differ a wee bit...

      According to http://www.freebsd.org/java/dists/13.html, only 2-3 weeks ago did 1.3 pass all of Sun's compatability tests. We're still waiting for a solid 1.4 release on FreeBSD because of the nonsense requiring X, or at least Xvfb, to be running to support Java graphics calls - what was Sun thinking? Right, Java was originally designed by a bunch of 20-something kids at Sun that never had any experience in the real world doing languages...

    2. Re:Just to clarify by JKR · · Score: 4, Informative
      We're still waiting for a solid 1.4 release on FreeBSD because of the nonsense requiring X, or at least Xvfb, to be running to support Java graphics calls

      Er, that's exactly what Sun (finally) fixed in 1.4; the ability to run AWT applications "headless" (without X). Finally your app can call Toolkit.getToolkit().beep() and not crash horribly trying to connect to :0...

      Jon.

    3. Re:Just to clarify by kwerle · · Score: 1

      I believe this is actually to be the basis for a binary release, which was announced about 2 years ago.

      Frankly, I'll believe it when I see it.

  6. Linux bin? by sporty · · Score: 4, Interesting
    From the make file...

    BUILD_DEPENDS+= ${JDK14DIR}/bin/javac:${PORTSDIR}/java/linux-sun-j dk14


    SO we stil need to bootstrap off of linux's jdk binary? When will we have a version that's independent of the linux binaries?
    --

    -
    ping -f 255.255.255.255 # if only

    1. Re:Linux bin? by bovinewasteproduct · · Score: 5, Informative

      When Alexey gets all 27,000+ tests passing, Sun stamps it and they get to ship a binary image, instead of making people compile from the source.

      All 1.4.1 source compiles require a working 1.4.1 java compiler. After you have compiled and installed it once, you can set NATIVE_BOOTSTRAP and get rid of the linux bins.

      BWP

    2. Re:Linux bin? by rplacd · · Score: 4, Informative

      SO we stil need to bootstrap off of linux's jdk binary?

      Yes. Presumably once the JDK works on FreeBSD, Sun will merge in the FreeBSD-specific code, and we'll have a version independent of Linux binaries.

      Note that ones this FreeBSD port is complete, you should be a install precompiled JDK binaries. This hasn't been the case in the past because the 1.2/1.3 builds have all been unofficial, and can't be distributed in binary form.

    3. Re:Linux bin? by bsd_usr · · Score: 1

      No kidding, it's like having to install Linux to boot FreeBSD. The idea of it is lame.

      I'd like a completely native version of the JDK. Also, it would be nice to get the olders versions certified and stuff. Just to be complete, I guess.

    4. Re:Linux bin? by sporty · · Score: 1

      My next question is, why not patch the linux source version to make a freebsd binary directly? Why compile the linux version just so you can compile a freebsd version? Sounds like a lot of hoop jumping. I had to do it too to get 1.3.1 working. Now I have to do it again for 1.4.1?

      Granted.. it uses /usr/ports, it's a lengthly process for the 'puter to do. I think make world is faster?

      --

      -
      ping -f 255.255.255.255 # if only

    5. Re:Linux bin? by BSDFreak · · Score: 1

      I believe they are working on getting 1.3.1 certified too.

    6. Re:Linux bin? by bovinewasteproduct · · Score: 2, Informative

      You lost me there... The three Linux JDKs in the ports tree are BINARY installs, you don't have to compile them.

      You install the binary Linux JDK so you can compile the FreeBSD JDK sources to binary form. After this you can set NATIVE_BOOTSTRAP and get rid of the Linux binary because you now have a FreeBSD binary (but you can't distribute it).

      Once Alexey gets the TCK to pass, and Sun gets them the stamp, then you won't have to compile anything, just install the FreeBSD binary JDK.

      The problem right now is that the FreeBSD Project/Foundation CAN NOT distribute binary JDKs, so you have to compile it yourself, which requires a working compiler...

      BWP

    7. Re:Linux bin? by sporty · · Score: 1

      Thought it was a source build, not a binary install.

      You aren't lost, I was :)

      --

      -
      ping -f 255.255.255.255 # if only

    8. Re:Linux bin? by cbiffle · · Score: 1

      I think perhaps you may be confusing this release with Sun's native port. That's not what this is, though we've been waiting for that for some time (Dec.2001, I believe).

      What this is is an upgrade to the eyesbeyond patchset used to build JDK1.2 and 1.3 before. It's been merged into the ports tree, hence the announcement; it allows you to build a native FreeBSD JDK using the Sun sources and, for boostrapping, the Linux binaries.

      Unless something massive and invisible has happened that I missed, there will be no binary packages as a result of this release, because of Sun's licensing. If you'd taken the time to build the port in question, you'll note that you still have to go through a clickwrap to obtain the sources from Sun; it doesn't auto-fetch like most ports. Until Sun's native port is released, don't expect a native FreeBSD binary JDK unless you build one yourself.

    9. Re:Linux bin? by rplacd · · Score: 1

      I am, yes, assuming that this will turn into a Sun release at some point. Once all the tests patch and it's proven to work in the field, Sun can integrate the patches into its source tree.

      I believe this is a precursor to the Sun release because -- as far as I know -- no one else is working on porting Java to FreeBSD.

    10. Re:Linux bin? by Anonymous Coward · · Score: 0

      the linux jdk source code is heavily modified to make up for the fact that linuxthreads sucks.

      it made more sense to port the solaris source to freebsd. the threading implementations matched up better.

    11. Re:Linux bin? by footility · · Score: 1

      a binary install will always be needed to bootstrap
      the jdk build. That said, I've heard rumblings
      recently on freebsd-java that 1.4.1 is getting
      _very_ close to passing the sun tests which will
      allow freebsd to distribute a native binary package.

      --
      What f*ing box!?!?
  7. Huh? by CoolVibe · · Score: 1
    I thought FreeBSD already had a native java in ports. It used the Sun Linux java vm to compile the classes on FreeBSD. See /usr/ports/java/jdk13

    And I installed it over 6 months ago. Am I missing something here? Or was that stuff alpha to begin with (although I never experienced problems with it, it didn't _feel_ beta anyway)

    1. Re:Huh? by Anonymous Coward · · Score: 2, Informative

      > I thought FreeBSD already had a native java in ports. It used the Sun Linux java vm to compile the classes on FreeBSD. See /usr/ports/java/jdk13

      JDK 1.3 and 1.4 are very different things. Most notable differences from internals point of view that in 1.4 only native threading model is supported. And since green_threads support was dropped -- it become much more difficult to port JDK 1.4 anythere.

    2. Re:Huh? by Anonymous Coward · · Score: 0

      The jdk13 in ports requires a lot of patching. Also you have to manually download the source since Sun hasn't made a native freebsd jvm.

  8. Hello again to Freenet! by Just+Some+Guy · · Score: 1

    I'd been running a Freenet server in its own jail, and finally had to abandon it because the various flavors of JDK 1.4 were too unstable, and the native JDK 1.3 was dog slow. If the native 1.4 really works at a reasonable level, I can finally start hosting that service again. Thanks, guys!

    --
    Dewey, what part of this looks like authorities should be involved?
  9. Freebsd.org by nurb432 · · Score: 4, Informative

    Start there, its the largest and best supported ( meaning for getting help, and hardware support ) BSD out there of the 3 main OSS BSD's..

    You can grab an ISO ( only need disk 1 ) or just install off floppy direct across the wire.

    Plenty of manuals, how-tos, etc.. Plus you dont have to worry about what 'flavor' you are using like with linux.. If it FBSD, its FBSD...

    The others are fine too, thats just my preference.

    --
    ---- Booth was a patriot ----
  10. anyword on native thread support vs. green? by davmct · · Score: 1

    We've been trying to use this for quite some time (the 1.3 at least on FreeBSD), and have had issues with the threading model implemented. Not sure why whoever decided to port used green threads. Also, the SecureRandom is broken due to the number of threads it instantiates to determine a "random" number. It seems that through our use, extensive use of threads causes the entire system to crash, which meant we had to rework alot of code to specifically work on BSD by limiting the number of java threads we invoked.

    Any further thoughts/ideas on this?

  11. Support native Thread priority scheduling? by Anonymous Coward · · Score: 0

    Linux's JVMs (and many Unix JVMs) don't properly implement native priority scheduling for Java Thread objects. Can anyone please comment if in the know on the threading library used and if it does indeed support priority scheduling?