Slashdot Mirror


Linux JVMs Running Under BSD?

Mock asks: "I work for a web services company, and so part of our business process involves setting up web servers for our customers that include a JVM for running our software. Although I've found FreeBSD to be rock-solid for server applications and the quickest to fix security issues, the JVM support has been lagging behind other systems, for some time now. I would like to know if it is wise, or even possible, to run the Linux JVM under BSD? Are there other alternatives I'd be better off considering (besides using a different operating system)?"

41 comments

  1. Whaaaaaat? by Breakerofthings · · Score: 3, Informative
  2. It's called the ports tree. by JumpSuit+Boy · · Score: 5, Informative

    http://www.freshports.org/java/linux-blackdown-jdk 12/
    http://www.freshports.org/java/linux-blackdow n-jdk 13/
    http://www.freshports.org/java/linux-blackdow n-jdk 14/
    http://www.freshports.org/java/linux-ibm-jdk1 3/
    http://www.freshports.org/java/linux-ibm-jdk14 /
    http://www.freshports.org/java/linux-sun-jdk12/
    http://www.freshports.org/java/linux-sun-jdk13/
    http://www.freshports.org/java/linux-sun-jdk14/

    or you could just use the native ones
    http://www.freshports.org/java/jdk12/
    http: //www.freshports.org/java/jdk13/
    http://www.fresh ports.org/java/jdk14/

    That said I used it to run a small enhydra/xmlc java web app. In my last job and I performed well and with the recent (last six months) inclusion of the hotspot stuff it's much faster.

    --
    Oh really?
  3. You could use? by bumblebury · · Score: 1, Flamebait

    An open source programming language, like Python, Perl or PHP. That and you can also use rotor, microsoft's .NET environment which works natively on FreeBSD.

    1. Re:You could use? by aminorex · · Score: 4, Insightful

      Java is open source too. Kaffe is Open Source (tm),
      and the JDK has source freely available, so while it
      is not Open Source (tm), it is open source, but not
      Free Software (tm) -- just free software.

      That, and you can also use gcj. gcj doesn't do AWT
      or Swing yet, so use SWT for GUI stuff.

      --
      -I like my women like I like my tea: green-
    2. Re:You could use? by rhyd · · Score: 0, Troll

      you can also use rotor, microsoft's .NET environment which works natively on FreeBSD.

      oh my gawwwwd! please say you're just trolling with this... pretty please ;)

      --
      'Be the change you want to see in the world' - Al Gore
    3. Re:You could use? by Golthar · · Score: 0, Troll

      Ok, so first you recommend an open language and then you go mention something like Microsoft .NET

      I fail to see the difference between .NET and Java when it comes to Freedom BTW.
      Only that with Microsoft, I get the feeling this freedom will not be lasting too long.

  4. WTF by rhyd · · Score: 0, Flamebait

    i know its a cliche; but you are wasting our time: USE GOOGLE!

    ...or just search search slashdot!!!

    meanwhile I have a question4 cliff: HTF did this question/story get accepted and when will the /. story submission/selection process get opened up to the great unwashed.

    seriously the quality of this site has gone to shit lately

    that is all

    --
    'Be the change you want to see in the world' - Al Gore
  5. if you see that -1 mod'ed you'll know you're right by Anonymous Coward · · Score: 0

    np

  6. Re:It's called the ports tree. Tsarkon Reports by Anonymous Coward · · Score: 1, Insightful
    Okay? Which of these are Production ready or stable. FreeBSD is god, yes, and Sun is being a fag for not porting a native JVM, but you have to tell people if these are fucking stable or not. Otherwise its just anecdotal crap. We all know this shit exists, but does it work for you?

    And learn to use fucking links.

    http://www.freshports.org/java/linux-blackdown-jdk 12/
    http://www.freshports.org/java/linux-blackdown-jdk 13/
    http://www.freshports.org/java/linux-blackdown-jdk 14/
    http://www.freshports.org/java/linux-ibm-jdk13/
    http://www.freshports.org/java/linux-ibm-jdk14/
    http://www.freshports.org/java/linux-sun-jdk12/
    http://www.freshports.org/java/linux-sun-jdk13/
    http://www.freshports.org/java/linux-sun-jdk14/

    or you could just use the native ones
    http://www.freshports.org/java/jdk12/
    http://www.freshports.org/java/jdk13/
    http://www.freshports.org/java/jdk14/

  7. Java 1.4.1 Native on BSD by yancey · · Score: 0


    Apple just released Sun's Java 1.4.1 engine for MacOS. I figured since MacOS is a *BSD, then this doesn't really qualify as a separate OS. hehe.

    --
    Ouch! The truth hurts!
  8. please stop confusing people by g4dget · · Score: 2, Informative
    "Java" is a trademark of Sun Microsystems. It's a platform, the total of the Java language and the Java libraries, as defined by Sun. Most of the Java platform exists only in a Sun proprietary implementation, which you can obtain under roughly the same conditions as Microsoft's "shared source" implementation.

    Kaffe and GNU gcj are not implementations of Java. At best, they are implementations of the Java language or virtual machine, but even in that capacity, they are not blessed by Sun. Porting most substantial Sun Java-based software system to Kaffe or gcj is essentially impossible.

    So, please spare us your cynicism or misleading use of language. Sun's implementation of Java is not "open source" in any sense that the term is commonly understood (and the term was created and defined by Eric Raymond). It isn't even close to open source; you enter into legal obligations to Sun just by looking at it. If you treat it like it's open source, you may get into lots of legal trouble with Sun. Neither are gcj or kaffe an implementation of "Java"; they aren't even close, as you would find out if you tried porting anything to them.

    However, we agree on this: gcj is a pretty good compiler, and SWT is a pretty good toolkit. I do recommend using them instead of Sun Java. They also have lots of practical advantages, like being smaller, starting up faster, and requiring less memory. But gcj and SWT together don't make "Java". If you are really careful, you can write libraries that will compile and run under both gcj and Sun Java, but it's a significant amount of work and requires a lot of care (as I can tell you from first hand experience).

    1. Re:please stop confusing people by Orthanc_duo · · Score: 2, Informative

      The source of the Java Libraries are released. The Java Language specification is open.. ie. it can be viewed and implemented by anyone.

      Sun has a proprietary java compiler / JVM but there is nothing to stop someone from implementing there own (jikes for example).
      Same situation as gcc vs. Borland C compiler (for example)

    2. Re:please stop confusing people by aminorex · · Score: 1

      Nothing misleading about using language according
      to the norms of ordinary and dictionary usage.
      What's misleading is loading words with political
      baggage and trademark crapola.

      I've ported more than one large application to gcj,
      and it's not rocket science.

      I agree that running under both gcj and jdk is
      frought with annoyances -- it's a death of a
      thousand cuts. That's why I just use GCC as my
      platform, my portability layer, for Java code.

      And yes, I'll call it Java, just as I'll call
      this paper thingy a kleenex. And when I open
      a box of candy, a gift from a sweetheart, I'll
      call it an Open Box, full of Free Candy.

      So sue me.

      --
      -I like my women like I like my tea: green-
    3. Re:please stop confusing people by IronDuck · · Score: 1, Informative

      It's a platform, the total of the Java language and the Java libraries, as defined by Sun.

      Java is defined less and less by Sun alone as it matures. One of the best things about Java is the JCP (Java Community Process) which defines the growth of the Java platform. So, while Java is not as "Open" as some would like, it is a very open and robust language. It's not like Sun defines everything, and reaps all the benefits. The licensing is designed to protect their substantial investment in the technology.

    4. Re:please stop confusing people by g4dget · · Score: 2, Informative
      The source of the Java Libraries are released.

      The source to Windows NT has been released, too. That doesn't make Windows NT open source, and talking about it in that way would be very confusing.

      The Java Language specification is open.. ie. it can be viewed and implemented by anyone.

      Even if that were true, it would be irrelevant. We are not talking about the Java Language, we are talking about Java, which is a language and a set of libraries.

      But your claim actually does not even appear to be true: as far as I can tell, Sun has made no legally binding commitment to allow "anyone" to implement Java. So far, all we have is a letter of intent, as part of the JCP, to allow open source implementations.

    5. Re:please stop confusing people by g4dget · · Score: 1
      Nothing misleading about using language according to the norms of ordinary and dictionary usage.

      Which would that be? The term "open source" had no meaning before Raymond defined it.

      And yes, I'll call it Java, just as I'll call this paper thingy a kleenex.

      Well, you can call it "Java". You can also call your dog your girlfriend if you like. But the guy was asking about setting stuff up for customers. Customers expect something Sun Java compatible, not "Aminorex Java". Furthermore, since he would be misusing the Java trademark as part of a business transaction, he would be liable for trademark infringement.

    6. Re:please stop confusing people by cicadia · · Score: 1
      as far as I can tell, Sun has made no legally binding commitment to allow "anyone" to implement Java.

      Does this count?

      Sun Microsystems, Inc. (SUN) hereby grants to you a fully paid, nonexclusive, nontransferable, perpetual, worldwide limited license (without the right to sublicense) under SUN's intellectual property rights that are essential to practice this specification. This license allows and is limited to the creation and distribution of clean room implementations of this specification that: (i) include a complete implementation of the current version of this specification without subsetting or supersetting; (ii) implement all the interfaces and functionality of the required packages of the Java 2 Platform, Standard Edition, as defined by SUN, without subsetting or supersetting; (iii) do not add any additional packages, classes, or interfaces to the java.* or javax.* packages or their subpackages; (iv) pass all test suites relating to the most recent published version of the specification of the Java 2 Platform, Standard Edition, that are available from SUN six (6) months prior to any beta release of the clean room implementation or upgrade thereto; (v) do not derive from SUN source code or binary materials; and (vi) do not include any SUN source code or binary materials without an appropriate and separate license from SUN.

      It's from the copyright statement for The Java Language Specification, Second Edition by Sun. You can download your own copy, complete with this license, here.

      --
      Living better through chemicals
    7. Re:please stop confusing people by g4dget · · Score: 1

      I wish it did, but it doesn't really help. To name just some of the problems with that "license", it's non-transferable, Sun has a case-by-case final say in whether you are compliant, and the conditions for compliance are essentially impossible to meet. Not even the licensed ports from Apple, IBM, or Sun itself satisfy the conditions of that license.

    8. Re:please stop confusing people by Anonymous Coward · · Score: 0

      Sure it did, we used the term back in the late 70's.

    9. Re:please stop confusing people by aminorex · · Score: 1

      The term "open source" has been used for decades to
      refer to information sources which are not
      clandestine.

      JavaScript is JavaScript, whether it is called
      JScript or ECMAScript or JavaScript. In ordinary
      usage, Java refers to a language which may or may
      not correspond to Sun Java in its particulars, but
      does so in the main.

      My customers don't give a rip about Sun's
      trademarks, because they don't use them.
      I use the word Java to refer to the Java language
      abstractly considered, and there is no actionable
      infrigment in that act.

      Get real, dude.

      --
      -I like my women like I like my tea: green-
  9. Beware by cattlepr0d · · Score: 2, Informative

    We ran a Tomcat based website using the linux JVM on FreeBSD. It rarely stayed up for more than a day at a time (someone told me it's a good way to expose bugs in the emulation layer ;). However, with the native FreeBSD JVM (and the Shujit JIT compiler) it's rock solid.

    --
    R Tape loading error, 0:1
    1. Re:Beware by questionlp · · Score: 1

      Little nit to pick, it's compatibility layer and not an emulation layer (since the instructions are still x86, just in a different binary format and using libraries compiled in a different operating system; think of it as running DOS apps under NT 4.0).

  10. Freenet on FreeBSD by Anonymous Coward · · Score: 0

    When this FreeBSD-native port of Java hits stable and Freenet goes from 0.5.1-RC1 --> 0.5.1 I'm putting a node back on my FreeBSD box.

    Think it's just for child porn and terrorists? Make it useful. Host your free software project on Freenet, tell the world about your hobby.

    If you think having a node will use all availible bandwith, there are throttle options in the config file (but don't use them please unless you really need to :). Dedicate what space you have free for the benefit of the network.

    Think it's slow? Encourage others to set up their own nodes.

    It's 1st ammendment freedom of speech - don't let it dissapear! Read more at Kuro5hin.org

  11. Things are changing... by cymen · · Score: 1
  12. First NetBSD Rulz Post! by Anonymous Coward · · Score: 0
    I run java under NetBSD (have versions 1.3 and 1.4 installed). I know in pkgsrc there is a native version (1.1 based) as well as other versions not made by Sun (kaffee and jikes to start). Running java under NetBSD shouldn't be a problem. At least I haven't had any problems yet. Now if only I could get openoffice to run.



    NetBSD Rulz!

  13. YOU stop confusing people by Anonymous Coward · · Score: 1, Insightful

    Once again, someone getting doubley confused about open source.

    "Open Source" will never, has never, will never has already have been going to be, mean what you think it means.

    Java source code is available, under license, which doesn't cost.

    Whilst GPL/LGPL has open source, open source doesn't have GPL/LGPL.

    Source ... License, Source... License...

    One is the code, the other is the License.

    You are confusing the agreeable instincts of the open source movement/GPL'd licenses, and open source, community driven well managed software, that has a key and important role for many industries, managed by a superb company, but with a license term that protects the product.

    Of course, you may choose to use the SWT libraries, go ahead! They are good, I like them, hope they development on all platforms continues.

    On the matter of GTK's, AWT and swing were designed to be two distinct APIs, and that stupid 10 reasons why we need Java 3 article was written by the Football equivilent of a pissed up 59 year old mental patient down you local, who screams 'REF YOUR BLIND' and hurls abuse at the players on the small TV, long after the match finished, and he didn't even know who was playing.

    Woah, I'm Kramer.

  14. Great comment by Anonymous Coward · · Score: 0

    Terse, applicable reasoning and knowledge, and what is more, related to the topic.

    Well done!! +10 ;-)

  15. You could go toe-to-toe with RMS by 0x0d0a · · Score: 1

    You could go toe-to-toe to RMS. Reminds me when a Crystal Space developer asked him a straightforward question. He was trying to strictly comply with the GPL, and instead Stallman sent back a string of about ten letters bitching about how the CS guy was misusing "Open Source" and "Free" and kept ignoring the question.'

    For what it's worth, gcj actually is not as awesome as you would expect just because it's a native code compiler. IBM's JDK/JVM produces code significantly faster under Linux, even without native code compilation, for example. It's the fastest zero-cost way to run Java on Linux.

    Kaffe, despite being free, has really, really, *really* atrocious performance from both a memory and CPU standpoint.

    Sun's Java implementation is okay, but not as peppy as IBM's implementation.

  16. Sun Java(TM)(R) by mirabilos · · Score: 1

    The Sun JDK 1.3.1_07 for GNU/Linux/x86
    runs fairly well on my OpenBSD boxen.

    I use it only for the freenet
    project, though as a high-volume server.
    It's quite CPU and disc intensive.

    --
    My Karma isn't excellent, damn it! (And /. still does not get UTF-8 right in 2012. Wow.)
  17. Depends on what you are trying to do.... by the+eric+conspiracy · · Score: 1

    Yahoo decided to go with PHP for their web development because of the poor support of Java in BSD. Their particular problem was that J2EE is thread intensive, and FreeBSD supports threads poorly.

  18. Re:It's called the ports tree. Tsarkon Reports by JumpSuit+Boy · · Score: 2, Insightful

    Ok no need to be pissy. Of the native ones (I only use the linux ones to bootstrap compile the native)

    I have been using jdk131 for production app dev and web serving for about 2.5 years w/ no problems. The recent inclusion of the hotspot realy inproved performance in 1.3.

    I have started to use jdk14 on freebsd5-current for testing and it seems fine. I would not deploy with it yet it is a beta it still fails 20 out 2700 tests. It is worth noting that both the native and linux jdk14 really like running on freebsd5 and are not as happy on 4.X

    --
    Oh really?
  19. linux emulation under FreeBSD??? by josepha48 · · Score: 1
    who ever heard of such a thing?

    Yes it is possible to run the Linux jvms under FreeBSD as well as NetBSD. Look at the ports, both OS's have ports of the JVM's.

    Also the 1.4.1 JVM has been ported from linux blackdown project to FreeBSD.

    Below is the story ...

    http://bsd.slashdot.org/article.pl?sid=03/03/07/ 1458220

    --

    Only 'flamers' flame!

  20. Re:It's called the ports tree. Tsarkon Reports by Anonymous Coward · · Score: 0

    Cool. Thanks for the info. Long live FreeBSD.

    I need JDK 1.4.1 to run on FBSD.

    Fuck sun in the goat ass for not giving out a native JDK for FreeBSD.

  21. Re:It's called the ports tree. Tsarkon Reports by mike_sucks · · Score: 1

    Wow, "fucking links". That sounds like fun. Is a fucking link the thing that connects people on a sex chart?

    Or do you just have a really fucking limited vocabulary?

    Or are you just lacking in human interaction skills?

    Or are you just a mindless git?

    Or what?

    [Note to mods: -1 Offtopic, -1 Flamebait, +1 ParentSubmittedByWanker]

    --
    -- "So, what's the deal with Auntie Gerschwitz et all?"
  22. Re:It's called the ports tree. Tsarkon Reports by Anonymous Coward · · Score: 0

    You have a vacuous cavity that you refer to as a brain-containing skull is merely a qaugmire of festering caramelized feces. You are a portly, corpulent subhuman eunich troll who comes here and talk balderdash.

    So...

    How about you suck my fucking balloon knot? You would make a good bidet you fucking piece of shit.

  23. *BSD is dying by Anonymous Coward · · Score: 0
    It is official; Netcraft now confirms: *BSD is dying

    One more crippling bombshell hit the already beleaguered *BSD community when IDC confirmed that *BSD market share has dropped yet again, now down to less than a fraction of 1 percent of all servers. Coming on the heels of a recent Netcraft survey which plainly states that *BSD has lost more market share, this news serves to reinforce what we've known all along. *BSD is collapsing in complete disarray, as fittingly exemplified by failing dead last in the recent Sys Admin comprehensive networking test.

    You don't need to be a Kreskin to predict *BSD's future. The hand writing is on the wall: *BSD faces a bleak future. In fact there won't be any future at all for *BSD because *BSD is dying. Things are looking very bad for *BSD. As many of us are already aware, *BSD continues to lose market share. Red ink flows like a river of blood.

    FreeBSD is the most endangered of them all, having lost 93% of its core developers. The sudden and unpleasant departures of long time FreeBSD developers Jordan Hubbard and Mike Smith only serve to underscore the point more clearly. There can no longer be any doubt: FreeBSD is dying.

    Let's keep to the facts and look at the numbers.

    OpenBSD leader Theo states that there are 7000 users of OpenBSD. How many users of NetBSD are there? Let's see. The number of OpenBSD versus NetBSD posts on Usenet is roughly in ratio of 5 to 1. Therefore there are about 7000/5 = 1400 NetBSD users. BSD/OS posts on Usenet are about half of the volume of NetBSD posts. Therefore there are about 700 users of BSD/OS. A recent article put FreeBSD at about 80 percent of the *BSD market. Therefore there are (7000+1400+700)*4 = 36400 FreeBSD users. This is consistent with the number of FreeBSD Usenet posts.

    Due to the troubles of Walnut Creek, abysmal sales and so on, FreeBSD went out of business and was taken over by BSDI who sell another troubled OS. Now BSDI is also dead, its corpse turned over to yet another charnel house.

    All major surveys show that *BSD has steadily declined in market share. *BSD is very sick and its long term survival prospects are very dim. If *BSD is to survive at all it will be among OS dilettante dabblers. *BSD continues to decay. Nothing short of a miracle could save it at this point in time. For all practical purposes, *BSD is dead.

    Fact: *BSD is dying

  24. I like FreeBSD... by tokki · · Score: 1

    BUT

    I think it's not a viable platform for Java. The threads issue is a huge hassle, and there's all sorts of problems that can arrise that are difficult to troubleshoot in Java even on a native platform.

    I work at a site that used the 1.1.8 native release on FreeBSD for a while, and it went ok. Then we upgraded some Java code, and things went quickly downhill. We'd have hangups that we were never able to figure out, and each server would have one at least once a day, which was a nightmare for me. We used Java, Tomcat, and Apache 1.3.27.

    Even though the company I work for is fairly FreeBSD fantatical, it wasn't a hard choice to switch to Linux and IBM's 1.4.1 JDK. We switched, plopped on our code, and boom, no more problems.

    For a development environment, there's definately something to be said for using a viable and trusted environment. Not to say I don't trust FreeBSD, but I don't trust FreeBSD with either the not-so-tested ports or the Linux JVM under emulation. For all that trouble, might as well make the switch. Right tool for the right job, and all that.