NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
Tim Burke Posted via mailing list.
|
Posted: Fri Jun 04, 2010 6:17 pm Post subject: NB 6.9RC2 does not see class java.lang.Math |
|
|
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.
|
Posted: Fri Jun 04, 2010 7:02 pm Post subject: NB 6.9RC2 does not see class java.lang.Math |
|
|
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 |
|
 |
|
|
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
|
|