Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

UserZero

macrumors newbie
Original poster
Jan 1, 2007
2
0
Hello all and thanks for your advice in advance. So I'm learning Java and of course am using the Best Platform in the World to write the code on. :D . I have been using eclipse (and Editra some) but am wondering if anyone has any better suggestions on IDE's (not just good text editors).

I'm having an issue that my programs will run great on mac, but when I take them to a PC they(meaning anything I write) don't run at all, I always get an error (I don't think it even gives me an error I think they just don't run, it's been awhile).They are just some basic one frame GUI apps. I'm wondering if anyone else has run into this. I know I'm not putting any apple specific code into these things as they are mainly exorcises from a book written assuming that you would develop on a winblows box.

Thanks
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
I prefer NetBeans as my Java IDE because of the fact that it automatically makes a redistributable JAR file for your application, AND handles all dependencies for you by putting them in a lib folder. This makes running Java applications on Windows (and Linux) much simpler, since all you have to do is double-click the JAR file.
 

Winni

macrumors 68040
Oct 15, 2008
3,207
1,196
Germany.
Well, thanks to Apple's sincere disinterest, the Mac most certainly is NOT the best platform to develop Java applications on. And Java's multi-platform capabilities usually run down to "write once, debug everywhere" anyway - meaning that you always write your code for one specific VM and hope to make it run on this VM.

Netbeans has come a long way in the last years and matured a lot. It has gained a lot of popularity, but I nevertheless think that you should just stay with Eclipse. No matter how much marketing Sun puts behind Netbeans, Eclipse is what the biggest Java company in the world champions. And the biggest Java company is not Sun, the creator of the language, it's IBM.
 

toddburch

macrumors 6502a
Dec 4, 2006
748
0
Katy, Texas
This usually works fine for me. What SDK are you using? Post a small sample of code that fails. How are you sending your class file to other op systems?
 

Burtonsnow9

macrumors regular
Feb 22, 2008
137
0
You also may want to check simple things like whether or not you have java installed in the windows machine. Simple things are always killer haha.
 

AUFan

macrumors newbie
Feb 2, 2008
27
0
Hello all and thanks for your advice in advance. So I'm learning Java and of course am using the Best Platform in the World to write the code on. :D . I have been using eclipse (and Editra some) but am wondering if anyone has any better suggestions on IDE's (not just good text editors).

I'm having an issue that my programs will run great on mac, but when I take them to a PC they(meaning anything I write) don't run at all, I always get an error (I don't think it even gives me an error I think they just don't run, it's been awhile).They are just some basic one frame GUI apps. I'm wondering if anyone else has run into this. I know I'm not putting any apple specific code into these things as they are mainly exorcises from a book written assuming that you would develop on a winblows box.

Thanks

Are you making any calls to any Mac / UNIX graphics API's, or are you sticking to Swing for the GUI apps? If you're making any Mac specific calls in your program, the program will not work on Windows. The other thing to check is if Java is installed on the windows box and you have the right paths set up.

Since you do mention you don't have any Mac calls, try rewriting the code (not copying/pasting) on the windows box and seeing if it works/compiles and go from there. You may have to fiddle with the java path inside MS.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.