In my efforts to do things properly, I’ve removed my various .jar files from the Library/Java/Extensions directory, and am attempting to modify the CLASSPATH environment variable to work as I can only assume it should; but I’ve hit a few blocks…
- ‘export Classpath=[path]’ does not work for more than the one time I run Terminal. If I close and reopen, it’s no longer set. I was under the impression that environment variables were more permanent than that.
Anyhow, assuming I was wrong, I went ahead and edited (read "added) my ~/.profile to include the above ‘export’ line. Now I get the environment variable right on every time… Only problem is that 2) when I type, say “java demos.gears.Gears” from within the jogl-demos/build directory, it still won’t run. Okay, so I add the demos .jar file:
java -cp jogl-demos.jar demos.gears.Gears
This works, but for some reason, it’s not reading ANYTHING that’s already in my CLASSPATH environment variable to be included in the running of said java app. If, however, I type:
java -cp jogl-demos.jar:$CLASSPATH demos.gears.Gears
…the program runs without a hitch.
So the question comese dow to – what am I doing/interpreting wrong/incorrectly? Is the CLASSPATH variable just a convenience thing, perhaps, and not actually intended to be a default search path for classes when starting a java program?
sorry, I’m a tad frustrated at my own incompetence
Any help is appreciated.
–Scott