Jaxon is a "with the batteries" SDK built on top of SJC - a compiler that compiles a tailored subset of Java directly to native code, eliminating the need for bytecode and virtual machines.
- Compiles Java 1.6 source to multiple native architectures.
- Code templates for Cross-platform Win32 / X11 Linux Applications, and even multiple operating system templates.
- Install to System-Path / Uninstall.
- Deploys Intellij compatible JDK to enable JetBrains tooling to work.
To help get new users started, use the following guide to get yourself setup.
First start by downloading Jaxon for your platform
- Run the command
jaxon install
- If you're not on windows you'll have to add Jaxon to your System-Path manually
Start an initial blank project based off the console package
- Run the command
jaxon init
- If you have a project name in mind, use
jaxon init [project-name]
- If you have a project name in mind, use
- This will create a new project, following the on-screen directions open that directory in your Java IDE of choice
Community projects are accessible through Jaxon package manager
- Run the command
jaxon package [name] [version*] [project-name*]
- * denotes optional command - Example Commands:
jaxon package console
jaxon package console 0.1.0
jaxon package console 0.1.0 project-name
- For a full list of packages click here
- Use the build scripts to build binaries
At some point you're going to want to get Intellij working:
- If you've already ran
jaxon install
- Your JDK will be in {user}/.jaxon/JDK
- If you haven't done that, just run the following command
jaxon jdk jdk-1.8
- Then set the JDK folder as the SDK in Intellij
- F4 for Module Settings
- Project > SDK > Edit
- Click the Plus > Add JDK...
- Paste in the path sent from the Jaxon CLI
- For a full list of packages, visit the Community Projects
- The packages contain all the basics to get you running (
Console
shows hello world,Graphical
shows windowing & image drawing) - Each package can contain a different application starting class
- You can find this class by going into Windows/kernel/Kernel.java & Linux/kernel/Kernel.java
- The packages contain the entire standard library, edit these as much as you want
- One benefit is you are not restricted by the concept of precompiled libraries, you are always provided the source unless you are invoking a DLL
- Packages also contain a versioning system, using the package.list you can view all the published versions of a template
- Using a package with a specific version:
jaxon package console 0.1.0
- Using a package with a specific version:
init
- Create a blank project with the latest runtime- Optional Commands:
jaxon init [project-name*]
- * denotes optional command - Example Command:
jaxon init
jaxon init project-name
- Optional Commands:
package
- Download a Jaxon package source code from the Jaxon Community Project mono repo- Optional Commands:
jaxon package [name] [version*] [project-name*]
- * denotes optional command - Example Commands:
jaxon package console
jaxon package console 0.1.0
jaxon package console 0.1.0 project-name
- Optional Commands:
build
- Build using a specific profile- Available Profiles: (
win-exe
,win-app
,lin
,atmega
,os-32
,os-64
) - Example Command:
jaxon build win-exe src/shared/src src/windows/src
- Available Profiles: (
install
- Install Jaxon to the computer- Example Command:
jaxon install
- Example Command:
uninstall
- Uninstall Jaxon from the computer- Example Command:
jaxon uninstall
- Example Command:
upgrade
- Upgrade the Jaxon installation on the computer- Example Command:
jaxon upgrade
- Example Command:
jdk
- Create a Jaxon-Blank-SDK that will resolve all issues with Jaxon projects- Example Command:
jaxon jdk jdk-1.8
- Load the SDK Into Intellij:
- F4 for Module Settings
- Project > SDK > Edit
- Click the Plus > Add JDK...
- Paste in the path sent from the Jaxon CLI
- Example Command:
sjc
- Access underlying SJC command-line- Example Command:
jaxon sjc sc -s 1m -a 4198912 -l -o boot -O #win
- For a complete list of SJC commands click here
- Example Command:
First start by downloading Jaxon for your platform
- Run the command
jaxon upgrade
- If you're not on windows you'll have to add Jaxon to your System-Path manually
- In an effort to make SJC easier to learn and write:
- Jaxon acts as a wrapper for the compiler.
- It also provides templates & packages to aid creating new applications.
- Since SJC has no concept of a standard library:
- Jaxon is meant to fix that by providing packages that contain a maintained runtime.
- Jaxon is built on top of SJC and requires it to build.
- Jaxon acts as a package manager for the community projects repository.
- Jaxon provides built-in packages - allowing you to easily start new projects.
jaxon package console
- Jaxon projects use Maven to separate the modules.
- Jaxon provides a tool to create a Jaxon-Blank-SDK to make all Jaxon templates compatible with JetBrains tooling. (Intellij)
- Jaxon provides a build wrapper on top of the SJC build system.
jaxon build win-exe
is the equivalent ofsjc sc -s 1m -a 4198912 -l -o boot -O #win
- SJC compiles a subset of Java 1.6* compliant syntax to:
- Native IA32 & x86_64
- Executables for Windows & Linux
- Win32 console application
- Win32 GUI application
- Linux 32 bit binary with library support
- Bootloader for Custom Operating Systems
- Native IA32 image to boot
- Native AMD64 image to boot
- Executables for Windows & Linux
- ARM 7
- Atmega Atmel Hexout (Controllers such as LPC2103)
- Native IA32 & x86_64
- Source code only - compiles directly to native instead of bytecode
- No virtual machines either
- Libraries are only in the form of source code (Unless a DLL)
- No enums
- Generics do not exist
- Collections, lists & maps do not exist
- Strings cannot be concat'd using the plus operator
+
- Instead, use StringBuilder
- Kernel: The main class for each platform.
- MAGIC: Code-generating access to the hardware.
- For example access to the RAM using MAGIC.rMem8(addr) or MAGIC.wMem32(addr, value).
- STRUCT: Parent class for custom classes that allow access to structured RAM areas without objects.
- FLASH: Keep instances in flash (ie: do not copy to RAM).
- @SJC: Instructions for the compiler to perform special treatment of the current method or the subsequent code.
- For example marking the current method as an interrupt handler using @SJC.Interrupt or marking static final arrays as immutable and thus to be kept in flash using @SJC.Flash.
- Jaxon packages are hosted in the Community Projects area of the repo.
- Jaxon runs out of the box without any requirements.
- Just make sure to install Jaxon via
jaxon install
and you'll be good to go for full development.
- Just make sure to install Jaxon via
- Jaxon runs on Windows, MacOS, Linux & has a Java Jar variant if those binaries aren't compatible.
- *Note about Java 1.6 - Certain features of 1.4-1.6 are added.
- Enhanced for-loops is one example.
- Fully compatible with Intellij