Comments (5)
Hi @mgroth0 thanks for the notes.
Looks like a typo on my part, I did brew install graphviz too - I'll correct the above post.
Interesting to hear that you were able to get it working without any issues around the PATH
I'm assuming that as your use case is a Gradle plugin when you say you are running it through IntelliJ, it is the Intellij Gradle integration that would be executing a Gradle process through a shell, therefore picking up shell environment variables, which would then be passed to the Java process spawned by Gradle - but please advise if this is not the case.
If it is not the case I don't suppose you would be able to set a breakpoint and see System.getenv() to confirm what PATH looks like prior to graphviz being called. It may invalidate some of my understandings above.
Thanks!
Tom
from graphviz-java.
@tomb50 , I actually adapted the gradle plugin to work inside of a regular kotlin module (not a gradle plugin, but just a regular gradle subproject built in IntelliJ).
I've taken a look atSystem.getenv()
info you requested, right before I use graphviz. And here is the value for PATH
:
/Users/matthewgroth/miniconda3/bin:/Users/matthewgroth/miniconda3/condabin:/Users/matthewgroth/bin:/Applications/SublimeText.app/Contents/SharedSupport/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
I've also tried using echo $PATH
in the terminal, and the output was the same.
I checked my ~/.zshrc and it doesn't look like I manually add it there. I guess homebrew automatically adds it to the PATH
and my gradle/intelliJ environment somehow is passing it through.
Now here's where it gets interesting. I've only been able to get it working inside of a gradle run
task and assumed it was working perfectly for me. But just to be sure, I tried executing the jar outside of gradle. And then I did in fact get the infamous None of the provided engines could be initialized
exception. So, I do think your initial assumptions were correct.
from graphviz-java.
One more clarification about my environment. I develop tools for myself using IntellJ/Gradle. Then I often execute them as a daemon process through Lingon.
Originally this library worked only in a gradle run task but not when executing the built jar through Lingon. But, I just discovered that Lingon does allow users to set their environmental variables. So, I set PATH to the correct value in Lingon. Now this library works perfectly for me through Lingon as well.
from graphviz-java.
@tomb50 thanks for the incredible work.
I feel bad because I was able to get this working on my M1 Mac with fewer issues than you. But maybe something in my build environment was different, I'm not sure.
I'm trying to run https://github.com/vanniktech/gradle-dependency-graph-generator-plugin in IntelliJ. At first, it did not work. And it complained none of the engines loaded. Eventually, I stumbled upon this post of yours. I realized I did not have dot
installed on my new machine.
I first tried brew install dot
. This doesn't work.
Next, I tried brew install graphviz
. This worked. And pretty much right away, the Gradle plugin started working without any additional steps.
I checked which dot
in a terminal and got /opt/homebrew/bin/dot
. As you suggest, I'd be surprised if this automatically was passed into whatever search path my java environment is using.
I launch IntelliJ through the JetBrains Toolbox. So it really baffles me how I got it to work so easily without the path issues you describe. I hope this might be helpful to you or others.
from graphviz-java.
I wonder if you have evaluated Javet (Java + V8) which supports both Mac x86_64 and arm64.
from graphviz-java.
Related Issues (20)
- Integration with Kotlin Jupyter HOT 1
- Default DPI value does not match Graphviz default value
- Changing a fill color yields an entirely separated graph HOT 1
- Update Log4j version to mitigate possible vulnerabilites HOT 1
- StackOverflowError when calling toFile HOT 1
- NullPointerException thrown when invoking createDiagram(String svg) function in the SalamanderRasterizer HOT 1
- Unable to Initialize engines when run in DockerFile.
- How to set `fillcolor` for kotlin DSL?
- how to merge multiple edge to single arrow
- Possibility of replacing J2V8 with Javet
- Configure V8 engine directory
- Caused by: java.lang.NullPointerException: Cannot invoke "com.kitfox.svg.SVGDiagram.setIgnoringClipHeuristic(boolean)" because "diagram" is null HOT 1
- Parser fails if .dot file has comments
- Batik Dependency Subject to Known Vulnerabilities
- Stackoverflow because of infinite loop
- Is there a way to only layout without rendering? HOT 1
- convert dot to png content problem
- Command took too long to execute (default engine) HOT 1
- How to use examples
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphviz-java.