Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Java Operating Systems Programming BSD

Java 2 For BSD 42

We've covered the movement to get Java 1.2 ported to the BSDs for a while now. After Linux got in on the act a couple of months ago, keepper was the first to write in with a link to this BSDi press release announcing the availability of Java 2 for BSD. Looks like BSD/OS will get it first (they're beta-ing it now). Then FreeBSD gets it, at which point (I assume) it'll be open to the other BSDs to take as they want.
This discussion has been archived. No new comments can be posted.

Java 2 for BSD

Comments Filter:
  • by Anonymous Coward
    Ummm pthreads aren't actually relevant to the discussion. While FreeBSD does indeed have them, they aren't relevant with green_threads, which is the only threading implementation currently supported with FreeBSD java (neither the Linux or Solaris _green_ threads use pthreads either btw). Native threads are a different kettle of fish.
  • So you have stable native threads that actually scale on SMP machines? I've never managed to do any native XSL transformations on a JDK1.2/Linux box...
  • Probably for the same reason as the jump to "Solaris 7" from 5.6. It isn't a fundamental enough upgrade technically to change the major version number, but Marketroids like the whole number increment because it sounds important.

    Boss of nothin. Big deal.
    Son, go get daddy's hard plastic eyes.
  • by Anonymous Coward
    John Dyson who wrote the FreeBSD VM system has recently analysed the situation and concluded that proper threads and SMP will never work on FreeBSD without a complete rewrite of the kernel. John Dyson said that in its current state, all attempts to implement proper threads and proper SMP on FreeBSD will only lead to an unmaintainable mess. John Dyson really knows the FreeBSD kernel. He further went on to say that such a rewrite would be impossible under the current politics which dominate the FreeBSD development process. According to John, it would take a major commitment on the whole FreeBSD developer community to scrap the current problematic base and rewrite it properly. Unlikely to happen in our lifetimes, but who really knows. [I believe he posted his analysis to the FBSD hackers list.]
  • The original poster suggested that this implementation might be available on other BSD variants in the future. I don't think this is going to be the case. I wasn't able to track down the licensing info, but I see no indication in the press release that this is the least bit open source. Is this an "official" Java implementation with code licenced from Sun? If so, I wouldn't expect a port to Net/OpenBSD any time soon.

    Remember, we still have a GPLed Java implementation in the form of kaffe [kaffe.org]. It isn't quite Java 2 yet... but if you want Java on a less-than-mainstream platform, it may be you best bet.

    Darian

    ~O~

  • I would, of course, never intentionally make an inflammatory statement. =P

    Thanks for the link, I'll check it out.

  • by Anonymous Coward
    BSD's unstable pthreads will no doubt cause problems with any attempted Java implementation.

    Now go and read the way green threads (the only threading model the current FreeBSD JDK supports) are implemented. Did you find anything about pthreads in that implementation? No.

    I believe this is why there was so much delay in getting Java to BSD. Hopefully they have developed a work-around, possibly by caching the name-server calls.

    You believe wrong. The main cause of delay has been lack of support from either Sun or a commercial licensee of the JDK and hence access to things such as the Sun JIT, Java3D, the JCK. Also note that the SCSL doesn't allow a binary release of the JDK without it having passed the JCK and you having permission from Sun.

  • you mean Solaris 2.6 to Solaris 7, AKA Solaris 2.7, AKA SunOS 5.7 and Solaris 2.6 is AKA SunOS 5.6 .... Confusing no?
  • This whole post is just a joke, right?

    "I was trained in Java in '92"
    Thats funny, Java just turned 5 a week or 2 ago. You must have gotten a hold of the beta-beta-beta version. But wait a minute, if you have been working/hating java for 8 long years now, i guess that means bsd isn't really "succumbing to the latest fad" does it?

    "It's OO code is *horrible* and if anything I think it's actually getting *slower*."
    There are a few places where the OO is somewhat odd, but for the most part it is exemplary. Whip out the GoF's "Design Patterns", and then check out java.awt.* -- you'll be pleasantly surprised. The amount of time to invoke a method in java and a comparable function in C++ is about the same, the slowness you experience initially is the VM getting loaded (which is alleviated with more memory), but after that java works fine. This is why java has evolved away from short lived applets to applications and server middleware--where it doesn't matter if it takes 20 seconds to start as long as it works fine after that and can be moved to different platforms, like BSD.

    "I wish everyone would wake up to the fact that the only workable way to be portable between two operating systems is to have completely seperate code bases for each operating system"
    That is hogwash. Many people i know write java on their dopey win-box at home, then take it to work to run on solaris, win, and mac with not one damn change to any of the code. The only big "gotcha" with cross platform java is running applets in the browsers vm, but most people aren't writing java for applets anymore anyway.

    "You save so much time in the long run that way"
    Huh? How?! By doing twice as much work you save time--that just doesn't make any damn sense. Irregardless of the language of choice a programmer is going to produce about the same amount of lines of code (based on how fast they can type, and how fast they think) So if i have to write N codebases for N OS's its going to take around N-1 more time to do than just writing it once, and it looks like now if its written in java you can run it in a few more "anywhere"s

    FUD! FUD!
  • Closed Source licenses do not necessarily mean that the source code is hidden. The source code to Java *IS* available. The only problem is getting Sun's signoff on a port. It may be entirely possible that an official port to BSD/OS can be simply recompiled for the other BSD's with no modifications.
  • It allows people to mull over their options and refine their work. It's like fine wine. You can't hurry it along (well you could use anti-freeze but it'd kill you) if you want quality. Look how long it takes pharmaceutical companies to develop their drugs. They take their time and TEST it rather than beta their heart medicine in the public domain and which would lead to remote kernel panics. oops! I mean death.
  • by Anonymous Coward
    Well, I've been running FreeBSD 3.4 for some time, and have enjoyed Java2 (that's JDK 1.2.2) under the binary ports.

    So this really just impacts native thread issues.

    Technically, then BSDi is the SECOND of the BSDs to enjoy Java.

    That explains why the BSDi guys here at JavaOne were so quiet about Java support.
  • Now that Sun is making their Java plug-in available, the problems with varying Java support in browsers is going away. For Ganymede [utexas.edu], we use a hybrid Java applet/application for the client, and it works great on UNIX, Win32 (under Netscape or IE), MacOS, and OS/2.

    Applets work just fine as long as you don't get overly ambitious about it, and as long as you keep in mind what an applet is for, and what the constraints of the Java security model are.

  • I know it sounds ridiculous, but will it run on my (um, forthcoming) beowulf cluster by any chance? That would sure make a cluster useful...

    -=b

  • Indeed, if they can port this to OpenBSD it will bode well for the existence of *BSD's in the enterprise. OpenBSD [openbsd.org] is one of the most stable, secure, and stress-tested OS's around. If it can run Java code, it would probably make one of the better choices for middleware and ASP's. I'm excited for the other BSD's to run it as well, of course, but I'm particularly excited about the possibility of an OpenBSD port because of its development history.

    Quality of service contracts are going to be the make-or-break deciding factor for ASP's. OpenBSD can provide the uptime an applications provider will need to meet that contract; it's been through a year and a half security audit [openbsd.org] (which happened to close many software bugs as a side benefit), and uptimes in the hundreds of days are common.

    OpenBSD 2.7 [openbsd.org] comes out next week, with integrated SSH2 and a large collection of packages and ports!

    1. Disclaimer: I'm not affiliated with OpenBSD. I use it though =P

  • what you're talking about.

    -T

  • applets? who cares about applets? the important thing is that there's a working virtual machine for the operating system so you can run Java APPLICATIONS.
  • by pvanheus ( 186787 ) on Thursday June 08, 2000 @01:27AM (#1017352)
    If I'm not mistaken, the John Dyson message referred to was this one, from comp.unix.bsd.freebsd.misc. It isn't quite as apocalyptic as the original AC post made it out to be...

    Subject: Re: FreeBSD and SMP
    From: "John S. Dyson"
    Date: 2000/06/01
    Newsgroups: comp.unix.bsd.freebsd.misc
    Bruce Burden wrote:
    >
    > XuYifeng wrote:
    >
    > : I am newbie of FreeBSD, I heard rumor that Linux 2.2 has better SMP support
    > : than FreeBSD 4.0?
    > :
    > I understand the latest Linux kernels have a multi-threaded
    > SMP kernel, while FreeBSD still uses the big lock model for SMP.
    >
    > From what little I have seen on the
    -current mailing list,
    > this is something the developers are going to have to "bite the
    > bullet" on, it seems, because the change isn't going to be easy
    > or compatible.
    >

    About the time that I left FreeBSD, my biggest TECHNICAL argument was that FreeBSD needed an official project to re-design the kernel so as to support multi-processors correctly. In NO WAY does FreeBSD do multi-processing correctly (and that isn't an insult, but is a result of the monolithic kernel legacy -- FreeBSD is an excellent kernel otherwise!!! :-)). However, Linux supports SMP only marginally better than FreeBSD in the grand scheme of things.

    A significant and well thought out redesign is in order. This is NOT an easy project and would require a serious committment on the part of the kernel developers. Hack solutions shouldn't even be considered for the shortest amount of time (the time involved in looking at expedient work-around type efforts is totally wasted.)

    IMO, the Linux approach so far appears to be an iterative improvement on the same basic design: TRADITIONAL monolithic kernel. Given a traditional monolithic design, once the kernel is fine grained enough, and provides correct internal structure, the kernel maintenance people will have to be MUCH more intelligent than the original developers themselves. The complications in an adequate monolithic design are enormous.

    The reason for my work being aborted on the FreeBSD SMP MONOLITHIC kernel wasn't that I couldn't make a FreeBSD SMP monolithic kernel work very, very well. The resulting kernel design would have been unmaintainable. I decided (when it was my place to decide a LONG time ago) that a monolthic SMP kernel (other than the current stopgap) didn't provide the quality that the FreeBSD name demands.

    I am currently making really good and effective progress on my video compression (data reduction) software, and I might be able to do kernel hacking (actually redesign) in the near future. I have no need for employment anymore to make money, so my time is fully my own.

    The last few years has been frustrating, but at least I worked with some tremendously nice people. I now have a situation that is very close to what it used to be when I first started working on FreeBSD!!! (I doubt that I'll be directly involved in the project because of disagreements that I had about the technical direction of the kernel, and marketing disagreements (with the associated burnt bridges :-(()).

    I am going to be lurking much more than I have in the last 2yrs anyway :-). I just looked that the FreeBSD mailing lists a couple of weeks ago for the first time in a few years!!!

    --
    John | Never try to teach a pig to sing,
    dyson@iquest.net | it makes one look stupid
    | and it irritates the pig.

  • Not to shoot bullets on your parade. But obviously you don't know about FreeBSD 4.0 and higher. The Virtual Memory system has been completely rewritten by Matthew Dillon et al. Please do proper research before you post. Thanks. Enough FUD in the world already.
  • by Brian Feldman ( 350 ) <green@nospaM.FreeBSD.org> on Thursday June 08, 2000 @02:23AM (#1017354)

    If you read Dyson's explanation for leaving [freebsd.org], you'll see he is quite the pessimist with regard to basically any project he's not working on. He's an extremely intelligent man, but he isn't criticizing a lot of the time on merit.

    It also shows that his viewpoint hasn't changed in the few years since he's left. There are several very key architectural changes that make FreeBSD much less like a traditional monolithic kernel. One of the biggest is the changes, planned for a long time, that are now to be implemented with help from the BSDi people and the BSD/OS SMPng (5.0) kernel. Priority levels (splhigh(), splx(), etc.) are disappearing and will be replaced by very mutexes allowing much better SMP. Along with this, the interrupt model will be changing to interrupt threads, where each interrupt gets its own lightweight kernel thread.

    In addition, pthreads are to be reimplimented using scheduler activations and (probably) a hybrid kernel/user thread model where the ratio of actual "processes" to threads will not be 1:1 like LinuxThreads or 1:many like the current pthreads implementation; the ratio will most likely be many:many which would allow for much nicer scaling than either of the other.

    Don't look at things as short-sightedly as John Dyson likes to. There's a lot going on at a very fundamental level to improve what he thinks wouldn't be improved.


    --

  • So, you're saying that coding in C is preferable to an OO language? I beg to differ; the APIs available to Java are much more standardized and consistent than the myriad C and C++ libraries that don't seem to work on every platform. Java's mantra should be write once, compile anywhere. Plus, servlets tend to be way faster than CGI.
  • Very good. Now we'll have FreeBSD starting up along the road Solaris (SVR4MP in some ways too) started on about 7 years ago.
    FreeBSD is an excellent system, and usually beats (performance-wise) any other Unix on a uniprocessor x86 in my experience. Scalability over more than 2 CPUs, however, is a question. Commercial Unixes have excellent scalability over dozens of CPUs; are we sure we really need this sort of performance for *BSD?
    Multithreading, however, is certainly becoming an important issue, and kernel scheduling of user thread groups (a la multiplexing over LWPs) is becoming something of a need. Are you sure that some sort of workaround cannot be done? Maybe add a signal to trigger rescheduling user threads, or enable the pthreads library to work over several rfork()ed processes? If it were possible to make rfork()ed processes multiplexed signal-wise over one PID, we could have something resembling LWP's.
  • I was at the "New Developmens Human Interfaces" session of JavaOne this afternoon, and they do in fact have the swing components using the Aqua look and feel. They also (finally) have the toolbar at the top of the screen like the rest of Mac applications. It looks very nice, and uses all the Aqua widgets and transparency.

    Not only did Jobs get up on stage during the keynote, he said that OS X will be the best desktop platform for Java. In a conference otherwise dominated by serverside (J2EE) and portables (KVM, etc.), it was nice to see someone acknowledge the importance of vanilla desktop Java.

    -Esme

  • by Anonymous Coward
    For the past few months a group of FreeBSD/JAVA volunteers have been working on a native FreeBSD java implementation based on the Sun source. It's alpha, you must build it yourself, but the port is stable and you can use it now. Interested in testing/helping? More Info can be found here [nl.net]
  • What makes you say Be or OS X makes a great workstation? Which of Be's approximately 0 applications would you say help characterize it as a "great" or even usable workstation? Have you every actually used it? Not to mention it isn't exactly the most stable OS around.

    OS X isn't even released. It's also in the same boat with very few native gui apps. Admittedly Mac apps do work and Unix stuff builds ok. But if you're looking for Mac apps get a Mac and if you want Unix apps - use Unix!

    As far as Win2k, that's a little more realistic but I'll still take Linux or BSD anyday. Also, I love the way you make broad blanket claims with no evidence whatsoever to back them up (i.e "FreeBSD is superior to Linux, Java or no"). And I'm typing this in Linux Netscape running on FreeBSD 4 FYI so I'm in no way biased against FreeBSD.

    Just biased against idiots.
  • Heh, no, I agree that only suX0rs use Java on their desktops, unless they are masochistic or insane or forced to for some reason. =P

    Jedit [sourceforge.net] is my main editor.
  • Not really.

    SunOS=The base system.

    Solaris=All the stuff on top.

    All SunOS 5.x releases are the foundation for Solaris.

    So, SunOS 5.6=Solaris 2.6. SunOS=5.7=Solaris 2.7 (aka Solaris 7). SunOS 5.8=Solaris 2.8 (aka Solaris 8).
  • So Java is finally getting good support. OS/2 had the ability to run applet directly, new browsers are better (it seems) at handling applets and now BSD is in on the Java action. Neat.
  • by 1337d00d ( 177978 ) on Wednesday June 07, 2000 @07:44PM (#1017363)
    Not just that Java2 is coming out for BSD, but that the better stuff is coming out right at the start for BSD. The more recognition that BSD gets, the better. Any Operating System effort that can take hold now will be competing for the market share from the Microsoft breakup, so it's great to see Open Source efforts besides Linux (not to say that Linux isn't great, but most techies have heard of it) getting more media, as opposed to closed source efforts taking over. I see this as representative of the increasing popularity of the *BSDs, and open source in general, as companies begin to turn from the giant Microsoft to the stronger, more reliable Open Source operating systems. Support like this is critical is we want to attract more good developers to the Open Source platforms.
  • Just out of curiosity, how is multithreading handled in BSD?

    Will Java performance under BSD be any different than under Linux?
  • by quentink ( 198105 ) on Wednesday June 07, 2000 @07:51PM (#1017365)
    Technically isn't the first BSD based OS with Java 2 support Apple's Mac OS X? I believe Sun's Chairman and CEO Scott McNealy brought Steve Jobs up during the keynote at JavaOne to tout OS X's support for Java 2. According to Jobs, Apple has gone even further, mapping the "swing UI stuff" on to the graphics subsystem, Quartz and the new Aqua look and feel.
  • "write once, run anywhere" fine print: except BSD.
    sheesh...but then again...if BSDi has it in beta now, and as long as they take to do things, we might have a cure for cancer before they get done "testing" it.

    ---
    remove SPORK.
  • This is great. The more OSs that have good support the better. I am not a real BSD user but the more choices the better as far as I am concerned. I mainly use Linux but if BSD fit my needs better I would use it in a second. I just want more choice and who doesn't?

  • That's interesting. Can you back up your statements with any links to the studies, etc? I'd be very interested in the Sun study in particular.

    I was under the impression that Java, though initially it failed to live up to the cross-platform promises, was now running fairly well, with (mostly) portable code and a faster compile time, more standardization, etc.

    Is it really that bad? Or are you just trying to get over a bad initial experience with Java?

    As for seperate code bases maintained by seperate teams, that may indeed be one good way to develop, but I'm not sure if every project requires that much redundancy of effort.

  • The existence of a 1.2 JDK for BSD will make it easier to make people accept a BSD system in a company, indeed !

    Java being cross platform, it makes the host OS irrelevant, but on the other hand, falicitates the penetration of a greater variety of systems. Once BSD is installed for running existing Java apps, the other benefits for having BSD can be discovered, etc. People will tend to be less reluctant to explore new platforms, since they can still use platform-independent ones.

    It's very good for everybody, finally !
  • So, I assume that JServ & JRun will run on BSD/Apache now? Anybody ready to try a port? That's when I'll get excited; give me a stable VM and I can change the world.

    Funny...I was just talking to a Sun rep at JavaOne about this today. He mentioned something about it, but he seemed to think it was Blackdown doing the port. No matter; good news is good news.

    Now we just need the native compilers (TowerJ, etc) to port, and FreeBSD will be unstoppable.
  • So, I assume that JServ & JRun will run on BSD/Apache now?

    At least my FreeBSD server has been running Apache/JServ for a while now, thank you very much. Though only w/ JDK 1.1.8 at the moment.

    ______________


  • Most servlet engines are pure Java, so all you'll ever need is the JVM.

    Compile to native code?? Blech. Might as well code C then.

  • BSD has pthreads.

    I don't see why there would be a difference, as long as the JIT is retained... I run Linux JDK 1.2 on FreeBSD at perfectly acceptable speeds.
  • I don't see why there would be a difference [...]

    The kernel-supported threads do matter when you have multiple processors or you want to do stuff like asynchronous I/O. In traditional UNIX, processes cab be blocked inside I/O operations (such as waiting for a page to be read into a mmap-ped region). If you have a kernel-supported thread model, you can run another thread even when the first one is waiting in page fault. And you can take advantage of multiple CPUs as well.

    So there really can be a difference between running JVM with kernel-supported thread model and JVM with user-space threads.

    -Yenya
    --

  • by Anonymous Coward
    The guy must have had an amazing "initial" experience with Java... "trained in it in 92"...
    three years before it was released.

  • Heh, no, I agree that only suX0rs use Java on their desktops, unless they are masochistic or insane or forced to for some reason. =P

    However, a lot of companies are using Java for middleware and server-based applets (servlets).

    I agree that the BSD's should think carefully before jumping in to every technology that happens along, but Java is already become entrenched in the enterprise. If a Java port comes out, that doesn't mean you suddenly *have* to install it on your BSD boxen.

    I guess I just find it disturbing that the original poster was able to get away with posting such FUD, like "I trained in Java in the war of 1967", and "recent studies indicate that Java != bad coffee". If you don't like Java or BSD, fine. But don't post a bunch of crap just trying make a given technology look bad.

FORTRAN is not a flower but a weed -- it is hardy, occasionally blooms, and grows in every computer. -- A.J. Perlis

Working...