Ajit Gupta

Greenhorn
+ Follow
since May 03, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ajit Gupta

thx a lot....
everything said and done, the problem solved...
but one more chaos
how do i create a jar file from my class file
whenever i try it gives main class not found....
14 years ago
william answering ur questions....
the exe file when run from the command prompt does not require any input from command prompt coz it takes its input from another text file....
and it is not meant to give any other output except writing to the text file...and yes it is being executed when we run from its own directory..
from any other place it gives " the file cannot be opened"
14 years ago
actually the exe file i want to execute is an executable file of a c++ program...and this program shud when run create a text file and write some values into it....now when i run it myself independently the file is being generated...but not when i am trying to run it thru my java code....
so the exe file is not being executed....
coz i guess it cannot run in JRE....
the exec() command has a parameter for environment.....here as i am not specifying nething it takes it to b null and so by default JRE....and my exe file(c++ one) will not run in that...
14 years ago
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("E:/gate_name.exe");
gate_name.exe is the file i want to execute.....
14 years ago
i am expecting the output to b written in a text file...which will b created....and as the file is not being created i assume my exe file is not getting executed.....
14 years ago
I have a problem while executing a c++ executable file frm my java code......if i use any other exe file other than one made by c++ ....it runs fine...but with c++ one it gives some environment error.....
so how do i run a c++ executable file frm my java code.....
14 years ago
thx a lot for replying....
actually i am using win 2k....
and there is no error message comin up..
its just that the exe file is not gettin executed....
coz it is a c++ executable file...i think it is not able to run in the java runtime environment(JRE)...which the exec method takes as default....]
14 years ago
i have a problem while executing a c++ executable file frm my java code......if i use any other exe file other than one made by c++ ....it runs fine...but with c++ one it gives some environment error.....
so how do i run a c++ executable file frm my java code.....
14 years ago
i have a problem while executing a c++ executable file frm my java code......if i use any other exe file other than one made by c++ ....it runs fine...but with c++ one it gives some environment error.....
so how do i run a c++ executable file frm my java code.....
14 years ago