Solaris/FreeBSD vs. Linux for Java development - java

Years ago, I switched from Windows to Linux to get a more lightweight and stable desktop environment. It worked out well, but I'm having enough problems with Linux to consider another change. Specifically, I'm looking for better stability in the system libraries.
I use Debian Unstable (argh..I meant Testing) because I need to track development in some Linux applications. Since they are in active development, I expect occasional bugs in them. My problem is with the frequency of breakage in basic system utilities, like hdparm or halevt. In the past year, every time I have updated a system or done a fresh install, some different utility has been broken.
The best alternatives seem to be FreeBSD and Solaris. (Solaris is free for development use, which is all I care about). I'm asking here which would be better for my use and/or whether they have enough of their own problems that I would be better off sticking with Linux.
My usage:
Java development, programming style is carefully system-independent, desktop apps, target users mostly on Windows and OS X
Virtualization to run apps on various OSes
General destop stuff: wordprocessing, web, music
Not used as a server
So far, it seems to be:
FreeBSD Pro documentation, community, clean design, extensive ports Con Java support
Solaris Pro Java and virtualization support Con see FreeBSD pro stuff

Well, obviously, Java on Solaris is well supported and really stable. It is (or at least was) a primary development platform for the Java team.
Solaris is pickier about hardware than certainly Linux is, in terms of compatibility and available drivers. It would behoove you to check against the compatibility lists, especially for your graphics card, to make sure it works well for you. Solaris has a pretty rock stable userland, and it also has the other interesting Solaris features that you may or may not want to use (ZFS, DTrace, SMF, etc.).
At a stability level, FreeBSD is super stable as well, being as the kernel and userland track each other as a whole. I can't speak to Java compatibility on FreeBSD. I can say I didn't have a good experience years ago, but...that was years ago. Linux I believe has/had better Java support than FreeBSD.
Both systems have large suites of available software packages available, FreeBSD is likely larger, and there's a better chance something may have been ported to FreeBSD over Solaris (depending on the niche of the package, of course).
Solaris I believe has a bit higher base resource requirements than FreeBSD, if that matters, most likely not. "Solaris on the desktop" is a bit of an oxymoron. It certainly does the basic stuff, but it's not it's dominant area of success (things like sound, flash, video, etc.)
If your hardware works with Solaris (or you're willing to buy hardware), then I would go with Solaris. If the "multi media" desktop is really important to you, FreeBSD may be better assuming the Java works.
Me, I use a Mac. I don't say that in some smug way or anything, but if you want a Unix workstation environment to develop Java on, a Mac is really hard to beat, especially now with Oracle picking up the SDK support to keep Java (ideally) up to date more timely than Apple did. (Yes, there are lots of reasons to not like a Mac, but if "unix" and "java" are high on your list of requirements, the Mac actually meets those pretty well.)
I used Ubuntu for about a year and half. 8.x was nice. 9.x not so much, never upgraded to 10.x. I'd use any of these over Windows.
So, in my priority list: Mac, Solaris, Linux, BSD unless BSD's Java support has gotten completely hassle free and functional with no "Oh, you're using BSD"isms. Then I'd try BSD before Linux.

I suggest you to stick to linux. instead of using unstable Debian, you might want to consider something like Fedora. it gets updates frequently. You have Java IDE's(Eclipse, Netbeans) and Linux java support. you can also use virtual machines like virtualbox.

I would suggest separating concerns.
Choose a stable distribution as the host operating system and then install a virtual machine environment in it (like vmware player). Then install those unstable ones you need to track inside it, plus perhaps even a Windows instance.
You can then run those you need to, when you need to, while keeping your stable distribution unharmed.

At the risk of sounding heretical, you should re-consider Java development on Windows.
Windows XP is VERY stable [0].
The only problem is that the "main" Java IDE for Windows (Eclipse) is VERY VERY memory hoggish.
[0] this comes from someone who installed his first Slackware to replace Windows 3.11 at the very first part time office job he had and have run Linux nearly non-stop for ~15 years

FreeBSD's main weaknesses here are Java and virtualization support, which happen to be Solaris' strengths. I wouldn't recommend Solaris 10 as a desktop OS, but try Solaris 11 Express, the descendent of OpenSolaris. It's a great OS, whose main weakness in my mind is its small user base. The documentation from Oracle is good, and there is an active mailing list, but you'll find less in the way of Google results for that one obscure issue etc.
I'd expect that FreeBSD would be more stable (least changing from release to release) than either Linux or S11E.
In terms of general desktop use, S11E might have the edge, but neither is near the level of say Mac OS X.

Consider the latest Ubuntu (10.10?) instead of debian unstable. Ubuntu is far less conservative than Debian, so you will get closer to the bleeding edge.
Debian unstable is labeled as so for a reason...

Of all the thousands of Linux distributions out there, you picked the one with the word "unstable" in it ;)? Get Ubuntu / Fedora / OpenSuse / Slackware or something equally well-tested and stable. Go to Distrowatch if you need help choosing.

