You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Rosenblatt, Joshua" <jo...@csfb.com> on 2003/04/01 00:43:13 UTC

java with fork=true produces IOException on UnixProcess.forkAndEx ec on solaris 8

I have a problem with my build process. it ran fine on windows and I am now moving to solaris 8. I wrote a simple example to test it out. 
I run the task: 
<project name="foo" default="all">
<target name="all" depends="run"/>
<target name="run" depends="compile">
<java classname="Test" fork="yes" failonerror="yes" classpath=".">
<arg line=" 1 2 "/>
</java>
</target>
<target name="compile">
<javac srcdir="." destdir="." classpath="."/>
</target>

</project> 
ANT_HOME, JAVA_HOME are set and java/javac are in my path 
i get the following output from ant 
[java] Executing '/sw/CRFS/java-std/THIRDPARTY_JDK/50_1_2/bin/solaris/jre/bin/java' with arguments:
[java] '-classpath'
[java] '/home/jrosenbl/test'
[java] 'Test'
[java] '1'
[java] '2'
[java] 
[java] The ' characters around the executable and arguments are
[java] not part of the command. 
BUILD FAILED
file:/home/jrosenbl/test/build.xml:4: java.io.IOException: /sw/CRFS/java-std/THIRDPARTY_JDK/50_1_2/bin/solaris/jre/bin/java: cannot execute
at org.apache.tools.ant.taskdefs.Java.run(Java.java:494)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:160)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTarg! ets(Proj ect.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
Caused by: java.io.IOException: /sw/CRFS/java-std/THIRDPARTY_JDK/50_1_2/bin/solaris/jre/bin/java: cannot execute
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:54)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMeth! odAccess orImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:646)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:416)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:427)
at org.apache.tools.ant.taskdefs.Java.run(Java.java:488)
... 10 more
--- Nested Exception ---
java.io.IOException: /sw/CRFS/java-std/THIRDPARTY_JDK/50_1_2/bin/solaris/jre/bin/java: cannot execute
at java.lan! g.UNIXPr ocess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:54)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:646)
at org.apache.tools! .ant.tas kdefs.Execute.launch(Execute.java:416)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:427)
at org.apache.tools.ant.taskdefs.Java.run(Java.java:488)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:160)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Proje! ct.java: 1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235) 
Total time: 1 second
Any help would be greatly apreciated


This message is for the named person's use only. It may contain sensitive and private proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. CREDIT SUISSE GROUP and each legal entity in the CREDIT SUISSE FIRST BOSTON or CREDIT SUISSE ASSET MANAGEMENT business units of CREDIT SUISSE FIRST BOSTON reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.
Unless otherwise stated, any pricing information given in this message is indicative only, is subject to change and does not constitute an offer to deal at any price quoted. Any reference to the terms of executed transactions should be treated as  preliminary only and subject to our formal written confirmation.



Re: java with fork=true produces IOException on UnixProcess.forkAndEx ec on solaris 8

Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 31 Mar 2003, Joshua Rosenblatt <jo...@csfb.com>
wrote:

> I have a problem with my build process.

What happens if you run

/sw/CRFS/java-std/THIRDPARTY_JDK/50_1_2/bin/solaris/jre/bin/java -classpath /home/jrosenbl/test Test 1 2

from the command line?

Stefan