Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!usenet.ukfsn.org!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: Ubunto Date: Mon, 17 Oct 2011 00:29:19 +0000 (UTC) Organization: UK Free Software Network Lines: 125 Message-ID: References: NNTP-Posting-Host: 84.45.235.129 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: localhost.localdomain 1318811359 1331 84.45.235.129 (17 Oct 2011 00:29:19 GMT) X-Complaints-To: usenet@localhost.localdomain NNTP-Posting-Date: Mon, 17 Oct 2011 00:29:19 +0000 (UTC) User-Agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8883 On Mon, 17 Oct 2011 00:31:05 +0100, Tom Anderson wrote: > On Sun, 16 Oct 2011, Martin Gregorie wrote: > >> On Sat, 15 Oct 2011 13:04:16 -0700, Roedy Green wrote: >> >>> On Fri, 14 Oct 2011 14:20:40 +0100, Tom Anderson >>> >>> wrote, quoted or indirectly quoted someone who said : >>> >>>> That Fedora is much better. >>> >>> In there anything you would want to tell programmers thinking of >>> developing Java on Fedora? >>> http://mindprod.com/jgloss/redhat.html is an entry a bit long in the >>> tooth. > > Just a bit! > >> It just works. > > That is just about true, but i think it's glossing over some facts worth > knowing. > Sure. Short Answer! > 1. The default Java is OpenJava. I *think* a standard install does not > include it, > That's most likely true, but I haven't manged to do an install that didn't include it because there at least package I've needed has it as a dependency - and remember at package selection time (I don't delay this until post-install) there's as yet no way to pull in Sun/Oracle Java. > 2. None of the above includes Derby, which is included in the Sun > releases. That's a package simply called derby. > True. Due to a PostgreSQL fixation I keep meaning to use it but haven't yet. >> though you can easily switch to Oracle/Sun Java by simply downloading >> and installing it > However, by that time OpenJava is already installed. So far I haven't been brave enough to uninstall it after I've installed the Sun/Oracle JDK. Have you tried this? > The upshot of this is that if you install something from an RPM, then > all you get is the installation. It is up to you to obtain the > installer, install dependencies, install updates when they are released, > and so on. Whereas if you install from YUM, the machine does all that > for you. > Not entirely true because you can add repositories to the Yum configuration: I normally add rpmfusion and atrpms and current releases of GoogleMaps add their repository as well. > whereas > an install from YUM will upgrade to it as a matter of routine. (I feel > so sorry for users of operating systems where this is not the norm, such > as Windows and most of OS X; Unix users get this wonderful > up-to-dateness as standard) > Agreed. That is why I add atrpms and rpmfusion, but beware: there can be odd dependency clashes between repositories: there are currently stopping me from installing vlc and avidemux: eventually I'll crack and compile these from source. > 6. OpenJDK is a YUM install and the Sun JDK is an RPM install. So, > choosing Sun over OpenJDK means giving up painless automatic updates. > If you pull in an RPM install/update directly (as I regularly do for both Java and Opera, the next yum update will complain that something changed the RPM database without telling it. This can be safely ignored if you know you did this. > 7. The right way to manage multiple installations of Java is through the > standard 'alternatives' mechanism. See: > I use this for swapping from sendmail to Postfix, both both are Fedora packages: not doing so causes arse-ache. However, merely changing $PATH by dropping java.sh (my custom script: contains pathmunge commands) into /etc/profile.d/ is easy and works equally well. FWIW the predefined alternatives in F15 are only OpenJava and gcj (compile to native using the gcc Java-->C preprocessor) 8. Being the 'default' Java means, amongst other things, that OpenJDK is > a dependency of any package which uses Java. Hence, even if you install > the Sun JDK, using YUM to install such a package will drag in OpenJDK - > even though it won't actually be used! It's possible this won't happen > if you have correctly used the alternatives mechanism, as above, but i > can't guarantee it. > Quite. > 9. I don't think any standard installation process sets the JAVA_HOME > environment variable, so add an export for that to your .bashrc (and > make sure your .bash_profile sources your .bashrc - or do something > different if you prefer). This is not required, but i often come across > bits of software (like JBoss) which either assume or are greatly > comforted by its presence. > True. > 10. There are loads of Java libraries in the package repositories, all > just a few effortless keystrokes away. However! I'm not sure i really > recommend getting libraries this way. Although YUM makes getting > libraries easy, it doesn't help you distribute code written against the > libraries - unless your consumers are also running Fedora, you are going > to have to take care of packaging the dependencies yourself. If you > instead use something like Ivy to get your jars, you can somewhat > reasonably just distribute your ivy.xml file, or if not, use Ivy to > build a zip-of-jars to distribute. > Quite. I use a few of them, configured in manually. I agree with your other points, but haven't added anything: I manually installed ant and don't use any IDEs. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |