POV-Ray : Newsgroups : povray.programming : Executing Povray from Java program : Executing Povray from Java program Server Time
28 Jun 2024 02:09:58 EDT (-0400)
  Executing Povray from Java program  
From: nvervell
Date: 27 Nov 2004 06:55:01
Message: <web.41a869a24bf6a9e757dde2410@news.povray.org>
I want to run Povray from a Java program with a command line in the form:
<povray> +I<input> +O<output> +D +W800 +H600

I use the Runtime.exec(String) method and it works fine when input and
output files do not contain white spaces.
So I tried several other methods :

Runtime.exec(String) with <povray> +I'<input>' +O'<output>' +D +W800 +H600
Works under Windows but not under Linux

Runtime.exec(String) with <povray> +I"<input>" +O"<output>" +D +W800 +H600
Does not work under Windows (Linux not tested)

Runtime.exec(String[]) with { <povray>, +I'<input>', +O'<output>', +D,
+W800, +H600 }
Works under Windows but not under Linux


Is there a way to run correctly Povray from a Java program ?

I had a quicklook at povray source code and it seems there is some tweaking
made on the command line arguments.


TIA for any help.
Nicolas


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.