Debian testing will do what you want, it's unstable + 10 days if there are no bugs, and you can still use sid sources with pinning if you need some up to date packages.

It really have to be one machine ?
It would be much simpler to divide work on 2-3 machines. I have Win7+Office on laptop, Centos6 on PC (plenty of RAM and VM's), older PC with Centos5 (with OpenVZ, plenty of linux distros on it), old laptop with gentoo (newest soft etc... and i'm more careful when OS is direct on hardware), and two more old PC's just in case.
If it have to be one computer then I think RHEL6 + OpenVZ would be the best solution. OpenVZ containers can run without problem with other types of virtualization at the same time. So if you will need Windows on VM, there is no problem for doing that.

Related

Are there any major advantages of moving Java development of a server-based product to 64-bit?

Currently, all development compiles in 32-bit Java. We are going to move all development to the latest version of Eclipse, and so we are thinking if this may be a good opportunity to also move all development to 64-bit. The product is heavily using servers (Tomcat) and databases, and so there is a clear advantage for performance enhancements here. But beyond this, are there any other advantages? It also comes with more overhead as well.
Also, how much effort is required to move development to 64-bit? I know for C, it's only really little coding and LP64 is the best solution, but I'm unable to find anything in regards to Java.
Cheers.
One of the major advantages of developing in Java is that you can develop on any supported platform, and - if you avoid known platform specific things - deploy to any supported platform.
In this regard 32-bit and 64-bit are two separate platforms.
If you do not hit the 32-bit memory limit for your environment, you will utilize existing resource best with a 32-bit JVM even on 64-bit systems.
Remember that your test environments (including CI engine) should be exactly the same as you use in production.

What does Oracle JDK 7 and JRE 7 Certified System Configurations really mean?

Oracle Java 7 has a list of certified platform http://www.oracle.com/technetwork/java/javase/config-417990.html#os popular server Operating systems such as debian and ubuntu are not certified.
I have downloaded the jdk-7u3-linux-x64.tar.gz and it seems to run on Ubuntu should I be concerned about running Oracle Java 7 on a non certified Oracle platform for production? Is this certified platforms list just a marketing thing or is some technical reason why Oracle Java 7 would run differently on Redhat vs. Ubuntu?
While you may not see a difference between, say, Ubuntu and RHEL when running a JVM, you would probably receive far different reactions if you encounter an issue and request support from Oracle:
Using a certified OS increases the possibility of a quick fix. Not only is it easier for the support staff since they have to be familiar with and test on far fewer platforms, but they are also bound to produce a quicker fix due to marketing reasons and possibly due to various contractual obligations.
On the other hand, you are far more likely to receive a "sorry, can't reproduce it on our system" reply if you are using an unsupported distribution.
I would not expect the JRE to run differently on an unsupported system - at least not for long. Any fixes usually find their way to the more generic packages pretty quickly.
That said, I have encountered other applications (e.g. IBM PurifyPlus) that were so tied to specific versions of the supported platforms that they were not usable even on updated versions of a supported platform (e.g. SLES 10 vs 10SP1). And by tied I mean major functionality issues, not a silly version check. Apparently in some cases there are technical reasons, arguably due to a badly designed application, for using a supported platform.
If I understand correctly on certified OS jvm runs as expected, others not guaranteed. Every OS has its own instruction set (and interpretation of instruction set), Each OS JVM is coded for that specific insturction set. JVM for certified OS are tested against those instruction sets.

