GithubHelp home page GithubHelp logo

Comments (11)

iloveeclipse avatar iloveeclipse commented on May 18, 2024 2

I'm closing this now. Any new issues regarding Java 9 incompatibilities please into new tickets.

from spotbugs.

rschmitt avatar rschmitt commented on May 18, 2024 1

The crudest thing you could do that would work would probably be to probe for java.lang.reflect.Module using Class#forName, and to interact with it using reflection if you manage to find it. You could also speed up the reflective calls to a heavily used method by obtaining a MethodHandle.

from spotbugs.

KengoTODA avatar KengoTODA commented on May 18, 2024

This is known issue and we handle this in #101.

Simply speaking SpotBugs and many other bytecode manipulating library such as javaassist don't work with jigsaw currently.

In theory we can support it iff we use Module class provided from Java9. It means that we need to compile SpotBugs with JDK9. However we also wants to support Java8 users. Maybe this is possible by MRJAR I hope.

from spotbugs.

KengoTODA avatar KengoTODA commented on May 18, 2024

@rschmitt Great, thanks for your information!

from spotbugs.

AlanBateman avatar AlanBateman commented on May 18, 2024

Is the issue that Spotbugs is not using the jrt file system to locate the system classes? At one point I think Andrey Loskutov has this implemented in FindBugs.

from spotbugs.

iloveeclipse avatar iloveeclipse commented on May 18, 2024

Yep, I did it once for one of the earlier JDK 9 betas: 9e10194

So this isn't working now? Bad.

from spotbugs.

iloveeclipse avatar iloveeclipse commented on May 18, 2024

Probably due https://bugs.openjdk.java.net/browse/JDK-8169816

from spotbugs.

iloveeclipse avatar iloveeclipse commented on May 18, 2024

Anyway, I've just tried with jdk-9+178_linux-x64 version and spotbugs works out of the box if the JVM is started with --add-modules=ALL-SYSTEM.

from spotbugs.

iloveeclipse avatar iloveeclipse commented on May 18, 2024

I plan to close this one with #271.

Everyone who test Java 9 and SpotBugs should use both in the latest versions, and also add --add-modules=ALL-SYSTEM argument to the JVM to start SpotBugs.

from spotbugs.

AlanBateman avatar AlanBateman commented on May 18, 2024

Why is --add-modules=ALL-SYSTEM needed? If this is because of dependences on the EE modules then keep in mind that they have been deprecated-for-removal and will (hopefully) be dropped in the future.

from spotbugs.

iloveeclipse avatar iloveeclipse commented on May 18, 2024

I haven't further investigated this, it worked and I was just happy. May be because of javax namespace of JSR-305 annotations? I have tested from Eclipse, because this is the easiest way for me. May be without both (Eclipse and args) it would also work.

from spotbugs.

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.