We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › class definition problem
Page Index Toggle Pages: 1
class definition problem (Read 898 times)
class definition problem
May 25th, 2005, 7:48am
 
I've a class definition problem.

I copy the code from class example and past to processing 0090 beta but it can't run.

Here is message:
Code:

java.lang.NoClassDefFoundError: Files\Symantec\Norton
java.lang.NoClassDefFoundError: Files\Symantec\Norton


Exception in thread "main"
Exception in thread "main"


If I change class and object definition to comment then the problem is gone.

Is any body can tell me why?

This is my code. it can be run if I change "draw()" to "loop()" in processing 69 alpha.

Code:

Wave[] river;
int waveNum=10;

//--------------------------------------------------
void setup(){
size(640, 480);
framerate(12);
river=new Wave[waveNum];
for(int i=0; i<waveNum; i++){
river[i]=new Wave(int(random(150)), int(height/2), int(height/2+height/2), 2);
}
}

void draw() {
background(0);
for(int i=0; i<waveNum; i++){
river[i].startMove();
}
}

//---------------------------------------------------
class Wave{
float noiseScale=random(0.001, 0.005);
float xConver;
float yConver;
float waveConver=random(0.001,0.005);
int myAlpha, startH, endH;
float randomGB1,randomGB2;
Wave(int _myAlpha, int _startH, int _endH,int _randomNum){
this.startH=_startH;
this.endH=_endH;
this.myAlpha=_myAlpha;
this.randomGB1=random(_randomNum);
this.randomGB2=random(_randomNum);
}
void startMove(){
for(int x=0; x<width; x++) {
xConver+=waveConver;
yConver+=waveConver;
float noiseVal = noise((this.xConver+x)*this.noiseScale, this.yConver*noiseScale);
float colorPic=noiseVal*255;
stroke(0,colorPic/randomGB1,colorPic/randomGB2, myAlpha);
line(x, noiseVal*startH, x, noiseVal*endH);
}
}
}


Re: class definition problem
Reply #1 - May 25th, 2005, 9:52am
 
it runs, but reaaaally slow.. if i change size(640,480) to size(640,480,P3D), it's faster, but some of the lines are messed up, so it doesn't look good..

but i'm not getting any errors out of this..

-seltar
Re: class definition problem
Reply #2 - May 25th, 2005, 11:34am
 
thanks a lot.

I already try it in another computer, it runs.

I try to use same way to draw a color square in P3D mode, but still miss some lines.

Code:

void setup(){
size(200, 200, P3D);
}

void draw(){
for(int i=0; i<width; i++){
stroke(0,i,0);
line(i, 20, i,90);
}
noStroke();
fill(0, 150, 255);
rect(0, 110, width, 70);
}

Re: class definition problem
Reply #3 - May 25th, 2005, 5:03pm
 
see here for info:
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1114153542;start=0#0
Page Index Toggle Pages: 1