Hi everyone,
as promised, here is the source code of the demo you asked for!
I hope it is useful for you to learn and experiment. Let me know what you think! What do you like? What would you do differently? Post your improvements and suggestions here on the forum.
“If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas."
sgold:~/NetBeansProjects/ext/jme-video-player$ ./gradlew run
bash: ./gradlew: Permission denied
sgold:~/NetBeansProjects/ext/jme-video-player$ chmod +x gradlew
sgold:~/NetBeansProjects/ext/jme-video-player$ ./gradlew run
Starting a Gradle Daemon, 3 incompatible Daemons could not be reused, use --status for details
> Configure project :
Project : => no module-info.java found
> Task :run FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':run'.
> No main class specified and classpath is not an executable jar.
* Try:
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
BUILD FAILED in 5s
4 actionable tasks: 3 executed, 1 up-to-date
Two action items:
Make the “gradlew” script in the repo executable.
Add instructions to “README.md” for building and running the app.
This is a general problem with the way Unix does work permissions. I’m trying to figure out how to do what you ask me in Windows. Could you send me a PR please by editing the file with the permissions chmod = + x gradlew?
sgold:~/NetBeansProjects/ext/jme-video-player$ git reset --hard
HEAD is now at 69d3d18 add Gradle wrapper
sgold:~/NetBeansProjects/ext/jme-video-player$ git pull
Updating 69d3d18..e4872a8
Fast-forward
gradlew | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 gradlew
sgold:~/NetBeansProjects/ext/jme-video-player$ ./gradlew clean build
Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details
> Configure project :
Project : => no module-info.java found
> Task :startScripts FAILED
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':startScripts' (type 'CreateStartScripts').
> No value has been specified for property 'mainClassName'.
* Try:
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
BUILD FAILED in 13s
9 actionable tasks: 5 executed, 4 up-to-date
sgold:~/NetBeansProjects/ext/jme-video-player$ cat README.md
# jme-video-player
### Requirements
- [jmonkeyengine](https://github.com/jMonkeyEngine/jmonkeyengine) - A complete 3D game development suite written purely in Java.
- [Minie](https://github.com/stephengold/Minie) - A physics library for JMonkeyEngine.
- JavaFX
### Youtube Videos
- [How to play a video intro for your game](https://youtu.be/5lwIorg5tbM)
- [Destructible Wall Generator](https://www.youtube.com/watch?v=Vp7nPncpZqs)
sgold:~/NetBeansProjects/ext/jme-video-player$
May 24, 2022 2:56:10 AM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.5.2-stable
* Branch: HEAD
* Git Hash: 8ab3d24
* Build Date: 2022-04-21
Exception in thread "jME3 Main" java.lang.UnsatisfiedLinkError: /home/pavl/IdeaProjects/jme-video-player/liblwjgl64.so: /home/pavl/.jdks/openjdk-17.0.2/lib/libjawt.so: version `SUNWprivate_1.1' not found (required by /home/pavl/IdeaProjects/jme-video-player/liblwjgl64.so)
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389)
at java.base/java.lang.Runtime.load0(Runtime.java:755)
at java.base/java.lang.System.load(System.java:1953)
at org.lwjgl.Sys$1.run(Sys.java:70)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
at org.lwjgl.Sys.loadLibrary(Sys.java:87)
at org.lwjgl.Sys.<clinit>(Sys.java:117)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:220)
at java.base/java.lang.Thread.run(Thread.java:833)
However, the project runs fine on lwjgl-3…anyone knows why ?? Seems incompatibility of native binaries, not sure, last time i was running jme3-lwjgl-3.3.2 fine w/o problems…
EDIT: or just the jdk !!
EDIT2: just ignore this for now, i will investigate into it later, isn’t related to your project…
Thank you so much for your contributions guys. Sorry if I answer late, unfortunately these days I don’t have much free time. If you both agree on the solution, I accept the PR software changes. I apologize for the inconvenience, but there are some technical aspects of ‘gradle’ that I still don’t know well.