2024-07-13 12:27 AEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000108mercuryBugpublic2009-11-23 22:11
Assigned Towangp 
Product Version 
Target VersionFixed in Version 
Summary0000108: invalid java path with mercury and mingw
DescriptionMercury Compiler, version rotd-2009-09-15
mingw with gcc4.4 on windows vista

while compiling java grade, mercury compiler uses invalid path:
$ mmc --java -v --make family
% Invoking system command `/c/Java/jdk1.6.0_12/bin/javac -classpath :c:/mingw/me
db.jar -sourcepath Mercury\javas -d Mercury\classs -J-Xmx256m Mercury\javas\jmer
Error: system command received signal 1.

,must be:

% Invoking system command `c:/Java/jdk1.6.0_12/bin/javac -classpath c:/mingw/...
with c:\ and no : after -classpath or dot before :

% Invoking system command `c:/Java/jdk1.6.0_12/bin/javac -classpath .:c:/mingw/...

=== ===

after compiling and linking created sh file incorrect.

exec $JAVA jmercury.family "$@"

,must be:

TagsNo tags attached.
Attached Files




wangp (developer)

Thanks for testing.

I thought javac on Windows needs ";" separators instead of ":", as colons are
use to denote drive letters?

I will commit something for the CLASSPATH problem.


gloomdemon (reporter)

Yes, javac works normally with ":" as path delimiter, but better use ";".

Configure script under mingw also can not use java.exe (javac.exe) with spaces in path (i.e. c:/program files/java/jdk/javac.exe), and disable java grade.


wangp (developer)

I have committed fixes for the first two problems you mentioned.


wangp (developer)

Committed further fixes today, except for the problem with spaces in the path.


gloomdemon (reporter)

Hi, i get the rotd-2009-11-12 and try to install with java grade under mingw. And get error while linking java class files into grade library: path not found. This old error with /c/Java/jdk1.6.0_12/bin/javac, to check this, i use new compiler mmc --very-verbose --java hello.m and get:

% Compiling `jmercury\hello.java':
% Invoking system command `/c/Java/jdk1.6.0_12/bin/javac -classpath c:/mingw/mer
b.jar -J-Xmx256m jmercury\hello.java'...
??????? ?? ??????? ????? ????????? ????.
Error: system command received signal 1.
% Touching `hello.java_date'... done.

I decided recompile mmc with JAVAC=javac. I tried JAVAC='javac' ./configure ... and add JAVAC=javac to Mmake.params, but configure converts it to /c/Java/jdk1.6.0_12/bin/javac, so i hack configure and make new mmc. While making java grade (mmake LIBGRADES='java' install) get new error:

Making Java class files
Mercury\javas\jmercury\array.java:779: illegal unicode escape
// Mercury\opts\univ.opt:8

file array.java at line 779 contains:

// Mercury\opts\univ.opt:8
            V_4_38 = univ.type_to_univ_2_p_1(TypeInfo_for_T_28, V_12_12);

Mercury added comments on lines while compiling .m to .java but this is old java bug:



gloomdemon (reporter)

Converting comment like // Mercury\opts\univ.opt:8 to // Mercury\\opts\\univ.opt:8 solves this problem.


wangp (developer)

Thanks for the report. Committed a patch just then.

-Issue History
Date Modified Username Field Change
2009-09-28 11:38 gloomdemon New Issue
2009-09-28 22:56 wangp Note Added: 0000191
2009-09-29 03:35 gloomdemon Note Added: 0000192
2009-09-30 03:49 wangp Note Added: 0000193
2009-09-30 03:49 wangp Status new => assigned
2009-09-30 03:49 wangp Assigned To => wangp
2009-10-01 03:26 wangp Note Added: 0000194
2009-10-01 03:26 wangp Status assigned => resolved
2009-10-01 03:26 wangp Resolution open => fixed
2009-11-22 10:50 gloomdemon Note Added: 0000216
2009-11-22 10:50 gloomdemon Status resolved => feedback
2009-11-22 10:50 gloomdemon Resolution fixed => reopened
2009-11-22 11:02 gloomdemon Note Added: 0000217
2009-11-23 22:11 wangp Note Added: 0000218
2009-11-23 22:11 wangp Status feedback => resolved
2009-11-23 22:11 wangp Resolution reopened => fixed
+Issue History