I am trying to start rascal with clair from the command line, however I do not understand why this happens:
java -cp "rascal-0.18.0.jar;clair_0.1.0.202005281059.jar;org.eclipse.cdt.core_6.11.0.202003081657.jar" org.rascalmpl.shell.RascalShell
Version: 0.18.0
INFO: detected |lib://rascal| at |jar+file:///C:/ws/rascal-0.18.0.jar!/|
INFO: detected |lib://clair| at |jar+file:///C:/ws/clair_0.1.0.202005281059.jar!/|
rascal>
But when the order of the jars changes, it fails:
java -cp "clair_0.1.0.202005281059.jar;rascal-0.18.0.jar;org.eclipse.cdt.core_6.11.0.202003081657.jar" org.rascalmpl.shell.RascalShell
Version: 0.18.0
INFO: detected |lib://clair| at |jar+file:///C:/ws/clair_0.1.0.202005281059.jar!/|
INFO: detected |lib://rascal| at |jar+file:///C:/ws/rascal-0.18.0.jar!/|
main function should either have one argument of type list[str], or keyword parameters
Usage: java -jar ...
Is this normal behavior with classpaths?
Note: The clair jar does not contain a org.rascalmpl.shell.RascalShell class.
Update: Removing from META-INF/RASCAL.MF the line:
Main-Function: main
Main-Module: lang::cpp::IDE
resolves the problem, so it seems to be an issue with Rascal (and a rascal function) and not with Java (and a Java function).