VM Enables 'Write-Once, Run Anywhere' Linux Apps
An anonymous reader writes "A startup will soon launch 'a kind of holy software grail,' according to an article at LinuxDevices. The dual-licensed technology is claimed to enable more or less normal Linux applications to run — without requiring recompilation — under Windows, Mac, or Linux, with a look and feel native to each. 'As with Java, Lina users will first install a VM specific to their platform, after which they can run binaries compiled not for their particular OS, but for the VM, which aims to hide OS-specific characteristics from the application. Lina comprises a platform-specific application that virtualizes the host PC's x86 processor... A lightly modified Linux kernel (2.6.19, for now) runs on top of the VM. Under the Linux kernel is a filesystem with standard Linux libraries modified to map resources such as library, filesystem, and system calls to analogous resources on the host platform.' Further details, including an entertaining video or two are at OpenLina.com"
Well, recompiling an application doesn't port it to a different OS.
The work needed to abstract the fact that you are running on Windows or MacOS instead of Linux is highly repetitive, and therefore a good target for factoring out into some common -- thing.
The most accepted way for this is to develop a framework with WxWidgets. But what if you don't like the framework? What if you need a different framework? What if your language is not supported by the framework? Integrating a VM to the underlying OS is an alternative.
Another thing that I think is useful in this approach is potentially dealing with coupling of unrelated applications via common library dependencies. If one application requires a later version of a library than another is compatible with, you can't run them both easily on the same machine. Anybody who used non-Ubuntu repositories on Ubuntu has run into this.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
Trick maybe the wrong word - changing the L&F is by design with code such as:
n dFeelClassName());
g .html
try
{
UIManager.setLookAndFeel(UIManager.getSystemLookA
}
catch (UnsupportedLookAndFeelException ex) {}
While not perfect, it is pretty good. There are screen shots and some of the deficiencies laid out here: http://today.java.net/pub/a/today/2003/12/08/swin
-- Mike
Yes. The commercial version isn't under the GPL.
This is how Trolltech does it.
I'll say it very simply.
Do not force end-users to the command line.
"You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
Given, I'm running a PPC machine, but from my experience with open source on Linux and Mac OS X... because something always, ALWAYS, goes wrong the first time you do "configure" or "make?" Always.
Either it's missing some libraries (my experience with GD), or it requires SUDO permissions but the instructions didn't say it required SUDO permissions, or the path its writing to is wrong, or it has a Good Ol American compilation error... something always goes wrong.
If you want to write a GUI to cope with every single possible error in the 'configure' and 'make' process, more power to you. But I doubt it's possible for any computer program to handle every case in an automatic fashion.
Comment of the year
Actually, most Windows apps take advantage of autoplay, which means it really is "put the CD in, push the big flashing button that pops up, click next a whole lot because none of that text could be important, wait".
To my knowledge, Linux doesn't have autoplay. While I agree that autoplay is awful, it does make things easier for endusers.
I don't know if OSX has autoplay or not, but in any case with OSX it tends to be "put disc in, double-click the disc icon that just showed up". I haven't seen any equivalent for Linux - you usually have to find the install program or similar. God help you if you have a package manager - then you have to search for what you want to install!
People's brains freeze up when confronted with a computer. They'd much rather just put a shiny disc in and let the magic computer do its work. Seriously, you could sell "Linux application install discs" which are just a pack of CDs where each one has "aptitude install gimp", maybe a hudnred bytes each, and people would buy them.
Breaking Into the Industry - A development log about starting a game studio.