What are machine learning libraries in Java

Calling Python from Java (Tomcat6) as a subprocess - Java, Python, Bash, Tomcat6, Jython

I'm trying to call a python script from a Java / Tomcat6 web application. I am currently using the following code:

I really can't see any output in the Catalinia, output of a file from the Python script and using an adapter library like Jython is not possible because the script is based on several machine learning libraries that require Python's Numpy module.

Help?

Reply:

1 for the answer № 1

The explanation is likely one (or more) of the following:

  • The command fails and writes error messages in the "stderr" field ... that you don't see.

  • The command cannot be started because the command name is incorrect. e.g. it cannot be found on.

  • The command tries to read his fd ... but you have not (yet) made any entries.

  • There may be a command line split problem. For example, if you use path names with embedded spaces or other things that are normally handled by the shell.

Since this is Python, this can also be a problem with Python-specific environment variables, the current directory, and / or the effective user running the command.


How to proceed:

  1. See if the Python command actually starts. For example. "hack" the "" to write something to a temporary file on startup.

  2. Switch to "Use" the object you created. This gives you more control over the streams and how they are handled.

  3. Find out what is happening to the stderr child processes. (You can use ProcessBuilder to redirect it to "stdout" ...)