Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Java and mac
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Tallguy




PostPosted: 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
Sponsor
sponsor
DemonWasp




PostPosted: 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




PostPosted: Fri Feb 11, 2011 3:04 pm   Post subject: RE:Java and mac

Compile from the command line. Screw clunky IDEs.
Tallguy




PostPosted: 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...


untitled folder.zip
 Description:
.java fiels

Download
 Filename:  untitled folder.zip
 Filesize:  2.11 KB
 Downloaded:  103 Time(s)

Tallguy




PostPosted: 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




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: