Skip to content

JavaForce library for building powerful Apps and Services (Native Bindings for Camera, OpenGL, ffmpeg). Includes VoIP stack, PLC I/O and many apps.

License

LGPL-3.0 and 2 other licenses found

Licenses found

LGPL-3.0
LICENSE
LGPL-2.1
license.txt
Unknown
license.rtf

pquiring/javaforce

JavaForce SDK
=============

Version 60.0

Description
===========
JavaForce (JF) is a Java library featuring:

  - SIP/VoIP/RTSP
  - native bindings for FFmpeg, OpenGL and Camera
  - PLC I/O
  - custom native launchers for console apps, desktop apps and system services
  - tasks to package apps (msi, deb, rpm, etc.)

Includes many apps built around the library such as jfPhone, jfVideo Creator, jfAudio, jfMusic, etc.
  - see projects/readme.txt for complete list

JF is also the core library in the Java infused Linux Operating system:
  https://github.com/pquiring/javaforce/tree/master/linux

JF is also used to create jfCraft, a Minecraft clone:
  http://pquiring.github.io/jfcraft

Folders
=======
 /          - main folder (run ant here to build /src)
 /src       - the javaforce source files
 /lib       - generated and dependancies jar files
 /native    - native loaders with JNI bindings for FFmpeg, OpenGL, Camera
 /projects  - source for all sub-projects
 /iso       - scripts to build jfLinux iso (outdated)
 /linux     - scripts to install JavaForce repo (preferred method for Linux)
 /utils     - utility apps (jnlp)

Getting Started
===============
First get some tools installed, all projects are built with Apache Ant (http://ant.apache.org):
  debian:apt install git ant
  fedora:yum install git ant
  windows:install git, OpenJDK and ant from various sources (msys2, cygwin, oracle, etc.)
Before checking out the source make sure to configure line endings:
  linux/mac : git config --global core.autocrlf input
  windows : git config --global core.autocrlf true
Checkout Javaforce:
  git clone http://github.com/pquiring/javaforce
  cd javaforce
  ant
Next build the native launchers.

Building native loaders with native API (FFmpeg, OpenGL, Camera)
----------------------------------------------------------------
Native loaders are in /native
JavaForce does not use java.exe, instead a custom loader is built, which includes additional native API using JNI.
See readme.txt in each platform folder for more info.

Building jfLinux
----------------
After building Javaforce and the native components you can run package.sh to package everything.
Supported distros : Debian, Fedora, Arch.
FreeBSD is currently not supported (open issue if you would like to see FreeBSD packager task and repo created)

JavaForce Ant tasks:
--------------------
get-ffmpeg-win64-bin : Download ffmpeg libraries for Win64
get-ffmpeg-win64-src : Download ffmpeg sources for Win64 (to build native loader)
jre-base : pre-link JRE for creating native packages (msi, dmg)
jre-base-desktop : pre-link JRE with desktop support
jre-base-javac : pre-link JRE with java compiler support

Common Ant tasks:
-----------------
compile : compile projects java files
jar : build the projects main jar file
depjars : copy dependant jar files into project folder
javadoc : build javadoc api files
deploy : build maven deployment artifacts
executable : build native launcher
 - a stub launcher for the platform is copied into the project folder and configured to load classpath and start main method
 - a project property "apptype" can be defined as:
     "window" for Window GUI apps (default)
     "console" for console apps (alias "c")
     "service" for service apps (alias "s")
     "server" for service config GUI apps (same as "window" type plus adds "-server" to executable and package names)
     "client" for client config GUI apps (same as "window" type plus adds "-client" to executable and package names)
ffmpeg : copy ffmpeg libraries to project folder (Windows only)
installapp : install files before package creation (Linux only)
deb : build Debian deb file (after install)
 - requires bzip2, binutils, sudo
 - linux packaging requires files.lst
rpm : build Fedora rpm file (after install)
 - requires rpm-build
 - linux packaging requires files.lst
pac : build Arch pac file (after install)
 - linux packaging requires files.lst
msi : build Windows msi file with JRE bundled
 - msi creation requires:
  - wixtoolset v4+ in path (http://wixtoolset.org)
  - install wix tool (requires dotnet 6+)
    dotnet tool install --global wix
  - wix64.xml file
  - jre pre-linked for native packaging (see above)
  - install wix extensions:
    wix extension add -g WixToolset.UI.wixext
    wix extension add -g WixToolset.Firewall.wixext
    wix extension add -g WixToolset.Util.wixext
  - older wix3 files must be upgraded:
    wix convert wix64.xml
dmg : build Mac dmg file using hdiutil (mac only)
 - dmg creation requires:
  - jre prep for native packaging (see above)
  - Info.plist, ${app}.icns and macfiles.lst
  - see projects/jfedit or projects/jfpaint for only examples
  - jfimageconvert can convert images to .icns file format (mac icons)

Maven
-----
The Maven repo is used to download dependancies using ant tasks.
The mvn tool is currently not required.
A pom.xml is supplied but is missing dependancies for now, the minimum is included
to create deployment artifacts.

Graal Support
-------------
JavaForce includes some support for building AOT executables using GraalVM (http://www.graalvm.org)
To build a project using Graal use the following Ant Tasks.
  graalagent
    - execute application to build native configuration files
    - run through the application making sure to use all features and then exit
    - these config files are stored in META-INF/native-image and must be included in the application jar file
  graal
    - builds application native Library (should run after agent has generated config files)
    - JavaForce uses graal to build a library instead of an executable so the javaforce launchers can still be used
    - the library generated by graal includes a standard JVM interface
    - library name should be the full class name where main() is defined (ie: javaforce.utils.CopyPath.dll)
GraalVM support for AWT is still a work in progress.

Debugging
---------
The native loaders in /bin enable JMX debugging support on port 9010.
These loaders are used when you run an app with "ant run".
From VisualVM you can connect to the JMX as localhost:9010

Requirements
------------
  - JDK 17+
  - Apache Ant 1.10+
  - Linux : gcc
  - Windows : VC++, wixtoolset 4+
  - FFmpeg 5.1+
  - glfw for OpenGL support

License
=======
JavaForce is licensed under the LGPL license which can be read in license.txt.
The MSI installers show the Common Public License 1.0 which is acceptable as well.
All third party libraries and tools each have their own licenses.

Enjoy!

Peter Quiring
pquiring@gmail.com

Web : pquiring.github.io/javaforce

Git : github.com/pquiring/javaforce

About

JavaForce library for building powerful Apps and Services (Native Bindings for Camera, OpenGL, ffmpeg). Includes VoIP stack, PLC I/O and many apps.

Topics

Resources

License

LGPL-3.0 and 2 other licenses found

Licenses found

LGPL-3.0
LICENSE
LGPL-2.1
license.txt
Unknown
license.rtf

Stars

Watchers

Forks

Packages

No packages published