0

I am not able to run jitwatch. It always returns me with compilation error.

Here is what I did:

git clone https://github.com/AdoptOpenJDK/jitwatch.git 
mvn clean install exec:java

enter image description here

Has anyone ever found a similar problem? How do we fix this ?

Manish Basdeo
  • 6,139
  • 22
  • 68
  • 102

2 Answers2

2

I've merged in the PR from Alex (thanks!) and that makes JITWatch build again under Java 1.7 which I intend to keep supporting.

I notice you have JDK 8 installed but maven didn't pick it up as it wasn't set as your %JAVA_HOME% environment variable.

FYI JITWatch has a Google Group here: https://groups.google.com/forum/#!forum/jitwatch where you can ask support queries directly.

Thanks for your interest in JITWatch.

Chris

ChrisWhoCodes
  • 630
  • 7
  • 10
1

It looks like this method was added in Java 1.8, and I suspect the command line compiler that you're using is using a 1.7 compatibility flag (and thus not able to see the method). Check to see if you're specifying a different version of Java with an environment variable that Maven is using instead, or running with the -verbose flag to find out what the Java version used is.

It looks like there's a Java 1.7 profile which is selected when the build thinks it's on a 1.7 runtime, and that might be a problem:

https://github.com/AdoptOpenJDK/jitwatch/blob/master/pom.xml#L108

So: check your Java version that's being used by Maven and investigate why it's not a Java 1.8 runtime.

AlBlue
  • 23,254
  • 14
  • 71
  • 91
  • 1
    Added a pull request for the project which should fix this in future. https://github.com/AdoptOpenJDK/jitwatch/pull/202 – AlBlue Apr 24 '16 at 09:23