If you've got access to a server that can run Java, can you not run the whole thing on there anyway?
Otherwise, as you've figured, you can just create a component with a remote function and have that do the work, along the lines of:
<cfcomponent output="false">
<cffunction name="runMyJava" returntype="String" output="false" access="remote">
<cfargument name="MyArg" type="String" />
<cfset var MyObj = createObject('java','whatever') />
<cfreturn MyObj.doJavaMagic( Arguments.MyArg ) />
</cffunction>
</cfcomponent>
Then on your other server, you'd have something like...
<cfset MyWebService = createObject('webservice','https://myotherserver/mycomponent.cfc?wsdl')/>
<cfset MyString = MyWebService.runMyJava( MyString ) />
Note that this example uses https - since you'd presumably want to protect the data from flying over the Internet in plain text.
It may also be sensible to IP-restrict the server so only you can connect to it, or use other appropriate methods to secure it.