Java and mac
Author |
Message |
Tallguy
|
Posted: Fri Feb 11, 2011 1:13 pm Post subject: Java and mac |
|
|
Im trying to do an assignment for school with java, on my mac. Some functions using eclipse dont seem to function with OSX (GUI, boolean expresion etc) is there a good java environment for mac that actually runs all the code?
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
DemonWasp
|
Posted: Fri Feb 11, 2011 2:23 pm Post subject: RE:Java and mac |
|
|
What is Eclipse doing that makes you think it isn't working correctly? Is it possible that the error is in your code (ie your program behaves incorrectly) or is it in the IDE (Eclipse itself behaving incorrectly)?
|
|
|
|
|
|
Insectoid
|
Posted: Fri Feb 11, 2011 3:04 pm Post subject: RE:Java and mac |
|
|
Compile from the command line. Screw clunky IDEs.
|
|
|
|
|
|
Tallguy
|
Posted: Fri Feb 11, 2011 3:05 pm Post subject: Re: Java and mac |
|
|
well on the mac it doesn't work but on a buddies dell it does, i dont think there is a code error, i've linked my code have a look, in mine when i ask for a new wizard actor and i ask for 'has horse' which is a boolean expression it has errors, also when i try to add a GUI to the code it only has a GUI for the first get statement and nothing else...
Description: |
|
Download |
Filename: |
untitled folder.zip |
Filesize: |
2.11 KB |
Downloaded: |
103 Time(s) |
|
|
|
|
|
|
Tallguy
|
Posted: Fri Feb 11, 2011 3:05 pm Post subject: RE:Java and mac |
|
|
may be the IDE, and if it is how do i check/fix it?
|
|
|
|
|
|
DemonWasp
|
Posted: Fri Feb 11, 2011 3:13 pm Post subject: RE:Java and mac |
|
|
If you're talking about the IllegalFormatConversionException you get, that's because your printf statement is wrong. You put "%d" when you wanted "%b". You can read the documentation here.
With that corrected, I see your code as running correctly. In general, it is best to assume that, if something isn't working for you, you have made a mistake. It's a tough lesson to learn, but programming becomes easier and less frustrating when you do so.
|
|
|
|
|
|
|
|