Cross-Compiling JRE/JDK

Have somebody experiences with cross-compiling the sun-java5 source package (debian) from i386/i586 to the hppa architecture?
Or know a source for java for PA-RISC? I've found only the Package for HP-UX.
Kaffe/gcj are not able to run my third-party java application
Not sure how strong your stomach is (I apologize in advance in the likely case this doesn't work out of the box and you spend months of your life on it :-)
http://openjdk.java.net/projects/zero/
"Zero is a port of OpenJDK that uses no assembler and therefore can trivially be built on any system. The goal of this project is be to be able to build a TCK-compliant OpenJDK of reasonable performance on any platform with no additional porting work.
The interpreter part of Zero is known to work on PowerPC (32- and 64-bit), x86-64, IA-64, ARM and zSeries. Zero is currently Linux- and GCC-specific, but supporting other operating systems and compilers is one area in which contributions are particularly welcome."
Apparently it now passes the TCK

Best OS for java development? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
What is the best OS for Java development? People from Sun are pushing the Solaris, yes Solaris have some extra features included in itself such as (dTrace, possibility for Performance tuning the JVM, etc.. ). Some friends of mine, had port their application on solaris, and they said to me that the performances was brilliant. I'm not happy with switching my OS, and use Solaris instead.
What were your experiences?
Of the three I've used (Mac OS X, Linux, Windows), I consider Linux the best place to do Java development.
My primary personal machine is a Mac, and I've done quite a lot of Java development there and been happy with it. Unfortunately, however, Apple lags behind the official JDK releases and you're pretty much limited to the few versions they choose to provide.
My employer-provided machine is an old P4 crate from HP which I use mostly to keep my feet warm. The real work occurs "Oberon", on a 2.6 GHz quad-core running Ubuntu 8.04 in 32-bit mode [1]. The two advantages I notice day-to-day compared with Windows are:
A powerful command line, which helps me automate the boring little stuff.
Far superior file system performance. (I'm currently using EXT3 because I'm becoming conservative in my old age. I used ReiserFS previously, which was even faster for the sorts of operations one typically performs on large workspaces checked out of subversion.)
You can get those advantages from a mac too, but Linux offers another nice bonus:
Remote X11: Before my $EMPLOYER provided e-mail and calendar via web, I had to be on the Windows box to read my mail and see my meetings, so I used Cygwin's X11. This allowed my to run the stuff on Linux but display it on my windows desktop.
[1] I used to run Ubuntu in 64-bit mode, but I had no end of trouble. (Mixing 64-bit and 32-bit is something Mac OS X does much better.) 7.04 worked fine running 32-bit applications on the 64-bit kernel. 7.10 broke the linux32 script and the ability to install new 32-bit applications though old ones continued to (mostly) run. 8.04 killed 32-bit java by making it impossible to connect to the network from a 32-bit JVM (no more updates for Eclipse). Running Eclipse 64-bit didn't work reliably. The then current version of oXygen would only run (grudgingly) under the IBM 64-bit VM which would work for about 10 minutes until it stopped getting keyboard events. I finally gave up in frustration and used my Mac for a few months until I had enough slack time to do a 32-bit install of 8.04 on the linux box. Now everything works again and I'm quite happy.
Develop on whatever you like. As a java programmer you might want to avoid Mac OS X, primarily because new features seem to have been significantly delayed, and also because you can find you've no longer got a machine that supports the new versions of Java. Having said that I imagine developing on Mac OS X must be very nice (command line interface, dtrace, nice OS).
I develop on windows with IntelliJ 7. It's ok, but needs some hefty hardware. I then deploy onto solaris/linux. Unless you're writing GUI's or integrating with C++ code, you should be fine choosing whatever takes your fancy.
I'd say Mac OS X.
Java development built in. All the unix command line tools you want. Out of the box. Ant and maven are there. Not the latest versions, but that's easy enough to upgrade.
Yes, you might not have the very latest version of the JDK, but really, unless you have a need to develop for the latest and greatest JDK, it's not going to be an issue.
"development" ?
I believe you should stick to the OS you are the most comfortable with, or which is the most available to a large group (of developers), like for instance a set of PCs on Windows.
It is rare to need to do in-depth tuning on development platform.
You would reserve all those dtrace and other performance tuning to assembly platform (for example in Linux), for daily deployments where everything is recompiled and unit-tested.
And then you could set up a special JVM (like IBM JRockit instead of Sun JRE) to do some analysis on your integration platform, where all your system can be tested from front to back, with stress and non-regression test
And finally, make all UAT (User Acceptance Tests) on a pre-production platform (which can be an expensive F15K or SunFire880 or V490 or...), with the target JRE used there.
My point is: there is so many parameters to take into account between development and release into production that switching OS at such an early stage may prove unnecessary.
Develop on what you're happy with, and test on what you deploy on.
I get to develop Java on my Mac, and deploy on Solaris and Linux. The truth is that for the bulk of tasks, Java can be developed in an OS independent manner. This is especially true for server side development.
I like developing on a Unix in general over a Windows box, but that's me.
Answer is easiear than you might think: use your favorite OS. For Java, it's the best answer. Not the development itself, but your comfort will help your success, browsing docs etc in your favorite environment.
Personally, I would not bother. I would use the platform that best supports the development tools and target platform that you use.
Why do you need to tune the JVM? This is a very unusual thing to want to do. Would you be better writing in a lower level language like C++?
Dtrace is available for OS X, there is a linux port too.
Solaris has historically had a reputation for being slow (hence the Slowaris nickname). I'm not sure if this is still true.
I've used Linux, Windows and OS X. My big argument in favour of OS X is that it is user friendly operating system (ie. I can run iTunes, most modern browsers, and don't need to allocate 50% of my time maintaining it on a laptop like linux) with a unix foundation. As most my development is for unix systems, this makes life hugely more productive. Also, there is a more and more active development community behind the platform here. These reason also work in reverse for Windows - while cygwin closes some of my requirements for using unix tools - it's nothing like having a real unix system.
I have had success before doing Java development in Windows with Eclipse. Sounds like you are also asking about deployment/hosting. Whichever OS is best to run your application on should not really predicate what OS you use to develop the application.
Windows and Eclipse works well, as pmiller suggested. I can also recommend OS X with either Eclipse or IntelliJ IDEA (the latter also works on Windows, too).
I've only ever done the most basic Java development on Solaris (basic data structures' programming practice at University), so I can't offer any real comparison, I'm afraid. I did find it quite painful on Solaris, though, due to a lack of proper tools (I think I was restricted to nedit or something).
One thing you have to take into account is whether you are going to be developing an application that could be run on a mac. I love OS X, but good old steve made sure that we're always many JDK versions behind. We just barely got Java 6. Developing on a mac may at least insure you are working under the lowest possible JDK version.
Your development environment MUST BE THE SAME AS PRODUCTION.
There is no "best development environment" which is not identical to your production environment. Run what you run in production, in development.
That said, that doesn't mean you can't run your IDE, for example, on another OS, provided you still do development on the same system as production (on another machine, or a VM, for example).
Windows is just fine.
Solaris is a wonderful Java development environment too (I like it better than Windows, but for subjective reasons), but unless you're deploying on it, it might not be worth switching to.
Linux is a little clunky for Java development, but doable.
The only one I can't recommend is Mac because they're always so far behind on the version of Java available (Not provided by Sun, Apple does their own).
My best advice is to develop on the platform that you are targeting. That way, when you run it during you development testing and run your unit tests, you know that it will work on the target platform too, without any nasty surprises.
If you are targeting all platforms then you might actually want to develop on a Mac because you will get the most nasty surprises on the Mac. As far as Java goes, on Windows and Unix, "it just works", but not so much on Mac. Sun develops the Java runtime (JRE) for all operating systems except Mac. Apple develops their own JRE.
If you develop on the Mac, you are most likely developing against the least common denominator, so what runs on Mac should run on the others. That has been my experience.
Barring that, I always recommend that you choose the operating system based on whether it runs your software. Pick the OS that runs your IDE and other tools that you use for development and testing. If more than one OS runs the tools that you need, pick the one that runs them the best.

