AsciidoctorJ is the official library for running Asciidoctor on the JVM.
Here's the start of support for AsciidoctorJ in NetBeans IDE. New AsciiDoc files can be created and you have a source editor where you can write AsciiDoc. Currently, no syntax coloring, etc, yet.
When you click the Visual togglebutton above, AsciidoctorJ is used to convert the AsciiDoc:
Right now, the conversion options are hardcoded, using CodeRay, a Ruby library for syntax highlighting. Thanks to AsciidoctorJ, no Ruby needs to be installed, since AsciidoctorJ wraps the gems. Notice the code below, which was as much fun to figure out as something really not fun and could still be wrong and looks problematic. But it works.
Asciidoctor doctor = Asciidoctor.Factory.create(Arrays.asList(Need to integrate the Progress API into the above so that the progress bar runs while the conversion is taking place.
String html = doctor.convert(obj.getPrimaryFile().asText(), getInitialOptions());
The source code of the above is here, looking forward to clones and pull requests: