This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Building my project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Building my project" Watch "Building my project" New topic
Author

Building my project

Ryan James
Greenhorn

Joined: Apr 18, 2007
Posts: 15
I'm using netbeans, and am trying to run and compile my program - however when I press build and run java spikes to 98% CPU usage, I left it for 15 minutes just incase the main function of the program may take a bit longer to run however on a 3ghz machine, which 1.5gb of RAM it seems odd:



My friend suggested adding the Thread.sleep to it to space out the program, the main function is of course to find all even fibonacci numbers below 4 million and add them together, can anyone see a reason the program is causing such an issue to compile.
Bill Cruise
Ranch Hand

Joined: Jun 01, 2007
Posts: 148
Without looking for problems anywhere else, I see that this line

while (c <= 4000000);

loops forever. Remove that semicolon and try it again.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Building my project
 
Similar Threads
Need help with Incompatible type error
exam qs- object orientation- help!
GPA Program ......... Error
GPA Program ... Error Again....In JCreator
Help ! This code compiles but does not run: NoClassDefFoundError: Classpath info?