Simplify use of the Java grade by automatically setting the classpath.

Estimated hours taken: 1.5
Branches: main

Simplify use of the Java grade by automatically setting the classpath.

scripts/Mercury.config.in:
scripts/Mercury.config.bootstrap.in:
	Set the --java-classpath option in DEFAULT_MC_FLAGS.
	Define STD_LIB_NAME, RT_LIB_NAME.

scripts/c2init.in:
	Add the above two files to the list of those which use STD_LIB_NAME and
	RT_LIB_NAME.

library/Mmakefile:
	Use RT_LIB_NAME instead of STD_LIB_NAME.runtime

compiler/modules.m:
	Remove the XXX comment that worries about this issue.

README.Java:
	Remove instructions relating to setting the classpath manually.
This commit is contained in:
James Goddard
2004-02-12 02:48:37 +00:00
parent 10e8ffcde5
commit bf70ebd080
6 changed files with 26 additions and 22 deletions

View File

@@ -37,22 +37,9 @@ The Mercury compiler currently supports the grade `java' to target Java
bytecode. The java grade is enabled by using any of the options
`--grade java', `--target java', or just `--java'.
Support for building and installation of this grade
is still somewhat rudimentary.
To run a Mercury program using the java grade, you need to build the Mercury
library and runtime in the java grade, using the Mercury source distribution.
You will also need to set the environment variable CLASSPATH to include the
mercury standard and runtime libraries for java, as well as the current
directory. You should use a command of the form:
CLASSPATH=<prefix>/mer_std.jar:<prefix>/mer_std.runtime.jar:.
export CLASSPATH
where <prefix> is the location of the installed jar files, which will probably
be /usr/local/mercury/lib/mercury/lib/java or something similar.
You can now build programs such as hello.m or calculator.m in the samples
directory.