Bootstrap node using java

Hi , i am new with chef

I created a cookbook for bootstrap VMs, this cookbook will create configuration files, download services and packages and install it in the nodes,

I wonder if there is a way to bootstrap VMs with this configuration from Java implimentation instead of used “knife bootstrap”