0

I have a single file java program for my cs class that requires us to use the stdlib.jar library. I have imported the .jar file and it shows up in the java project overview

java project overview

as well as in the settings.json file.

settings.json file

The text editor suggests methods from the library

suggests methods from the library

and seems to know what they do.

know what they do

The problem shows up when i try to compile, i use the command line like i usually do, javac project.java, but it just gives me a error: cannot find symbol pointing to StdRandom.

pointing to StdRandom

I'm at my wits end with this problem and any help would be greatly appreciated.

Hovercraft Full Of Eels
  • 283,665
  • 25
  • 256
  • 373
  • You are not showing *how* you are using the command line to compile, nor what your classpath statement is when you do this. If the jar file is not in the command line classpath (or the jar's manifest's classpath), then this error will occur. – Hovercraft Full Of Eels Sep 19 '21 at 17:31
  • Thanks i was using javac project name and had tested javac -cp ".jar path" but i used it wrong since i was on windows and i should have been javac -cp ".;../../stdlib.jar" .\project.java and i also had to use those parameters when running – Þorvaldur Tumi Baldursson Sep 19 '21 at 17:55

0 Answers0