java2cpg import .java files

We want to analyze one of our java code base which does not have the class files checked in.
Is java2cpg ok to import with java files instead of class files?

Hi @devnull welcome to Ocular discussion forum! java2cpg is actually intended to convert JAR or WAR files to the CPG representation of the code, so you would need to compile and build the JAR/WAR. You can read more about it in our docs :

Joern supports importing raw source code and we did that earlier with Joern.
It is a useful feature which allows us to analyse opensource code without getting into build process of the project. Can this feature be extended to Ocular?

To implement this feature, one would need to create a codepropertygraph from the sources, which is not something we’re not currently working on (but may in future).

We have open sourced the definition of the codepropertygraph:, so you can actually do this yourself, and we’d be helping you on the journey.