Java 1.4.1/OS 10.2.3 runtime exec fails



I start a process that open a random file with it's
own specific application from a java apllication (iava 1.4.1)
on MAc OS 10.2.3. All works fine if the path of the random
file did not contain any spaces like:


but if the random file is:
/Users/emac/Desktop/Nuova cartella/Senza titolo.rtf

nothing happend and the process did not start.

The question is - how can this be solved - it is a mistake of syntax
or not?

The commands:

open /Users/emac/Desktop/readme.txt

open /Users/emac/Desktop/Nuova\ cartella/Senza\ titolo.rtf

works well on terminal - but with the same syntax - and I tried
all the possible combination like:

open "/Users/emac/Desktop/Nuova cartella/Senza titolo.rtf"
open /Users/emac/Desktop/Nuova%20cartella/Senza%20titolo.rtf

on the application them didn't work.

Shop Amazon

Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.