I�ve noted that the result (cod) is null (it does not create an result, so there is nothing to read) on jboss (under linux) and tomcat (under windows). But when I executed this code above on a test class on line command (DOS), and everiything worked fine.
I�ve noted also that the process under linux (jboss) is implemented by "java.lang.UNIXProcess@8d3d62", on windows (tomcat) is "java.lang.ProcessImpl@ea3932" and on line command (windows) "Win32Process@defa1a" (and this last one worked fine). Does
Some idea where is my fail? I�m I forgetting something? Am I missing some enviroment configuration question?
Thank�s in advance, Rafael.
[ September 11, 2006: Message edited by: Rafael Fagundes ] [ September 11, 2006: Message edited by: Rafael Fagundes ]
2) there's a CLASSPATH, and "Codigo.class" is on it, and
3) if the arguments represent relative paths, that they're relative to the server's current working directory.
Any or all of these are likely to be bogus assumptions in your server environment, but probably valid on your desktop. In the server code, you need to use only absolute paths, use the -cp switch to Java to specify where the class is, and use an absolute path to the java executable, perhaps supplied as a configuration parameter to your application. And do more error checking!