Giter Site home page Giter Site logo

Comments (5)

RyanKoppenhaver-NCC avatar RyanKoppenhaver-NCC commented on June 27, 2024

There shouldn't be anything in the code that requires Java 9. (It builds cleanly for me using javac 1.8.0_92 from Homebrew on macOS, for example.)

Can you try compiling using -release 8 instead of -target 8, and see if that works? If it doesn't, please let me know what compiler + version you're using, and what specific errors you get when compiling and/or loading the extension? Thanks.

from autochrome.

jandr avatar jandr commented on June 27, 2024

I am using Linux. I tried using both Openjdk 8 and Oracle Java 8. However, both javac binaries do not have a -release, but only a -target, as stated in the -help command:

-target <release> Generate class files for specific VM version

The output when trying to compile it with -release is the following:

$ /usr/lib/jvm/oracle-java8-jdk-amd64/bin/javac -target 8 burp/BurpExtender.java 
warning: ./burp/IBurpExtender.class: major version 53 is newer than 52, the highest major version supported by this compiler.
  It is recommended that the compiler be upgraded.
warning: ./burp/IBurpExtenderCallbacks.class: major version 53 is newer than 52, the highest major version supported by this compiler.
  It is recommended that the compiler be upgraded.
warning: ./com/nccgroup/autochrome/useragenttag/BurpExtender.class: major version 53 is newer than 52, the highest major version supported by this compiler.
  It is recommended that the compiler be upgraded.
3 warnings

The Java 8 versions I am using are the following:

$ /usr/lib/jvm/oracle-java8-jdk-amd64/bin/java -version
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

and

$ /usr/lib/jvm/java-8-openjdk-amd64/bin/java -version
openjdk version "1.8.0_162"
OpenJDK Runtime Environment (build 1.8.0_162-8u162-b12-1-b12)
OpenJDK 64-Bit Server VM (build 25.162-b12, mixed mode)

from autochrome.

RyanKoppenhaver-NCC avatar RyanKoppenhaver-NCC commented on June 27, 2024

Yes, the -release flag is new with the Java 9 javac. If you're compiling with Java 8, no flags should be necessary.

I'm sorry, but I haven't been able to reproduce the major version warning that you're seeing, on multiple platforms and Java versions. Maybe try running javac under env -i, to ensure you don't have any environment variables related to other Java versions affecting things?

In any case, I've released a binary JAR of the extension for anyone who's having difficulty building it themselves. Hope that's helpful: https://github.com/nccgroup/autochrome/releases/download/20180411-burp-ext-snapshot/autochrome-useragenttag.jar

from autochrome.

redNixon avatar redNixon commented on June 27, 2024

I saw this on Ubuntu, it is fairly simple to fix your environment though in order to correctly build the jar. First check what versions of Java you have installed:

# update-java-alternatives -l
java-1.9.0-openjdk-amd64       1091       /usr/lib/jvm/java-1.9.0-openjdk-amd64
java-8-oracle                  1081       /usr/lib/jvm/java-8-oracle
java-9-oracle                  1091       /usr/lib/jvm/java-9-oracle

Set to Java 8(I'm using Oracle Java here, if you installed from the repos then the openjdk 8 name will be different):

# sudo update-java-alternatives -s java-8-oracle

If you have already ran javac under Java 9, then rebuilding will generate some warnings:

warning: ./burp/IBurpExtender.class: major version 53 is newer than 52, the highest major version supported by this compiler.
  It is recommended that the compiler be upgraded.
warning: ./burp/IBurpExtenderCallbacks.class: major version 53 is newer than 52, the highest major version supported by this compiler.
  It is recommended that the compiler be upgraded.
warning: ./com/nccgroup/autochrome/useragenttag/BurpExtender.class: major version 53 is newer than 52, the highest major version supported by this compiler.
  It is recommended that the compiler be upgraded.

To get rid of those, you can either clean up all the class files from the previous build or revert to put src folder in a clean state.

from autochrome.

peter-h-ncc avatar peter-h-ncc commented on June 27, 2024

Closing, please re-open the issue if it still exists.

from autochrome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.