'cannot find symbol'

I figure it’s about time to compile my own libraries.

I was able to follow the processing library template instructions for using eclipse to create the example HelloLibrary class.

It compiled. The library showed up as expected in my sketchbook libraries folder. The example loads and executes without a problem.

After that the nightmare began when I tried to execute a simple processing cmd in a new test method. I added the following method to the HelloLibrary class. Here 'tis:

public float getNorm(float f, float fr) {
	return norm(f/fr, 0, 1);
}

I get the following compiling error:

[javac] Compiling 1 source file to C:\Users\xxx\eclipse-workspace\asdf\processing-library-template-master\bin
[javac] warning: [options] bootstrap class path not set in conjunction with -source 8
[javac] C:\Users\xxxx\eclipse-workspace\ASDF\processing-library-template-master\tmp\ASDF\src\template\library\HelloLibrary.java:76: error: cannot find symbol
[javac] 		return norm(f/fr, 0.0, 1.0);
[javac] 		       ^
[javac]   symbol:   method norm(float,int,int)
[javac]   location: class HelloLibrary
[javac] 1 error
[javac] 1 warning

I’ve spent hours looking into solving this, without avail.

I’m running windows 7 pro. I downloaded the latest Eclipse (4.18) to use the latest execution environment (JavaSE-15) using the latest jdk (15.0.2). I followed the instructions. core.jar is added to the java build path as specified in the instructions (though the path to it is different than the instructions indicate; on my system core.jar is located in C:\Program Files\processing-3.3.6\core\library). The example java library template file contains the line import processing.core.*;

I’m at a loss. The last time I compiled java – in Eclipse then too – was about 15 years ago, and I don’t remember anything from back then.

Any help very appreciated!

I was able to read your post before it was deleted.

D’OH! Yes, of course you’re right!

I edited my method to the following. It compiled, and ran successfully.

public float getNorm(float f, float fr) {
	return processing.core.PApplet.norm(f/fr, 0, 1);
}

Thank you! Very much!

1 Like

Hi @Aleksi,

Sure thing. Sorry about the delete: I remembered another Eclipse tool which would’ve been a better answer, but then couldn’t find it. It’s this: Go to Window > Preferences, then in the pop-up window, in the left column, look under Java > Editor > Content Assist > Favorites.

LIke the blurb on the top of the GUI says, it may help Eclipse fill-in Processing classes and methods that you’ll be frequently re-using.

Best,
Jeremy

1 Like