• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Cross platform programming

Vesku

Diamond Member
I'd like to make a desktop app in a high level programming language with garbage management: Java or Python for example. I'd like to be able to deploy it as a stand alone executable. I've done some internet searching and have read mixed things on how portable Java apps are between OSes. Also, from my minor familiarity with Python it seems that I could use the wxWidgets library but since Python is an interpreted language I'd have to have any users install Python for their OS.

Interested in new information and any dispelling of misconceptions I might have.

To clarify, is there a decent language+libraries combination for creating a standalone executable for Linux, MacOSX, and Windows from the same source?
 
Well, python pretty much guaranteed to be on any linux or os x machine, but probably highly unlikely to be on windows. OS X 10.4 at least has a pretty old version though (dunno about 10.5).

Java you'll always find on OS X, probably hit and miss on linux (and potentially tricky because lots of distros try to use gcj out of the box which might work and it might not) and a fair chance on Windows because everybody thinks they need it to use websites with javascript.

Other than those issues, it's no harder to write a portable application in java than it is in python (unless you also want it to run on non-intel platforms). Just keep an eye on the api features that you require with regards to versions: will you support people with jre1.4 or python 2.3, to pick some random numbers? And of course, don't do anything operating system specific. It's safe to say you have to test on all 3 platforms to have much hope of success.

Also, unless you're distributing a collection of .py/.pyc files or .class/.jar files, you will need operating system specific packaging to give users a handy click-to-run executable.

A couple of other thoughts... you could probably manage to bundle python into a windows executable so that users don't have to install it. It'd be large though and would take some know-how. There's also the question of where you'll get non-standard libraries like wxwidgets. On linux you could require the user to install it through their package manager or you could bundle it with your app. On windows you'll almost certainly have to bundle it. On OS X it could go either way, although most likely it's not pre-installed, I think.

Windows would be so much nicer if Microsoft took the time to include some of the basic, free software that so many people use like python, openssh, a decent shell... Apple does it decently and it's quite nice when you're trying to do something like this.
 
Hmm, so Java will be ok as long as it's all x86? Also, Java on Linux is still iffy? I think I'd try and figure out how to install the necessary components if not present before deciding to code for an older release of Python/Java.
 
Well, most distributions have a quick and easy way to install Sun's Java kits. Otherwise all you really need to do is download the kit you need and install it manually.
 
Java can also work fine on non-x86 platforms. Java on linux is iffy because JVMs are not always installed by default... users of distros that don't auto-install JVMs will probably know how to install one, though.
 
With either python or java you'll need to install the libraries or JVM on many PCs. Some vendors like Dell might pre-install some version of the JVM as an add-on but Microsoft doesn't include it with Windows.

A few years ago we looked at using java for a content player of self-study activities but switched to Flash instead. We didn't need to read or write documents though, just display pre-written content.
 
Originally posted by: degibson
Java can also work fine on non-x86 platforms.
But how many platforms does Sun release binaries for? As far as I'm aware, ports to other architectures have mostly been made by operating system/hardware vendors like Apple and HP. I imagine gcj is probably way better in this respect though.

Originally posted by: nova2
"Why I don't like Java - posted by slava pestov" (jEdit text editor developer)
Why_I_do...ed-by-slava-pestov.htm

however, maybe java has improved on some of these things.
Java the language is slowly dying. Well, it'll never die, it'll be like cobol or something. I think some of the things Mr Pestov was complaining about were pretty subjective but I think a lot people do agree that Sun has not done a very good job since 1.5 in general. The jvm, on the other hand, appears to be far from dead. There's an almost .net-like interest in running multiple languages on the same platform, sharing the common apis. JRuby looks interesting, Jython seems like it's being developed again and scala is quite interesting. I dunno if it'll go anywhere, but it seems like the basic vm technology is still seeing a lot of growth.
 
Originally posted by: kamper

But how many platforms does Sun release binaries for? As far as I'm aware, ports to other architectures have mostly been made by operating system/hardware vendors like Apple and HP. I imagine gcj is probably way better in this respect though.

Check out http://java.sun.com/javase/6/w...em-configurations.html
You can get SPARC, x86, x64 JVMs from Sun itself. On google I see there are JVMs for handhelds, PPC, lots of platforms. Considering 99% of 'desktop' users are x86, the ASI isn't all that important if you go with JAVA -- what IS important is the version of the JVM.

I think the boat is still out overall on Java, as to whether it or its descendants will survive in style or in obscurity. It is still a popular middleware layer, and managed languages have a chance at helping with the parallel programming crunch.

In any case, if you want cross-platform (without recompilation) I think your best best is Java.

(edited to clarify first paragraph)
 
You're correct, the whole non-intel desktop thing was a bit pointless to bring up 😛 But since I'm interested... handhelds will be a different story because you won't have the full java se system there. I only see a sparc version for solaris, which is a no-brainer because that's where it was invented, but who uses solaris on sparc for a desktop? 😛 PPC, which operating systems did you see it for? There's apple's distro with the going-obsolete ppc macs (which is slow as hell in my experience). I'm sure IBM has a jvm or two for power, but that'd all be servers.
 
Originally posted by: kamper
Windows would be so much nicer if Microsoft took the time to include some of the basic, free software that so many people use like python, openssh, a decent shell... Apple does it decently and it's quite nice when you're trying to do something like this.

So many being 0.1% of the population?
 
Originally posted by: IHateMyJob2004
Originally posted by: kamper
Windows would be so much nicer if Microsoft took the time to include some of the basic, free software that so many people use like python, openssh, a decent shell... Apple does it decently and it's quite nice when you're trying to do something like this.

So many being 0.1% of the population?

Yes, sadly the powerusers are in the minority. However, those things wouldn't be limited to powerusers if they were prevalent on Windows -- they're like building blocks for other, more bourgeois applications.
 
Originally posted by: IHateMyJob2004
Originally posted by: kamper
Windows would be so much nicer if Microsoft took the time to include some of the basic, free software that so many people use like python, openssh, a decent shell... Apple does it decently and it's quite nice when you're trying to do something like this.

So many being 0.1% of the population?

I'll let Mr Balmer handle this one.
 
Back
Top