Search |
||
Java with apt-get, what's the scoop?Posted by fabriziogiudici on April 24, 2007 at 1:59 AM PDT
So the big news of the previous week was the availability of Java packages with the latest Ubuntu 7.04 (Faisty Fawn). I won't repeat what others already said, but now you can install Sun Java implementations with the standard Ubuntu tools for application maintenance (apt-get, Synaptic package manager, etc...). It took a bit for me to upgrade my computers. The triple-boot Mac-Mini was successfully updated from Dapper to Edgy, but at this point the updater gets stuck. Two old true Intel PCs were successfully updated, but with some troubles (mainly related to the lack of disk space on the In the end, I've done it. So what? All this fatigue just for the pleasure of installing the JDK with For instance, I've quickly packaged blueMarine as a Section: non-free/net Priority: extra Maintainer: Tidalwave s.a.s. and running a special command: sudo dpkg -b work/ blueMarine_0.9.EA9SNAPSHOT.1738_all.deb To install the application you just need to do: sudo dpkg -i blueMarine_0.9.EA9SNAPSHOT.1738_all.deb Now, to me there are two important points. First, in the control file I could declare an explicit dependency on the Sun Java JRE distribution. This means if I try to install my application in a system where Sun JRE has not been installed, I get the following error messages and the user is notified about the required missing packages: fritz@Scirocco:~/Desktop$ dpkg -i blueMarine_0.9.EA9SNAPSHOT.1738_all.deb dpkg: requested operation requires superuser privilege fritz@Scirocco:~/Desktop$ sudo dpkg -i blueMarine_0.9.EA9SNAPSHOT.1738_all.deb Password: Selecting previously deselected package bluemarine. (Reading database ... 107651 files and directories currently installed.) Unpacking bluemarine (from blueMarine_0.9.EA9SNAPSHOT.1738_all.deb) ... dpkg: dependency problems prevent configuration of bluemarine: bluemarine depends on sun-java5-jre (>= 1.5.0); however: Package sun-java5-jre is not installed. dpkg: error processing bluemarine (--install): dependency problems - leaving unconfigured Errors were encountered while processing: bluemarine
Second, as the .deb-packaged JRE is installed in a well-known directory (e.g. #!/bin/sh export JAVA_HOME=/usr/lib/jvm/jre-1.5.0-sun ... $JAVA_HOME/bin/java -cp ... In this way there's no more the risk of having my application launched with the GNU's Java Virtual Machine, a thing that causes sure troubles since it's not truly compatible with Java, but unfortunately advertises itself as Java, so usually people complains with my application rather than with the distro. Of course, I can also be sure that my application will be now launched with the proper JRE version. And I'm not forced to fix these troubles by bundling yet another JRE with my application, thus creating a possible proliferation of JREs in the user's disk. After the Sun JRE is installed, the Not everything has been fixed yet, and this post is just introductory. I plan to write a more extensive description within a few days, when everything is complete (and the process of creating the distribution has been possibly automated); also I'd like to understand whether it's possible to have blueMarine appear in the system menus etc. In the meantime, feel free to ask questions or to add some points if you're expert at creating Debian packages. PS1 I already have a question: what happens with other Linux distributions? Are they all compatible with PS2 I've uploaded the blueMarine_0.9.EA9SNAPSHOT.1738_all.deb for trying, just remember that it's an untested snapshot, I mean I don't guarantee does something clever after the installation ;-) »
Related Topics >>
Linux Comments
Comments are listed in date ascending order (oldest first)
|
||
|