I have had some problems using classpath with java in the past, but I have always been able to get things working. That was up until about 3 years ago. For the past 3 years I worked on a python project. That is done and my java project is now off the shelf. I have a number of errors in Eclipse regarding issues with classpath for jar files not being resolved properly.
I put together a few test cases, but one of them has me baffled. I'm pretty sure that I'm specifying my classpath option properly, but it fails.
I have attached a zip file that contains my 4 current text cases. My test cases assume that you have 'make', 'sh' (sh, bash, or ksh) and jdk1.8. I put these together on a Linux system. If you unzip the attached file you get the test cases, including a README file that covers a lot of what am saying here.
In the top level directory of the extracted files are 2 shell scripts. If you run these scripts, they should do everything for you, i.e. do a build and then run java, directing the output to stdout.
Each script runs 2 testcases. If you run these scripts, 3 of the 4 test cases fail. I believe only 1 of the 4 should fail. The two cases that should pass, but don't, are in script2. In script1, I use the environment variable 'CLASSPATH' and the script runs as expected. In script2, I use the '-classpath' option and I get error messages and I think both should run properly.
Can anyone review these (hopefully run them) and comment on why the -classpath option is failing?
Jim A