View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0000339 | mercury | Bug | public | 2014-06-22 07:19 | 2015-07-14 17:30 | ||||
Reporter | sebgod | ||||||||
Assigned To | juliensf | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Platform | Windows NT 6.3 x86_64 | OS | Windows | OS Version | 8.1 | ||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000339: mmc --java with Oracle Java 1.8.0 fails on Windows | ||||||||
Description | Making Java class files An exception has occurred in the compiler (1.8.0). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you. java.lang.AssertionError: the -J flag should be caught by the launcher. at com.sun.tools.javac.main.Option$20.process(Option.java:330) at com.sun.tools.javac.main.Main.processArgs(Main.java:260) at com.sun.tools.javac.main.Main.compile(Main.java:414) at com.sun.tools.javac.main.Main.compile(Main.java:381) at com.sun.tools.javac.main.Main.compile(Main.java:370) at com.sun.tools.javac.main.Main.compile(Main.java:361) at com.sun.tools.javac.Main.compile(Main.java:56) at com.sun.tools.javac.Main.main(Main.java:42) | ||||||||
Steps To Reproduce | Compile any program using the Java grade | ||||||||
Additional Information | Break resulted only from installation of the Java JDK 8.0; recompilation of the Mercury compiler did work but did not change the given output. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files |
|
Notes | |
juliensf (administrator) 2014-06-25 16:59 |
Do you know if this occurred / occurs with older versions of Java on the same system? |
sebgod (reporter) 2014-06-26 23:46 |
On the same machine, I had Java 1.7.5x installed, Mercury was working fine with that version. Then I upgraded Java to 1.8.0_05, When using the command line: mercury --use-grade-subdirs -s java -m libmercury_misc (e.g.) then I received the aforementioned error. Rebuilding the compiler did not resolve that issue. I could reproduce the error with Mercury 14_01 MinGW32 on Windows XP SP3 with Java 1.8.0 (okay that is not supported but still I got the same error) |
wangp (developer) 2014-06-27 11:13 Last edited: 2014-06-27 11:13 |
Can you try editing your lib/mercury/conf/Mercury.config file This line has the wrong quoting --java-flags "-J"-Xmx1024m"" Try fixing the quoting to --java-flags "-J-Xmx1024m" Or perhaps removing the line completely. It may not be needed any more. |
sebgod (reporter) 2014-06-27 17:21 |
Fixing the quoting to --java-flags "-J-Xmx1024m" still resulted to the complain from the Java compiler, removing on the other hand resulted in a successful compilation. |
juliensf (administrator) 2014-06-27 17:29 |
I believe that the quoting on Windows needs to be something like: --java-flags "-J\"-Xmx1024m\"" That seems to be what I've done in the binary packages for Windows at any rate. |
sebgod (reporter) 2014-06-28 04:00 |
Using (in the .config) --java-flags "-J\"-Xmx1024m\"" yields the same error, I suppose this is a JDK bug. I'll have to do some tests with "normal" Java programs and will check the http://java.sun.com/webapps/bugreport the javac compiler kindly provides. |
sebgod (reporter) 2014-07-05 21:09 Last edited: 2014-07-05 21:11 |
I've tracked down the bug, Using the mmc -V option I received the content of the "javac @tempfile" % Args placed in @C:\Users\SEBAST~1\AppData\Local\Temp\mtmp000.3D2: `-classpath <snip> -sourcepath <snip> -d <snip> -J-Xmx1024m Mercury\\java\\i686-pc-mingw32\\Mercury\\javas\\jmercury\\fmt_bug.java' When invoking javac + the arg string directly on the command line, the compilation is successful. On a side note, the -J flag is correctly escaped. Now if I create that @tempfile manually, and running javac @tempfile myself, I do get the original error with the -J flag not being captured. Checking the Oracle online documentation for javac: http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/javac.html revleas that: @argfiles One or more files that lists options and source files. The -J options are not allowed in these files. I suspect that the assertion in the javac compiler was added in Java 8.0, such that the -J flag passed via the @options-file was previously unnoticed (and most probably dysfunctional) |
juliensf (administrator) 2015-04-05 15:18 |
This was fixed in commit 9c85673. |
juliensf (administrator) 2015-04-08 13:51 |
Actually, commit 9c85673 only fixed the quoting issue. I'll look into fixing the issue with the -J option being placed in the @options file. |
juliensf (administrator) 2015-07-14 17:30 |
Fixed (hopefully, for good) in commit d7857cf. |
Issue History | |||
Date Modified | Username | Field | Change |
---|---|---|---|
2014-06-22 07:19 | sebgod | New Issue | |
2014-06-25 16:59 | juliensf | Note Added: 0000711 | |
2014-06-26 23:46 | sebgod | Note Added: 0000713 | |
2014-06-27 11:13 | wangp | Note Added: 0000717 | |
2014-06-27 11:13 | wangp | Note Edited: 0000717 | View Revisions |
2014-06-27 17:21 | sebgod | Note Added: 0000719 | |
2014-06-27 17:29 | juliensf | Note Added: 0000720 | |
2014-06-28 04:00 | sebgod | Note Added: 0000721 | |
2014-07-05 21:09 | sebgod | Note Added: 0000735 | |
2014-07-05 21:11 | sebgod | Note Edited: 0000735 | View Revisions |
2014-12-16 02:54 | sebgod | File Added: fix-java8-flag-reorder.diff | |
2015-04-05 15:18 | juliensf | Note Added: 0000823 | |
2015-04-05 15:18 | juliensf | Status | new => resolved |
2015-04-05 15:18 | juliensf | Resolution | open => fixed |
2015-04-05 15:18 | juliensf | Assigned To | => juliensf |
2015-04-08 13:51 | juliensf | Note Added: 0000825 | |
2015-04-08 13:51 | juliensf | Status | resolved => assigned |
2015-07-14 17:30 | juliensf | Note Added: 0000842 | |
2015-07-14 17:30 | juliensf | Status | assigned => resolved |