LiveConnect is a technology that allows the Javascript engine (Rhino I believe) to execute java from a Javascript context. While I have used Live connect when prototyping specific solutions I strongly recommend against it as your final solution. IMO your java code really belongs in a source code repository with a true build system so you can follow proper code management techniques. This helps prevent a random developer doing something to break the java code while addressing other issues. It also allows you to create unit tests for your various java functionalities.
If your concern is performance due to the marshaling of the Java object and passing of data to/from java and BPM context you may want to re-evaluate your use case and either find a way to do what you need to do with a large set of data so that the "overhead" is minimized or perhaps move to BPM advanced which is more suited to lights out data processing.