Can a MacBook 12 inch (2017) run OSX Mavericks? I have a newish MacBook from 2017, but I have an old backup with programs I need to run from an old MacBook Pro 2013 that was running Mavericks.
The app from my backup is only for 32bit and requires Java runtime 6.
Would my 12 inch MacBook 2017 run Mavericks? (So that I can boot that old program)
You can not install Mavericks. The 2017 MacBooks came preinstalled with macOS 10.12.5 (Sierra), so you should be able to run 32 bit software. I have used 32 bit Adobe CS5 and CS6 (basically Photoshop and other stuff) on macOS 10.13 and 10.14 (High Sierra and Mojave), but I get error messages when quitting the applications. This was not a problem with Sierra and older versions of OS X. As Mathew pointed out, if you install Catalina or a newer version of macOS, you will not be able to run 32 bit software, unless you use a virtual machine (see below).
You can install Legacy Java (Java for OS X 2017-001), if you need Java 6 runtime support. I currently have this installed on a machine with High Sierra and another machine with Mojave.
You could try installing Maverick in a virtual machine. Both VirtualBox and Fusion Player are free products. I am not sure you can still download Mavericks. Yosemite and El Capitan are both available for download from Apple. However, most users dislike the feel of a virtual machine.