Summary: Do not try to control processes directly with Puppet and instead properly integrate your service into your operating system.
-----
It sounds like you are misunderstanding how Puppet integrates into the rest of the system. Puppet should not "kill processes" directly like you would with the 'kill' command (actually, it can, but this is almost certainly NOT what you want). I think you may also be misunderstanding some basic concepts of running a Linux/Unix server.
A process is not the same thing as a service. A single service may have many processes, and they are typically controlled by a script in the /etc/init.d directory (or maybe somewhere else if you are on a newfangled system running systemd). If your process does not have a control script in /etc/init.d, then is is NOT a "service", it's just a process you happen to have running for a long time. For Puppet to consider it a service, it must be controllable using the 'service' command (on RedHat based systems), or the equivalent for your version of Linux/Unix.
What you really want is to be making and installing a bash script to control your java process in /etc/init.d. Once written, you can use Puppet to install the script by using the "file" resource. After you have that done, then you can use the "service" resource to control the service as you are tying to do. The name of the service will be the name that you call your script in /etc/init.d, for example: /etc/init.d/my_service. Please do not call your service "java", as it makes no sense to name a service after the programming language it is written in. If it's an accounting system for example, call the service "accounting_system", or something like that.
You are bound to get some other replies telling you how to use an 'exec' resource to call the "kill" command, etc..., since this is *possible* with Puppet, but it is grossly abusive of its capabilities and you really should not be doing that. Please do this correctly by setting up your software as a real service and then control it correctly with the "service" resource in Puppet.
I strongly suggest you walk through the Puppet tutorials at
https://puppetlabs.com/learn before trying to control your own custom applications with it.