Skip to content

not setting CLASSPATH in bash

So basically i have a project with a lot of packages and the corresponding jars.

im trying to run the program and to do so i need to set my CLASSPATH the thing is when im trying to set it it says command not found for some reason.

What i did was:

[email protected]:~/project/woo-app>CLASSPATH = /usr/share/java/po-uulib.jar:/home/martimc/project/woo-app/:/home/martimc/project/woo-app/

Bash : CLASSPATH: command not found

I dont understand why this is happening


Setting environment variables in bash requires no spaces before or after the =. Furthermore, you’d have to put export in front or it won’t actually provide that var to java. Lastly, don’t use CLASSPATH at all; java can run many apps, apps need different classpath, so the concept of a global classpath makes no sense. Just use the -cp parameter.