PDA

View Full Version : cross platform coding??


X_X
2005-12-19, 10:12
Hi, just first off the bat i want to say i know very little about code lol. i'm just doing some snooping for a friend.
what i would like to know is, what would you guys recomend as a coding language when developing an app that will be used cross platform, IE: version on both mac and pc. development will be taking place on a pc, but the aim is to have it work on macs as well.

we are now steering clear of java for a few reasons, and seeing as it was the obvious and easy choice, now we are all looking elsewhere, hence my questions ;)
any advice would be great :D
thanks

Brad
2005-12-19, 10:38
Program in C/C++ and stick to stdlib? :p

ie. Outside of Java, very few application-level languages have cross-platform libraries.

If you're doing non-GUI stuff, Perl, Ruby, etc. are all viable options.

spotcatbug
2005-12-19, 12:05
RealBASIC is cross-platform. I've never used it, but there you go.

deuce868
2005-12-19, 12:08
Web development :)

ezkcdude
2005-12-19, 14:32
Seriously, I think Java is still the answer. You shouldn't avoid it just because people bad mouth it all the time. I am assuming that performance is not the issue, so if the main goal is actually to have code that runs without problems on the Mac and PC, Java is the de facto standard.

One issue that could be a deal-breaker, and we have run into this problem in my lab, is the hard upper limit on RAM. We do a lot of imaging, and this can be a problem, unless dealt with in a very sophisticated way. In this case, I would just write in standard C and compile using gcc on both platforms (as I see was Brad's suggestion).

X_X
2005-12-19, 18:52
well the main reason we are now looking away from java is that when he sent me a wip bit of code bundled in a .jar file it wouldn't open, thinkning it was perhaps because he has 1.5 installed and maybe i didnt i DL the latest java release for osx, but on instalation it said i already had a later version of java installed :confused:

the terminal spits out this info:
"java version "1.4.2_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-232)
Java HotSpot(TM) Client VM (build 1.4.2-54, mixed mode)"

so i'm guessing it is cause i dont have 1.5, but i would have thought the latest installer would have fixed that (i DLed Java15Release1.dmg from the apple web site)

so, i'm not sure what the cause of the problem is

pmazer
2005-12-19, 19:45
Also look into Qt: http://www.trolltech.com/

Enki
2005-12-19, 23:56
well the main reason we are now looking away from java is that when he sent me a wip bit of code bundled in a .jar file it wouldn't open, thinkning it was perhaps because he has 1.5 installed and maybe i didnt i DL the latest java release for osx, but on instalation it said i already had a later version of java installed :confused:

the terminal spits out this info:
"java version "1.4.2_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-232)
Java HotSpot(TM) Client VM (build 1.4.2-54, mixed mode)"

so i'm guessing it is cause i dont have 1.5, but i would have thought the latest installer would have fixed that (i DLed Java15Release1.dmg from the apple web site)

so, i'm not sure what the cause of the problem is

Well, it might just be because he didn't get the manifest file right. It should at least open and try to run, then crap out with an exception if there is a JVM version mismatch.

And if you have Java 1.5 installed on a OS X box but haven't chosen 1.5 as the default JVM in the Java Preferences.app [Utilities/Java] your box will still use the 1.4.2 JVM unless the Java code specifically calls for the 1.5 JVM. Here is the latest OS X Java installlatest OS X Java install (1.5 release 3). (http://www.apple.com/support/downloads/java2se50release3.html)

X_X
2005-12-20, 02:29
i installed the linked version enki, and went to java prefs but i can only choose between 1.4.2 and J2SE 5.0 i can't see any 1.5.
and both give the same error:
"The jar file "test.jar" couldn't be launched. Check the Console for possible error messages"

thanks for the link pmazer :) i'll look into that too. would there be any obvious downsides to QT?

staph
2005-12-20, 02:43
thanks for the link pmazer :) i'll look into that too. would there be any obvious downsides to QT?

If you're developing a commercial, closed-source, for sale application, you may have to pay them a licencing fee (there's a GPL toolkit, which is obviously free, but derivative works have to be GPL'd). See here (http://www.trolltech.com/products/licensing.html) for more details.

Enki
2005-12-20, 11:38
i installed the linked version enki, and went to java prefs but i can only choose between 1.4.2 and J2SE 5.0 i can't see any 1.5.
and both give the same error:
"The jar file "test.jar" couldn't be launched. Check the Console for possible error messages"

thanks for the link pmazer :) i'll look into that too. would there be any obvious downsides to QT?

JVM 1.5 is Java 5.0! Just like JVM 1.2 was Java 2! I have no idea why they took the holiday on 3 & 4. Don't you just LOVE Sun's naming schemes?

Did he tell you it was double-clickable? Or just runnable? Because if it is just "runnable" then the manifest file hasn''t been pointed to the main class and you run it from the command line only. If he told you double-clickable then the manifest file is broken.

X_X
2005-12-21, 01:47
k well i got a new .jar and i played around with settings in the java prefs and now it works *woot*
thanks for all the input guys, its been very helpfull.
We'll look into QT, see how it compares to java etc.. :cool: