I’m trying to clone an openrndr-template project onto an ubuntu (20.04) machine. I’m trying to run the program directly without having to open the Intellij IDEA. I’m able to run some gradle commands but when I attempt to do
./gradlew :run it fails with the following error:
$ ./gradlew :run
> Task :run FAILED
INFO [main] o.o.Application ↘ no preload class found 'org.openrndr.Preload'
INFO [main] ↘ Set -Dorg.openrndr.exceptions=JVM for conventional exception-handling
↑ null (InvocationTargetException)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':run'.
> Process 'command '/usr/lib/jvm/java-11-openjdk-amd64/bin/java'' finished with non-zero exit value 1
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
BUILD FAILED in 1s
3 actionable tasks: 1 executed, 2 up-to-date
These are the versions of Java I have right now:
$ java -version
openjdk version "22.214.171.124" 2022-02-08
OpenJDK Runtime Environment (build 126.96.36.199+1-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 188.8.131.52+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
Hi! Were you trying to run the included example? Or a different program?
I just did these 3 steps and it worked:
git clone https://github.com/openrndr/openrndr-template.git
My version of java:
$ java --version
openjdk 15.0.1 2020-10-20
OpenJDK Runtime Environment AdoptOpenJDK (build 15.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 15.0.1+9, mixed mode, sharing)
Your version should work as well.
Do the same programs run inside Idea?
So that’s basically what I did, running the original programs. The only other salient difference that I can think of is that I’m using a remote terminal. I’m SSHing into this machine and running these commands. I have a virtual desktop of the machine on my computer as well but there’s no actual monitor hooked up. I seem to recall reading something about that.
Re: the IDEA, i wasn’t actually able to successfully install it on the machine. I’ll try that again.
If you’re SSHing into the machine then you may need to do something special. If you have a virtual desktop, does it work when opening a terminal on it? Try running
glxgears on the command line. Do you see any gears?
Or maybe headless applications help?
I would add “via ssh” to the title of this post
I was fianlly able to install Idea after several hard reboots. I was also then able to run the project from the play button inside.
I’m now struggling to get OBS to capture the output as a smooth video. If you have any hot tips for that I’m all ears. Otherwise I may make another post in a few days if I can’t find a solution.
Thanks again for your help.
Little by little getting there
Is there a reason to use OBS to capture video? Do you want to do live streaming? To record videos I use the
If it’s not smooth, can you describe the symptoms?
Yes, I’m trying to set up a livestream that runs indefinitely that includes an openrndr animation running constantly, and taking in data via OSC message to modulate the animation.
Then animation is smooth on the remote Ubuntu instance, but when I try to capture the output on OBS, it is just a completely still image of the animation, however if I modify any of the settings it refreshes the image and gets a shot of the animation where it’s currently at again. If I try it on Mac it plays but the frame rate is totally wrecked.
And you’re doing all that via without a monitor attached? I remember struggling with that years ago, but not what I did to fix it. I know it can be an issue to not have a real display connected. But I think it’s not related to OPENRNDR, it’s about OPENGL / ssh / vnc etc so maybe searching for those terms may help? I found this: run opengl application over ssh - Welcome Another search that might help is “obs headless”.
I added “via ssh” to the title to make the issue more obvious
I can render a browser in OBS no problem - this demo runs quite smoothly. Only this project seems to be quite different from native openrndr code. If there was a way to put what i had written in the browser directly, I’d have a solution.
Some features may not be available in the browser (there are JVM specific orx extensions and some advanced OPENGL things that are not available in the browser) but maybe what you have in mind does work?
I heard it’s better to develop for OPENRNDR + JS step by step instead of trying to run a larger existing project all at once because if it fails to run one wouldn’t know which feature is misbehaving.