File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NetBeans oddity

 
Stephen Davies
Ranch Hand
Posts: 352
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently working on a simple command line game which requires a random int generated (to pull out a random array entry). I am working within the NetBeans 6.5 IDE and I am having a small issue. Writitng this simple test snippet in NetBeans:



One would expect to get a different number between 0 and 4, wach time main is called? well no, in NetBeans it always returns 0. To be sure I tried compiling and running from the command line and wouldn't you know it, I get random numbers between 0 and 4. So whats going on here, can anyone point me in the right direction? I cant find Much on the web, if it is infact a NetBeans issue or must I set some parameters?

:?
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the issue?
 
Stephen Davies
Ranch Hand
Posts: 352
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well it must be the late night here, because I realized I was running the wrong file, as the current clip above was not set a the main project file. In the words of Homer J Simpson.

DOH! ops:
 
Campbell Ritchie
Sheriff
Pie
Posts: 47286
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the exact printout you get from NetBeans?
 
Campbell Ritchie
Sheriff
Pie
Posts: 47286
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, I see you have sorted the problem :lol:

We have all done that sort of thing.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic