IOException--CreateProcess!!!!
Hi every body.
Does someone know the meaning of this error?
java.io.IOException: CreateProcess: prueba error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:63)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
at org.apache.jsp.ChangeDirBajaRCXX_jsp._jspService(ChangeDirBaja
p.java:185)....................................
It's the result of this code:
cmd="prueba.bat";
exec(cmd);
and the prueba.bat is really simple:
@echo off
lejos HelloWorld
'lejos' is an exe file.
If i try 'lejos HelloWorld' from the MS-DOS it runs ok.
Thanks!!
Hi!
Hi Stevejluke.
The file 'prueba.bat' is in the current working directory and in the PATH environmental variable and 'prueba.bat' runs from the command line.
I'm afraid is something wrong with the Runtime.exec method. In fact in this link:
http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Process.html
i've found this:
"The Runtime.exec methods may not work well for special processes on certain native platforms, such as native windowing processes, daemon processes, Win16/DOS processes on Win32, or shell scripts."
But i'm using j2sdk1.4.1_01, not 1.2. i don't understand very well this information so i don't know how to resolve the problem.
Thanks very much!!
Similar Messages
-
Hello,
I got this exception when I ran my build file on Eclipse. If I ran it outside
Eclipse,
everything works fine.
java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.2\..\bin\javac.exe"
-J-Xmx256M @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\javac53402 error=3
The error comes from the following place:
[xmlbean] at com.bea.xbean.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:167)
It seems the above method is not getting the correct "java.home", it should get
jdk/bin/javac.
Can anyone give a pointer on this?
thanks,Hello,
I got this exception when I ran my build file on Eclipse. If I ran it outside
Eclipse,
everything works fine.
java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.2\..\bin\javac.exe"
-J-Xmx256M @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\javac53402 error=3
The error comes from the following place:
[xmlbean] at com.bea.xbean.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:167)
It seems the above method is not getting the correct "java.home", it should get
jdk/bin/javac.
Can anyone give a pointer on this?
thanks, -
I use stand alone "XMLBeans survival kit" ( which I downloaded on 11/1/03 from
BEA site ). I use its xmlbean.jar and it works fine. I did not use its "scomp"
utility until today ( I used BEA's on-line compiler and it worked just great ).
When I tried to use the stand alone "scomp" , I've got into trouble. Here is the
trace of the error I receive for all schemas including the example schema ( I
have followed the instructions described in the attached README file for the environment
configuration) :
C:\WSAD_Workspaces\dc_xml_beans\xml_to_java\test>scomp -out myeasypo.jar C:\XMLBeanToolkit\xkit\schemas\easypo
Loading schema file C:\XMLBeanToolkit\xkit\schemas\easypo\easypo.xsd
Loading config file C:\XMLBeanToolkit\xkit\schemas\easypo\easypo.xsdconfig
Time to build schema type system: 1.297 seconds
java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.1_05\..\bin\javac.exe"
-J-Xmx256M @C:\DOCUME~1\a337335\LOCALS~1\Temp\javac31952 error=3
null
java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.1_05\..\bin\javac.exe"
-J-Xmx256M @C:\DOCUME~1\a337335\LOCALS~1\Temp\javac31952 error=3
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:67)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:491)
at java.lang.Runtime.exec(Runtime.java:457)
at com.bea.xbean.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:167)
at com.bea.xbean.tool.SchemaCodeGenerator.compileTypeSystem(SchemaCodeGenerator.java:178)
at com.bea.xbean.tool.SchemaCompiler.compileImpl(SchemaCompiler.java:547)
at com.bea.xbean.tool.SchemaCompiler.main(SchemaCompiler.java:141)
BUILD FAILED
Please, help me to find what is wrong here !!!
Thank you,
- Michael P.
[README.txt]Sorry, folks, the answer was quite simple: the default scomp script has pointed
to "wrong" location for java.exe. In particular, the scrip has specified compilation
command like this:
java -classpath %cp% com.bea.xbean.tool.SchemaCompiler %*
while it had to specify path to the java.exe based on JAVA_HOME env. variable
( I am saying "had" because README instructions state that the JAVA_HOME has to
be properly configured ). So, the solution looks like:
%JAVA_HOME%\bin\java -classpath %cp% com.bea.xbean.tool.SchemaCompiler %*
- Michael P.
"Michael P." <[email protected]> wrote:
>
>
>
I use stand alone "XMLBeans survival kit" ( which I downloaded on 11/1/03
from
BEA site ). I use its xmlbean.jar and it works fine. I did not use its
"scomp"
utility until today ( I used BEA's on-line compiler and it worked just
great ).
When I tried to use the stand alone "scomp" , I've got into trouble.
Here is the
trace of the error I receive for all schemas including the example schema
( I
have followed the instructions described in the attached README file
for the environment
configuration) :
C:\WSAD_Workspaces\dc_xml_beans\xml_to_java\test>scomp -out myeasypo.jar
C:\XMLBeanToolkit\xkit\schemas\easypo
Loading schema file C:\XMLBeanToolkit\xkit\schemas\easypo\easypo.xsd
Loading config file C:\XMLBeanToolkit\xkit\schemas\easypo\easypo.xsdconfig
Time to build schema type system: 1.297 seconds
java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.1_05\..\bin\javac.exe"
-J-Xmx256M @C:\DOCUME~1\a337335\LOCALS~1\Temp\javac31952 error=3
null
java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.1_05\..\bin\javac.exe"
-J-Xmx256M @C:\DOCUME~1\a337335\LOCALS~1\Temp\javac31952 error=3
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:67)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:491)
at java.lang.Runtime.exec(Runtime.java:457)
at com.bea.xbean.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:167)
at com.bea.xbean.tool.SchemaCodeGenerator.compileTypeSystem(SchemaCodeGenerator.java:178)
at com.bea.xbean.tool.SchemaCompiler.compileImpl(SchemaCompiler.java:547)
at com.bea.xbean.tool.SchemaCompiler.main(SchemaCompiler.java:141)
BUILD FAILED
Please, help me to find what is wrong here !!!
Thank you,
- Michael P. -
IOException: CreateProcess: dir error=2
Hi
I want to run a simple shell command "dir" on cygwin thru java class. My code is as follows :-
public class CygJava {
public static void main (String args[]){
File workDir = new File("c:/cygwin/bin");
try {
Runtime systemShell = Runtime.getRuntime();
Process shellOutput = systemShell.exec("dir", null, workDir);
InputStreamReader isr = new InputStreamReader(shellOutput.getInputStream());
BufferedReader br = new BufferedReader (isr);
String line = null;
System.out.println("<OUTPUT>");
while((line = br.readLine()) != null ) {
System.out.println(line);
System.out.println("</OUTPUT>");
int exitVal = shellOutput.waitFor();
System.out.println("Process Exit Value : "+exitVal);
}catch (IOException ioe) {
System.err.println(ioe);
} catch (Throwable t) {
t.printStackTrace();
On running this program , i get the error as :-
java.io.IOException: CreateProcess: dir error=2
Could anyone tell me as to why is this error occuring ?
ThanksI think this might be useful:
http://forum.java.sun.com/thread.jspa?threadID=416069&tstart=120
If not I would suggest searching the forum for others -
IOException--CreateProcess HELP!!!
Hi every body.
Does someone know the meaning of this error?
java.io.IOException: CreateProcess: prueba error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:63)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
at org.apache.jsp.ChangeDirBajaRCXX_jsp._jspService(ChangeDirBaja
p.java:185)....................................
It's the result of this code:
cmd="prueba.bat";
exec(cmd);
and the prueba.bat is really simple:
@echo off
lejos HelloWorld
'lejos' is an exe file.
If i try 'lejos HelloWorld' from the MS-DOS it runs ok.
Thanks!!Hi,
I'm facing the same problem. The only diference is that I need to execute only 1 command but because I have to execute it in a Network folder (that comes from a database, so it is configurable). I tried to enable the UNC support from the Command Shell of Windows XP but without success.
Now I'm trying to use the pushd popd commands so that I can execute my command remotely.
Here is the commands I'm trying to execute (that works with the command):
pushd \\brserver\transaction && try.bat && popd
When I execute that in the CMD, it works but with the Runtime.exec, it gives me the IOException error.
Here is my code:
String command = "pushd \\brserver\transaction && try.bat && popd";
Process process - Runtime.getRuntime().exec(command);
I've also tried that:
String[] commands = new String[]{"pushd \\brserver\transaction", "try.bat", "popd"};
Process process - Runtime.getRuntime().exec(commands);
But without success. If I could only make the UNC works, it would probably resolve my problem.
Is somebody can help me please?
Thanks,
M. Jalbert -
IOException--CreateProcess--Win32Process!!!!
Hi every body.
Does someone know the meaning of this error?
java.io.IOException: CreateProcess: prueba error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:63)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
at org.apache.jsp.ChangeDirBajaRCXX_jsp._jspService(ChangeDirBaja
p.java:185)....................................
It's the result of this code:
cmd="prueba.bat";
exec(cmd);
and the prueba.bat is really simple:
@echo off
lejos HelloWorld
'lejos' is an exe file.
If i try 'lejos HelloWorld' from the MS-DOS it runs ok.
Thanks!!I'm getting a simular problem... did you get it resolved. My coworkers are not having this problem, we are using the same JDK, Weblogic Server version, and same code base. Only difference is I just got a laptop which has windows 2000 Pro Service Pack 3 they are on service pack 2...
Here is the message.
[java] java.io.IOException: CreateProcess: javac -g -nowarn -classpath C:\f
mac\dev\res\modeling\shl\ejbcgen;C:\jdk1.3.1_02\jre\lib\rt.jar;C:\jdk1.3.1_02\jr
e\lib\i18n.jar;C:\jdk1.3.1_02\jre\lib\sunrsasign.jar;C:\jdk1.3.1_02\jre\classes;
C:\fmac\dev\res\modeling\shl;C:\fmac\dev\res\common\lib\dom.jar;C:\fmac\dev\res\
common\lib\F1J7Swing.jar;C:\fmac\dev\res\common\lib\jakarta-poi-1.5.1-final-2002
0615.jar;C:\fmac\dev\res\common\lib\jax-qname.jar;C:\fmac\dev\res\common\lib\jax
b-api.jar;C:\fmac\dev\res\common\lib\jaxb-libs.jar;C:\fmac\dev\res\common\lib\ja
xb-ri.jar;C:\fmac\dev\res\common\lib\jaxb-xjc.jar;C:\fmac\dev\res\common\lib\jax
p-api.jar;C:\fmac\dev\res\common\lib\jconn2.jar;C:\fmac\dev\res\common\lib\junit
.jar;C:\fmac\dev\res\common\lib\log4j-1.2.3.jar;C:\fmac\dev\res\common\lib\log4j
-1.2rc1.jar;C:\fmac\dev\res\common\lib\logkit.jar;C:\fmac\dev\res\common\lib\nam
espace.jar;C:\fmac\dev\res\common\lib\sax.jar;C:\fmac\dev\res\common\lib\struts.
jar;C:\fmac\dev\res\common\lib\xalan.jar;C:\fmac\dev\res\common\lib\xercesImpl.j
ar;C:\fmac\dev\reD
[java] at java.lang.Win32Process.create(Native Method)
[java] at java.lang.Win32Process.<init>(Win32Process.java:66)
[java] at java.lang.Runtime.execInternal(Native Method)
[java] at java.lang.Runtime.exec(Runtime.java:551)
[java] at java.lang.Runtime.exec(Runtime.java:477)
[java] at java.lang.Runtime.exec(Runtime.java:443)
[java] at weblogic.utils.Executable.exec(Executable.java:200)
[java] at weblogic.utils.Executable.exec(Executable.java:125)
[java] at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Comp
ilerInvoker.java:545)
[java] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvok
er.java:372)
[java] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvok
er.java:363)
[java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:2
45)
[java] at weblogic.ejbc20.runBody(ejbc20.java:360)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:79)
[java] at weblogic.ejbc.main(ejbc.java:21)
[java] Exec failed .. exiting -
Build Failed: java.io.IOException: CreateProcess
Hi,
Would someone help me on my problem. I had encountered a "java.io.IOException: CreateProcess" when the ant script was about to execute the lines below:
<java classname="AllTests" fork="true" failonerror="yes">
<classpath>
<path refid="all.classpath" />
<path refid="emma.coverage.classes" />
<pathelement location="${emma.instr}" />
<pathelement location="${classes.temp}" />
</classpath>
<jvmarg
value="-Demma.coverage.out.file=${emma.coverage}/coverage.emma" />
<jvmarg value="-Demma.coverage.out.merge=true" />
</java>
The result and the message was stated below.
BUILD FAILED
C:\RAD901\build\emma-build.xml:89: java.io.IOException: CreateProcess: "C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\
jre\bin\java.exe" -Demma.coverage.out.file=C:\RAD901\build/temp/emma/coverage/coverage.emma -Demma.coverage.out.merge=true -classpat
h "C:\RAD901\build\libs\XmlWriter.jar;C:\RAD901\build\libs\cactus1-6\aspectjrt-1.1.1.jar;C:\RAD901\build\libs\cactus1-6\cactus-1.6.1
.jar;C:\RAD901\build\libs\cactus1-6\cactus-ant-1.6.1.modified.jar;C:\RAD901\build\libs\cactus1-6\commons-codec-1.3.jar;C:\RAD901\bui
ld\libs\cactus1-6\commons-httpclient-3.0.1.jar;C:\RAD901\build\libs\cactus1-6\commons-logging-1.0.3.jar;C:\RAD901\build\libs\cactus1
-6\httpunit-1.5.4.jar;C:\RAD901\build\libs\cactus1-6\nekohtml-0.7.4.jar;C:\RAD901\build\libs\catalina.jar;C:\RAD901\build\libs\com-d
arwinsys-util.jar;C:\RAD901\build\libs\commons-pool-1.4.jar;C:\RAD901\build\libs\db2jcc.jar;C:\RAD901\build\libs\db2jcc_license_cu.j
ar;C:\RAD901\build\libs\emma.jar;C:\RAD901\build\libs\hapi-0.5.1.jar;C:\RAD901\build\libs\jboss-common.jar;C:\RAD901\build\libs\jstl
-1.0.jar;C:\RAD901\buil
The result was incomplete. I don't know why, but I would like to know the cause of my exception. I hope somebody could help me.
Thank you so much in advance.Hello all,
I'm having almost the same issue related to error message when I hit a button on my manufacturing software.
*"ScriptException: Error in exec: java.io.IOException: CreateProcess*
*exec(C:\\progra~1\\intern~1\\iexplore.exe http://cbweb4:81/barcode/CMbombyorder.asp\u003FR2=P&T2=12875424-P")*
This is when I hit a button that works for us to show this webpage I wrote previously. Last week we didnt have this issue, this just started this morning and I dont know what do to, it shows something about JAVA, that's why I'm asking to you guys, I dont know if you could please enlight me a little bit.
Thanks in advance. -
Hi,
I upgraded my server from weblogic 9.2 MP1 to MP3 and I get this error during weblogic startup. I have JDK150_12 in the classpath. What could be causing this error?
java.io.IOException: Compiler failed executable.exec: java.io.IOException: CreateProcess: C:\bea9\jdk150_12\bin\javac -sourcepath /dev/null -nowarn -classpath C:\bea9\jdk150_12\jre\lib\rt.jar;C:\bea9\jdk150_12\jre\lib\i18n.jar;C:\bea9\jdk150_12\jre\lib\sunrsasign.jar;C:\bea9\jdk150_12\jre\lib\jsse.jar;C:\bea9\jdk150_12\jre\lib\jce.jar;C:\bea9\jdk150_12\jre\lib\charsets.jar;C:\bea9\jdk150_12\jre\classes;C:\bea9\weblogic92\server\lib\CR315579_92mp1.jar;C:\bea9\jdk150_12\lib\tools.jar;C:\bea9\weblogic92\server\lib\weblogic.jar;C:\bea9\weblogic92\common\lib\apache_xbean.jar;C:\bea9\weblogic92\server\lib\schema\weblogic-container-binding.jar;C:\bea9\weblogic92\server\lib\schema\weblogic-domain-binding.jar;C:\bea9\weblogic92\server\lib\schema\diagnostics-binding.jar;C:\bea9\weblogic92\server\lib\schema\diagnostics-image-binding.jar;C:\bea9\weblogic92\server\lib\wlcipher.jar;C:\bea9\weblogic92\server\lib\jsafe.jar;C:\bea9\weblogic92\server\lib\xmlx.jar;C:\bea9\weblogic92\server\lib\ojdbc14.jar;C:\bea9\weblogic92\server\lib\jconn2.jar;C:\bea9\weblogic92\server\lib\jconn3.jar;C:\bea9\weblogi”
at java.lang.ProcessImpl.create(Native Method)
Thanks.
Edited by: user10387019 on Aug 5, 2009 11:02 AMHi All,
I am still searching for a solution for this issue. I have this problem on three different machines that I tried installing weblogic server 9.2.3. I am now stuck till I find a solution. Weblogic 9.2.1 works and once I upgrade to MP3, I get the error.
Thanks. -
Runtime exec createProcess error
Seeveral monts ago I get this piece of code on ee
It gets hard disk numer via cmd.exe
that works fine on xp but on 98 dont because there is no cmd.exe :)
My coworker make little exe fajl (hdid.exe) which return id number and it works fine too on xp but on 98 that piece of code throws io exception
Here is the function I use for it
(lines under comments are lines that I have used before new hdid.exe )
public String getKey(){
try {
System.out.println("check gk 0 ");
String[] args = new String[] { KlijentPutanje.getRoot()+"/hdid.exe" };
//String[] args = new String[] { "cmd.exe", "/c", "dir", "|", "find", "/i", "Serial Number is" };
Process pro = Runtime.getRuntime().exec(args);
InputStream error = pro.getErrorStream();
InputStream output = pro.getInputStream();
collector = new StringBuffer();
ProcessStreamReader collectingReader = new ProcessStreamReader(output);
Thread out = new Thread(collectingReader);
out.start();
out.join();
String volumeNumber = collector.toString();
//volumeNumber = volumeNumber.substring(volumeNumber.lastIndexOf(' '));
volumeNumber = volumeNumber.trim();
return volumeNumber;
catch (Exception e){
System.out.println("greska prilikom provere registracije - code 169");
e.printStackTrace();
return null;
Here is the exception that this line throws
greska prilikom provere registracije - code 169
java.io.IOException: CreateProcess:
/Grom/dev/pilot/1.0-radna/Ekspert/EkspertData/hdid.exe error=0
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Unknown Source)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at com.propisi.util.Reg.getKey(Reg.java:280)
at com.propisi.util.Reg.execute(Reg.java:73)
at com.propisi.SearchEngine.getSearchEngine(SearchEngine.java:130)
at com.propisi.forme.AppletPretraga.loadReg(AppletPretraga.java:574)
at com.propisi.forme.AppletPretraga.jbInit(AppletPretraga.java:235)
at com.propisi.forme.AppletPretraga.init(AppletPretraga.java:167)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Can you help me 2 get hard disk number on windows98 too (with this hdid.exe pr maybe some other way)
tia cubrovicThat does look like a problem with you coworker's native code, not like a Java problem.
-
PROBLEM:IOException starting Java runtime process
Hi all,
I am new to java and I have the following problem: I have created an applictaion using jbuilder (windows xp) that consists of various frames.
The application was compling and running at the PC I used to create it . Now, I am using a new PC with 2 processors (intel Pentium (D) 3.6) and I get the following error when trying to run the already developed application. Also, I tried to build a new application and I still get the same error.
I would be very greatful for your comments/suggestions..
Thanks in advance
artakianos
-- IOException starting Java runtime process --
java.io.IOException: CreateProcess: "C:\Program Files\Borland\Jbuilder\jdk1.4\bin\javaw" -classpath "C:\Documents and Settings\sstathak\jbproject\MCTOOLS\classes\mctools;C:\Borland\JBuilder2005\lib\jbcl.jar;C:\Borland\JBuilder2005\lib\dx.jar;C:\Borland\JBuilder2005\lib\beandt.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\javaws\javaws.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\charsets.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\ext\dnsns.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\ext\ldapsec.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\ext\localedata.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\im\indicim.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\im\thaiim.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\jce.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\jsse.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\plugin.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\rt.jar;C:\Program F”Maybe your classpath is wrong. You can go to the path where is the instalation and into the directory bin you must `type javac or javaws if you obtain a list of options every is ok and you must set the enviroment variable to this path.
Send me your comments
Miguel Manzano -
IOException while print in windows 98
Hi all,
While printing,i get the IOEXception
java.io.IOException: CreateProcess: C:\\command /c copy c:\CashPrintPage.txt lpt1 error=2
�at java.lang.ProcessImpl.create(Native Method)
�at java.lang.ProcessImpl.<init>(Unknown Source)
�at java.lang.ProcessImpl.start(Unknown Source)
�at java.lang.ProcessBuilder.start(Unknown Source)
�at java.lang.Runtime.exec(Unknown Source)
�at java.lang.Runtime.exec(Unknown Source)
�at com.leaps.core.LeapsFileDownload.printFile(LeapsFileDownload.java:85)
�at com.leaps.core.LeapsFileDownload.init(LeapsFileDownload.java:24)
�at sun.applet.AppletPanel.run(Unknown Source)
�at java.lang.Thread.run(Unknown Source)
The Code is:
public void printFile(String fileName) {
String strCmd="";
if(System.getProperty("os.name").equalsIgnoreCase("Windows 98"))
strCmd = "C:\\command";
else
strCmd = "cmd";
String []cmd=new String[5];
cmd[0]=strCmd;
cmd [1]="/c";
cmd [2]="copy";
cmd[3]=fileName;
cmd[4]="lpt1";
try {
Process child=Runtime.getRuntime().exec(cmd);// error is shown in this line
} catch (IOException ex) {
ex.printStackTrace();
Message was edited by:
finrajahi,
you have to leave one space after "/c " & "copy " & before newfilename " lpt1"
here your modified code
import java.io.*;
public class cmd
public static void main (String args[])
String strCmd="";
if(System.getProperty("os.name").equalsIgnoreCase("Windows 98"))
strCmd = "C:\\command";
else
strCmd = "cmd";
String []cmd=new String[5];
cmd[0]=strCmd;
cmd [1]=" ";
cmd [2]="copy ";
cmd[3]=args[0];
cmd[4]=" newfilename";
try {
Process child=Runtime.getRuntime().exec(cmd);// error is shown in this line
child.wait();
System.out.println(cmd[0]+cmd[1]+cmd[2]+cmd[3]+cmd[4]);
System.out.println("1 files copied");
catch (Exception ex) {
ex.printStackTrace();
} -
Hey you all,
I got this strange error, when running a binary out of my java program (via the Process class), my Program crashes and I get:
java.io.IOEXception: CreateProcess: ....exe error: 87
java.io.IOException: CreateProcess: ....exe error: 87
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:63)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
The ....exe 's are the path to the executable plus two command line parameters. I don't seem to find a list of those error codes. I think, 2 was file not found, but 87 ????
Any help would be appreciated.
B.I didn't know either, so I went to Google and gave it the keywords "Dos error 87", and it had several places that told me it means "Invalid parameter".
-
IOException because of getRuntime().exec
I am trying:
line 29: String[] execArg = new String[] {"D:\\", "dir"};
line 30: Process p = Runtime.getRuntime().exec(execArg);
and getting:
java.io.IOException: CreateProcess: D:\ dir error=3
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:67)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
at PurseMain.main(PurseMain.java:30)
Have no idea why.ok, i tried
Runtime.getRuntime().exec("cmd");
and this works. but really, i want to open up a cmd window from java and execute some commands from that. how can this be achieved? -
Xellerate Adapter Compilation : IOException
Hi
When I try to build an adapter using the thick client, an IOException is encountered. I am using OIM 9.0.1 with JBoss 4.0.2
Any input would be appreciated.
Thanks in advance.
The logs are as follows
2006-11-17 10:17:28,424 DEBUG [org.jboss.ejb.StatefulSessionContainer] Created new session ID: eumwzyaw-51
2006-11-17 10:17:28,424 DEBUG [org.jboss.ejb.StatefulSessionContainer] Using create method for session: public void com.thortech.xl.ejb.databeansimpl.tcADPBean.ejbCreate() throws javax.ejb.CreateException
2006-11-17 10:17:28,439 DEBUG [org.jboss.proxy.ejb.ProxyFactory] seting invoker proxy binding for stateful session: stateful-rmi-invoker
2006-11-17 10:17:28,752 ERROR [XELLERATE.ADAPTERS] Class/Method: tcAdpUtils/compileAdapter encounter some problems: Exception encountered during compilation of adpADPREPOPULATEUSERLASTNAME adapter
2006-11-17 10:17:28,752 ERROR [XELLERATE.ADAPTERS] Class/Method: tcAdpUtils/compileAdapter encounter some problems: CreateProcess: javac -classpath \lib\tools.jar;C:\jboss-4.0.2\bin\run.jar;C:\oracle\xellerate\lib\msbase.jar;C:\oracle\xellerate\lib\mssqlserver.jar;C:\oracle\xellerate\lib\msutil.jar;C:\oracle\xellerate\lib\wlXLSecurityProviders.jar;C:\oracle\xellerate\lib\XIMDD.jar;C:\oracle\xellerate\lib\xlAdapterUtilities.jar;C:\oracle\xellerate\lib\xlAPI.jar;C:\oracle\xellerate\lib\xlAttestation.jar;C:\oracle\xellerate\lib\xlAuditor.jar;C:\oracle\xellerate\lib\xlAuthentication.jar;C:\oracle\xellerate\lib\xlBackOfficeBeans.jar;C:\oracle\xellerate\lib\xlBackofficeClient.jar;C:\oracle\xellerate\lib\xlCache.jar;C:\oracle\xellerate\lib\xlCrypto.jar;C:\oracle\xellerate\lib\XLCustomClient.ear;C:\oracle\xellerate\lib\xlDataObjectBeans.jar;C:\oracle\xellerate\lib\xlDataObjects.jar;C:\oracle\xellerate\lib\xlDDM.jar;C:\oracle\xellerate\lib\xlInputPreprocessor.jar;C:\oracle\xellerate\lib\xlInstaller.jar;C:\oracle\xellerate\lib\xlLogger.jar;C:\oracle\xellerate\lib\xlRemoteManager.jar;C:\oracle\xellerate\lib\xlSampleApp.jar;C:\oracle\”
java.io.IOException: CreateProcess: javac -classpath \lib\tools.jar;C:\jboss-4.0.2\bin\run.jar;C:\oracle\xellerate\lib\msbase.jar;C:\oracle\xellerate\lib\mssqlserver.jar;C:\oracle\xellerate\lib\msutil.jar;C:\oracle\xellerate\lib\wlXLSecurityProviders.jar;C:\oracle\xellerate\lib\XIMDD.jar;C:\oracle\xellerate\lib\xlAdapterUtilities.jar;C:\oracle\xellerate\lib\xlAPI.jar;C:\oracle\xellerate\lib\xlAttestation.jar;C:\oracle\xellerate\lib\xlAuditor.jar;C:\oracle\xellerate\lib\xlAuthentication.jar;C:\oracle\xellerate\lib\xlBackOfficeBeans.jar;C:\oracle\xellerate\lib\xlBackofficeClient.jar;C:\oracle\xellerate\lib\xlCache.jar;C:\oracle\xellerate\lib\xlCrypto.jar;C:\oracle\xellerate\lib\XLCustomClient.ear;C:\oracle\xellerate\lib\xlDataObjectBeans.jar;C:\oracle\xellerate\lib\xlDataObjects.jar;C:\oracle\xellerate\lib\xlDDM.jar;C:\oracle\xellerate\lib\xlInputPreprocessor.jar;C:\oracle\xellerate\lib\xlInstaller.jar;C:\oracle\xellerate\lib\xlLogger.jar;C:\oracle\xellerate\lib\xlRemoteManager.jar;C:\oracle\xellerate\lib\xlSampleApp.jar;C:\oracle\”
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at com.thortech.xl.dataobj.util.tcAdpUtils.compileAdapter(Unknown Source)
at com.thortech.xl.dataobj.util.tcAdpUtils.createAdapter(Unknown Source)
at com.thortech.xl.dataobj.tcADP.createAdapter(Unknown Source)
at com.thortech.xl.dataobj.tcADP.eventPreUpdate(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
at com.thortech.xl.ejb.databeansimpl.tcDataObjectBase.save(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:584)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:297)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:873)
at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
at sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2006-11-17 10:17:28,752 ERROR [XELLERATE.ADAPTERS] Class/Method: tcADP/createAdapter encounter some problems: {1}
java.lang.NullPointerException
at com.thortech.xl.dataobj.util.tcAdpUtils.compileAdapter(Unknown Source)
at com.thortech.xl.dataobj.util.tcAdpUtils.createAdapter(Unknown Source)
at com.thortech.xl.dataobj.tcADP.createAdapter(Unknown Source)
at com.thortech.xl.dataobj.tcADP.eventPreUpdate(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
at com.thortech.xl.ejb.databeansimpl.tcDataObjectBase.save(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:584)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:297)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:873)
at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
at sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2006-11-17 10:17:28,752 ERROR [XELLERATE.ADAPTERS]
ERROR:
CODE GENERATION EXCEPTION: null
2006-11-17 10:17:28,752 DEBUG [com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache] get called (key=.select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcADP' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' ) and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence)
2006-11-17 10:17:28,752 DEBUG [com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache] persistRetrieve called (key=.select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcADP' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' ) and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence)
2006-11-17 10:17:28,752 DEBUG [com.opensymphony.oscache.base.Cache] No cache entry exists for key='.select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcADP' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' ) and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence', creating
2006-11-17 10:17:28,752 DEBUG [com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache] persistStore called (key=.select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcADP' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' ) and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence)
2006-11-17 10:17:28,752 DEBUG [com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache] persistRetrieveGroup called (groupName=DataObjectEventHandlers)Thanks Rajiv. I, in fact, did same for resolution as there was a reference to a directory in logs under /tmp but I wasn't able to find it. Cleaning up /tmp did the trick.
-
Help...java.io.IOException Problem
Hello,
I am having problems running Weblogic 4.5.1 as Windows NT Service but no
problems when running from command window.
The configuration is such:
Hardware:
Dual Processor PIII, 1GB memory, 2 NICs, mirrored internal RAID SCSI drive
on Compaq 1850R
OS:
Windows NT 4.0 SP5
Configuration:
JVM: JDK 1.2.2 (heap size 384M) from Sun
Weblogic 4.5.1 (Server version value=4.5.1 - 128 bit domestic version)
weblogic.system.executeThreadCount=40
weblogic.system.nativeIO.enable=true
weblogic.system.enableConsole=true
If I start the weblogic server from the command window and start throwing
https requests to it, the server works fine for as many number of messages
as I want and for as long as I want.
But when I start the server from the services window in the control panel,
after 98th message it starts giving error (found ofcourse in the log file
only). The snippet of the log file is shown below:
Error found in log file:
Thu Apr 27 05:57:34 PDT 2000:<I> <ListenThread> Listening on port: 80
Thu Apr 27 05:57:35 PDT 2000:<I> <SSLListenThread> Listening on port: 443
Thu Apr 27 05:57:35 PDT 2000:<I> <WebLogicServer> WebLogic Server started
Thu Apr 27 05:58:01 PDT 2000:<I> <ServletContext-Servlets>
com.mycompany.servlet.frontline.frontlineServlet: init
Thu Apr 27 05:59:01 PDT 2000:<E> <CliCon-#|myserver|11.956840209531>
FrontlineSessionBean.processMessage: error parsing message:
java.io.IOException: The handle is invalid
Thu Apr 27 05:59:01 PDT 2000:<E> <CliCon-#|myserver|11.956840209531>
FrontlineSessionBean.processMessage: error parsing message:
java.io.IOException: The handle is invalid
Your insights will be highly helpful.
thanks.
Alay DesaiHello all,
I'm having almost the same issue related to error message when I hit a button on my manufacturing software.
*"ScriptException: Error in exec: java.io.IOException: CreateProcess*
*exec(C:\\progra~1\\intern~1\\iexplore.exe http://cbweb4:81/barcode/CMbombyorder.asp\u003FR2=P&T2=12875424-P")*
This is when I hit a button that works for us to show this webpage I wrote previously. Last week we didnt have this issue, this just started this morning and I dont know what do to, it shows something about JAVA, that's why I'm asking to you guys, I dont know if you could please enlight me a little bit.
Thanks in advance.
Maybe you are looking for
-
Adding PDF file as attachment to SOAP message
Hi, I want to add a pdf file from the hard disk to a soap message as attachment. I have the following code: // CREATE MESSAGE SOAPMessage msg= fac.createMessage(); SOAPEnvelope nEnv= msg.getSOAPPart().getEnvelope(); //READ FILE FROM THE HD Stri
-
Can i put a larger hard drive in my mac
running out of space on my hard drive (300gb) and just wondered if you can easily put a larger drive in?
-
What's the process of uploading videos to youtube?
This might sound like a silly question... but what is the process of uploading videos to youtube? Does the video get processed into youtube friendly format and then get uploaded to youtube? So therefore, no re-processing is required on youtube? And t
-
Error when trying to post interest using FNM1 in Loan Module
Hi, I am getting error "50 E INTEREST EXP or ZBA CONTRA ACCT cannot be replaced' when positng the interest payment for loan in loan module. The system has posted a planned record and i see it in the cash flow however when posting the planned recor
-
Which middleware to use SAP Netweaver XI or Oracle Fusion
Hello All, I have to integrate several modules like CRM, Siebel, Telephony Supply Change Management, etc. --- ERP Integration Which is better middleware SAP XI or Oracle Fusion. Any suggestions, links/pdfs Regards