INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

execute Z-Eves within java

execute Z-Eves within java

(OP)
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!!

RE: execute Z-Eves within java

"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: http://home.arcor.de/hirnstrom/minis/index.html

RE: execute Z-Eves within java

(OP)
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
 

RE: execute Z-Eves within java

>String[] cmd = {"C:\\Python23\\pythonw.exe", "C:\\Program Files (x86)\\Z-Eves 2.3.1\\gui\\toplevel.pyw"};
String[] cmd = {"C:\\Python23\\pythonw.exe", "\"C:\\Program Files (x86)\\Z-Eves 2.3.1\\gui\\toplevel.pyw\""};

Reason? You've to familiarize yourself with the commandline syntax proper to the os first before calling it in java.

RE: execute Z-Eves within java

Id that doesn't work, try executing the command yourself from a command line. Maybe there is a permissions problem.

Cheers,
Dian

RE: execute Z-Eves within java

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: http://home.arcor.de/hirnstrom/minis/index.html

RE: execute Z-Eves within java

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.

RE: execute Z-Eves within java

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...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close