NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

NB 6.9RC2 does not see class java.lang.Math

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
Tim Burke
Posted via mailing list.





PostPosted: Fri Jun 04, 2010 6:17 pm    Post subject: NB 6.9RC2 does not see class java.lang.Math Reply with quote

I have installed NB 6.9RC2 (using JDK 1.6), and created a project
(BonusPoker). No problems. I have used Subversion for version control.
Again no problem.

I copied a very simple procedure that used Math.random(). This
procedure compiled and worked under NB 6.8 (JDK 1.5). NB6.9RC2
indicates that the package Math needs to be created in my new class.

I can compile the existing source code using JDK 1.6 in batch (javac).
So javac (as a standalone process) does see java.lang.Math (Of course!)

Here is the procedure (and class for that matter).

package com.bcs.bonuspoker;
public class BonusPoker {

/**
* constructor
*/
void BonusPoker() {
}

private int getRandomNumber(int maxValue) {
int randomValue = (int) (Math.random() * maxValue);
return randomValue;
}
}


I would like to know why NB 6.9RC2 does not seem to see the package
java.lang.Math. Any suggestions?

Thanks.
--
Tim Burke
address-removed
(303)979-1950
Back to top
Tim Burke
Posted via mailing list.





PostPosted: Fri Jun 04, 2010 7:02 pm    Post subject: NB 6.9RC2 does not see class java.lang.Math Reply with quote

The problem I was seeing seems to be related to the type of project I
was using. I had started to look at a Java Card project.

When I created a new Swing project, NB6.9RC2 has no problem with the
Math.random reference. So I guess I need to research the meaning of a
Card project a bit more.

Sorry for the question. I have resolved it to my satisfaction.
Thanks all.
--
Tim Burke
address-removed
(303)979-1950
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo