problems linking classes,

0 views
Skip to first unread message

Giulio

unread,
May 10, 2005, 5:21:50 AM5/10/05
to
Perfect code: one class in one file, instanciating the class in another
class.
Jbuilder 2005 EE can't find the class instanciated.
Often times it's enough to open the file and to go back to the
instanciating file and it works.
Other times I've just to save the file again and it works... other times
I don't know how to solve the problem.

to be more precise:
both classes belongs to the same package, and jbuilder said that the
files have been moved

randomGenerator.java:
------------
public class randomGenerator {
Random rnd;

randomGenerator() {
rnd = new Random();
}
...
---------------
arrival1.java
---------------
public class arrival1 extends event {

private float time;
public void arrival1(float clock) {
randomGenerator rnd = new randomGenerator();
time = clock + rnd.getNextTime();
}
....
--------------------------
randomGenerator rnd = new randomGenerator();
time = clock + rnd.getNextTime();

in these two rows jbuilder says: that it cannot find symbol: class
randomGenerator, location : class system.arrival1 .....

I had similar problem also with other versions of jbuilder.

can someone help me to solve this prob?

thanx
Giulio

Reply all
Reply to author
Forward
0 new messages