Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

execute Z-Eves within java

Status
Not open for further replies.

irou

Programmer
Feb 5, 2011
10
TN
hello,
i'm developping with java an editor which offer me the possibility to save an XML file.
My task is to transform this file to Z:So i have to transform it at first to .Tex and open this new file .tex generated with Z-EVES.
I have to run Z-Eves within java(i.e,when i press a bouton transform, Z-Eves should be executed and my file.tex should also be opened:
I try with this code to run Z-EVES but it doesn't work:

Code:
 String[] cmd = {"C:\\Python23\\pythonw.exe", "C:\\Program Files (x86)\\Z-Eves 2.3.1\\gui\\toplevel.pyw"};
				   
 File workingDir = new File("C:\\Program Files (x86)\\Z-EVES 2.3.1\\gui");
try  
 {
  Runtime r = Runtime.getRuntime();
  Process p = r.exec(cmd, null, workingDir);
 }catch(Exception e1) {
				       System.out.println("erreur d'execution " +  e1.toString());
				   }

I need your help please!!
 
Dosn't work" means what? Pink unicorns are coming out of your CD-ROM-Drive?

* does not compile (message?)
* does not run (message?)
* runs with exception (message?)
* runs with error-message (message?)
* runs with wrong result (which?)


don't visit my homepage:
 
It means,Z-EVES isn't executed and i have this error:

java.io.IOException: Cannot run program "C:\Python23\pythonw.exe" (in directory "C:\Program Files (x86)\Z-EVES 2.3.1\gui"): CreateProcess error=740, L?opération demandée nécessite une élévatio
 
>String[] cmd = {"C:\\Python23\\pythonw.exe", "C:\\Program Files (x86)\\Z-Eves 2.3.1\\gui\\toplevel.pyw"};
[tt]String[] cmd = {"C:\\Python23\\pythonw.exe", "[red]\"[/red]C:\\Program Files (x86)\\Z-Eves 2.3.1\\gui\\toplevel.pyw[red]\"[/red]"};[/tt]

Reason? You've to familiarize yourself with the commandline syntax proper to the os first before calling it in java.
 
Id that doesn't work, try executing the command yourself from a command line. Maybe there is a permissions problem.

Cheers,
Dian
 
My french isn't the best one. Does: "L'opération demandée nécessite une élévation" mean: "The requested operation needs a higher ...?"

Higher level, permission?

Maybe jython would be a less errorprone way, and plattform independently too.

don't visit my homepage:
 
It does seem to mean that. But, it is a misleading message because a folder is read as the first argument instead of a script file proper of .pyw.
 
Well, at the start, I assume nothing. The command line is simply wrong to put it bluntly. And now, the op has nothing to say, another thing I don't assume...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top