views:

96

answers:

6

I have a fair bit of knowledge of Java and C#.NET (prefer C#).

What should I use to create small applications that will work well in Windows, Mac and Linux? Speed will probably not be the main concern (small applications; using Sockets etc).

+4  A: 

Java

because

  1. Java works on Windows,Linux and Mac and even on Mobile phones.(and its official -@cletus)
  2. Java has got good platform independent Sockets Library.
  3. Eclipse is great tool for Java Development. (NOTE:you will miss visual studio but not as much)
  4. GUI in Java is NOT that BAD.(Example1,Example2)Thanks @Riduidel.
  5. I don't think mono is as mature and as good as .NET yet.
TheMachineCharmer
Like the socket library is relevant;) ALL of java is quite decent in a platform independant fashion. As much a C# fan as I am;) Just make sure you can test on all platforms to get around little java quirks here and there.
TomTom
@TomTom ;) I suggested java because I don't think `mono` is as mature and as good as `.NET` yet.
TheMachineCharmer
Agreed. I just say pointing out the sockets library makes little sense. ALL of java is platform independant. The sockets libarry is like the smllest part and the easiest.
TomTom
@TomTom :)) Got your point! hahaa
TheMachineCharmer
I like 'GUI in Java is NOT that BAD' - anything you have to describe like that obviously isn't good. You're correct too - Java will be the least hassle to get working on all platforms.
Keith
GUI in Java are way cooler than you seems to state. There are some really great Swing applications around.
Riduidel
+1 @Riduidel would you please name some of them.
TheMachineCharmer
Without giving application names (as most of them are corproate ones), take a look at this pushing pixel entry : http://www.pushing-pixels.org/?p=119 or at palantir showcase : http://blog.palantirtech.com/2008/07/04/palantir-screenshots-round-two/#more-95
Riduidel
A: 

If you are creating a server application I would most likely go for Java, but you could also look at Mono for cross platform.

For a desktop application I would try Mono, since I'm mostly a .Net guy. And the desktop apps created in Java are not that appealing graphics wise. Or try to go with SilverLight, but that's not supported as well under Linux (MoonLight).

Mikael Svenson
A: 

If you really want to use C#, try Mono: http://www.mono-project.com

thelost
+2  A: 

Both of those are viable options.

Java is officially supported on all three platforms.

C# can be used on Linux and Mac if you're prepared to use the subset of .Net supported by Mono.

Which is more suitable depends on which you're more comfortable with and the exact requirements of the applications you'll be developing.

cletus
+1  A: 

Java is your best bet. C# and .NET won't work on Mac and Linux without a lot of hoop jumping and headaches. Another option for smaller programs is something like Python.

Mimisbrunnr
As much a C# fan as I am, that is simply true. Just make sure you can test on all platforms to get around little java quirks here and there.
TomTom
+1  A: 

Pure Java is your best bet.

ultrajohn