Linux distros for Java Development

Simply, are there any Java Developer specific Linux distros?
A real Sun geek would chime in here about the virtues of using Solaris as a Java development platform, but I am much more ambivalent. Developing with Java is about the same on any linux distro; you are going to wind up having to install the JDK and tools of your choosing (Eclipse, Sun Studio, Tomcat, etc) so you may as well choose a distro on other criteria... perhaps how comfortable you are with it, how easy package management is, and if the look & feel suit your development habits are all big factors.
So, to answer your question more directly, a Java developer would do well with any major linux distro that they are comfortable with using in general. If you want some Java goodness out of the box, Fedora 9 and Ubuntu 8.04 have OpenJDK (and NetBeans) according to a recent announcement.
Dont listen to any of these noobs suggesting one distro over another. Java is Java and just about all distros can install java as such:
[package manager command to install] jdk
If the question was about creating RPM's, then obviously RH/CentOS/Fedora would be desirable over deb distros, source distros, or whatever other format you love. However, due to the nature of Java, a specific distro to use is only relevant if the OP cant formulate their own opinion and must follow whatever other people are doing.
To reiterate There is no java distro , use whatever will have you hit the ground running.
// begin hypocritical personal recomendation
... that being said ... I personally use Archlinux. Archlinux works on rolling releases so it is more likely to have a more recent JDK version then the "sudo apt-get dist-upgrade && sleep 6 months" distros of the world.
// end hypocritical personal recomendation
Also, I am fully prepared to get downvoted, but please, leave me above 50 so i can comment still, thanks!
Solaris :)
On a serious note, there is no Linux distro dedicated to Java, so it would be about the same.
OpenSolaris on the other hand (in my very humble experience) would be a bit faster, and you would have bonus of Dtrace as a tool. (Not that you can't find similar tools in Linux, but Dtrace should be somewhat more advanced).
I am very heavy into Java development and I personally use Ubuntu, so I agree with Sean on this one.
The package manager allows you to easily install the various SDKs (the SUN one, or even the upcoming OpenJDK 7).
Regards,
Arjen
I have used Ubuntu 8.04 and Fedora 9 with success.
For Ubuntu, the community forums were very helpful and if I remember correctly one of the repositories provided apt packages for Sun's Java6 distribution.
On Fedora 9, the Sun rpms work alright.
In either case, alternative/galternative is your friend to make sure that you point "java" and "javac" at the Sun install. I've been using Netbeans 6.1 and Eclipse 3.4 both on Fedora 9_x64 with no problems.
Just be careful with your distro's java installation. Most install gcj by default. For whatever reason, typing "java" into bash on most linux distros will not invoke a Sun JVM without some futzing.
Usually, there needs to be a bunch of soft-linking from /usr/local/bin -> $JDK_HOME/bin/* to get things working as I typically expect them.
I think the motive for this question is focused on the convenience of setup: Is there any distro that has Eclipse and the full Sun Java package (JRE, JDK, and DOCS) already "baked in" so that a manual install process (and deinstall of OpenJDK) is not required?
Having an "out-of-the-box" standardized environment for a development team is a huge time saver. If you don't already have access to a Java-experienced Linux SysAdmin to guide you through the process of rolling your own automated install, learning enough to do it yourself is definitely frustrating.
Few Developers enjoy spending their time wrenching around with OS internals to get tools like Glassfish, Derby, Groovy, Grails, GWT, etc. all working together. They prefer to go directly to writing code and inventing stuff inside a personal sandbox that exploits a pre-existing ecosystem of built-in services...
On the deployment side, having a common Linux install that requires no system-level configuration for end-users except for installing their favorite Java applications' .JAR file would be another big win.
There's definitely a market for someone to provide this, but most folks are simply gritting their teeth and doing it for themselves.
Either SUSE or RH, both have official support.
http://www.java.com/en/download/help/5000010500.xml
I have never heard of a Java-developer-specific Linux distro.
If you need a Linux distro for work purposes (not for personal home use) then the choice of distro is not really affected by the fact that you need to install a JDK, but other factors:
how quickly can it be installed?
how easy is it to maintain (updates etc)?
how fully-featured is it out-of-the-box?
how well supported is it? (commercial support if you need it, otherwise how good is community support?)
My suggestions for work-purposes: Ubuntu and Suse have been good for me. I have no experience with the others mentioned (eg: Fedora).
Basically, get a distro that "just plain works". Everything you need (JDK, IDE, etc) will almost certainly be easily installed from there.
I had a pleasant experience with Mandriva power pack 2008. Select something like development->"java tools" and everything is installed for you.
Everything being Sun JRE, JDK, and eclispe.
Solaris did install a 64bit kernel by default though.....
Latest Ubuntu version. It is easy enough and have packaged Sun Java, Eclipse, NetBeans, GlassFish, TomCat and other Java development related software so you have no worries installing and configuring it from scratch.
You can choose any of the distro available bcoz dere is no linux distro specifically for java development. Personally I have worked on RHEL 5, Fedora 9, Mandriva with considerable success.
Working on java is same on any linux distribution after the installation of jdk, tomcat, eclipse, etc.
As Nick Stinemates mentioned, Gentoo is an excellent distro for developing Java. It is one of the few Distros that I know of that has a very active Java maintainer group and almost everything that people use regularly is already packaged.
Be warned, Gentoo is not a drop dead simple distro to use Ubuntu -- you have to understand a bit about how the OS works -- but it does provide an excellent developerment environment.
The distro which is most developer friendly, in my opinion, is Gentoo. Since you compile everything from scratch, you choose exactly what makes up your system. Java can be installed very easily, so you could potentially just have a window environment and Java installed (aside from the standard tool chain.)
For a start: most -if not all- linux distribution allow you to "easily" install (that is: using the distribution's package manager) jdk's and jre's. The choice essentialy is more about what aspect of the distribution is most relevant to your personal taste.
Personnaly, I've come to value overall distribution stability (as in: upgrades to the base system are more or less guaranteed-not-to-hose-my-workstation-one-day-before-delivery-date) more, which made me stick with debian for the past few years.
The price to pay for that is either "sudo apt-get dist-upgrade && sleep 6 months" as theman_on_vista points out, or just install relevant stuff yourself in /opt. After all, installing some jdk's, maven or ant and eclipse|netbeans is easy enough (hell, there even is documentation somewhere I'm sure :) )
Oracle JVM from their website is going to have the same speed on debian, archlinux and slackware (and probably their derivatives). Your best bet is to tweak the JVM arguments for the web servers/IDEs you might be using. Remember that java for x64 architectures will consume more memory due to larger native pointers, so you would do well to tweak your heap size accordingly. Especially if you don't want your server to stop with an OutOfMemoryError exception.
if you use ubuntu or other debian family you can try this command
sudo apt-get install default-jdk default-jre
While not really a distribution, there is a virtual machine available for Tomcat. It could be adapted pretty easily for other Java based deployments (available for several virtualization technologies).
There are also several Java App Server VMs available from VMWare (VMWare only, of course).

Categories