We have a web application running JBoss 5 that periodically runs the java process (using ProcessBuilder) to compile files on Linux. The process runs seamlessly on the Windows development machine and on the Ubuntu virtual machine we installed. The command is as follows:
/usr/java/jdk1.6.0_18/bin/java -Xmx256M -DiDesigner.javabin=java -jar "/aplicaciones/jboss/nfs/pmc_tdt/bin/lib/iDesigner.jar" --compiler --obfuscate --in "81.ida" --out "directory:OUTPUT"
What creates the error:
Unable to access jarfile "/aplicaciones/jboss/nfs/pmc_tdt/bin/lib/iDesigner.jar"
All paths are validated, and the path to the ja file is enclosed in double quotes . After two beers and Big Mac, the system department confirmed that the user (jbossadmin) working with JBoss also owns the file:
[ root@miv-multicanalidad-01 lib]
I suspect this is a problem, so we asked them to change the permissions to execute , but, alas, they are still not satisfied.
The only thing I can think of is that this is a mistake in translating the path or that we did not apply the right to the right place!
Edit: An excellent suggestion by Andrea Spadecchini, however it seems that we already have permissions for passing through the path:
drwxr-xr-x 3 root root 4096 abr 6 2010 /aplicaciones/ drwxr-xr-x+ 16 jbossadmin jbossadmin 4096 mar 7 10:13 /aplicaciones/jboss/ drwxrwxr-x+ 5 jbossadmin jbossadmin 4096 ene 25 09:21 /aplicaciones/jboss/nfs/ drwxr-xr-x 4 jbossadmin jbossadmin 4096 abr 6 16:03 /aplicaciones/jboss/nfs/pmc_tdt drwxr-xr-x 4 jbossadmin jbossadmin 4096 sep 3 2010 /aplicaciones/jboss/nfs/pmc_tdt/bin/ drwxr-xr-x 3 jbossadmin jbossadmin 4096 abr 6 16:03 /aplicaciones/jboss/nfs/pmc_tdt/bin/lib/
Edit:. With Eva, we can confirm that the execution of the line through the command line (bash) is executed, but it throws an error if we execute the line from the ProcessBuilder class embedded in the jar file on Linux. Just like our JBoss. The most likely cause of the problem here is double quotation marks around the parameters.
java linux jar
ian_scho
source share