Open kevinGit777 opened 2 years ago
Hi @kevinGit777,
What's the output of the following three commands in your environment:
java -version
echo $JAVA_HOME
locale
Thanks, René
hi, @rjust
$ java -version openjdk version "1.8.0_292" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.292-b10, mixed mode) $ echo $JAVA_HOME /home/.sdkman/candidates/java/current $ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=
I also try using 1.7 for java but same output
I can reproduce the issue when explicitly changing the encoding to ASCII (i.e., changing the build file to use the encoding
attribute for the javac task.
Is it possible that your environment, before running defects4j, sets the file encoding to ASCII? Is there maybe a properties file that does so?
With the environment that you provided, the following two commands work on my end (and output the requested classpath):
Best, René
Hi @rjust, I am facing a similar compile error when compiling and testing. Below is my approach and set-up on gcp pod.
**java -version**
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07)
**echo $JAVA_HOME**
/usr/lib/jvm/java-1.8.0-openjdk-amd64/
I am able to check out the file, but when I try to compile or test, the compile issue about to happen:
**root@cpu:/export/home/defects4j/debug/lang_6_buggy$ defects4j compile**
Running ant (compile)...................................................... FAIL
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=1G; support was removed in 8.0
Buildfile: /export/home/defects4j/framework/projects/defects4j.build.xml
init:
[echo] -------- commons-lang3 3.2-SNAPSHOT --------
compile:
BUILD FAILED
/export/home/defects4j/debug/lang_6_buggy/build.xml:63: Class not found: javac1.8
Total time: 0 seconds
Executed command: cd /export/home/defects4j/debug/lang_6_buggy && ant -f /export/home/defects4j/framework/projects/defects4j.build.xml -Dd4j.home=/export/home/defects4j -Dd4j.dir.projects=/export/home/defects4j/framework/projects -Dbasedir=/export/home/defects4j/debug/lang_6_buggy compile 2>&1
Cannot compile sources! at /export/home/defects4j/framework/bin/d4j/d4j-compile line 82.
Compilation failed in require at /export/home/defects4j/framework/bin/defects4j line 155.
But if I change to ant compile, it works
**ant compile**
Buildfile: /export/home/defects4j/debug/lang_6_buggy/build.xml
init:
[echo] -------- commons-lang3 3.2-SNAPSHOT --------
compile:
BUILD SUCCESSFUL
Total time: 0 seconds
Could you please advise on this issue? Thank you for your help!
Hello! Is there any solution to this problem? I also meet this error on defects4j v2.0 dataset. @kevinGit777 @rjust
hi, I got this message and hope you guys can help me. Thank you so much!
` similar things happened in compiling Closure-149
system info: git version 2.17.1 svn, version 1.9.7 (r1800392) defect4j up to date