Page 1 of 1

open xml files with oxygen

Posted: Sun Oct 06, 2013 12:24 pm
by BrianDrian
Hi, I have a java app which displays several related xml files in different jtextAreas. I want to provide an option to open all of them in oxygen with a single selection. Can someone please give me some pointers on how to do this?

thanks
Brian

Re: open xml files with oxygen

Posted: Tue Oct 08, 2013 3:43 pm
by Radu
Hi Brian,

So you have a separate application in a separate java VM which is not integrated as an Oxygen plugin, right?
If you know the path to the place where Oxygen is installed (maybe the user could choose the path to the Oxygen installation directory in your application's preferences) you could start from your application a separate process, something like:

Code: Select all

Runtime.getRuntime().exec(new String[] {"C:\\Program Files (x86)\\Oxygen XML Editor 15\\oxygen.bat", "file:/D:/path/to/samples/dita/it-book/topics/installing.dita", "file:/D:/path/to/samples/dita/it-book/topics/secondTopic.dita"...});
Basically when starting the Oxygen process you can send as parameters to it URLs to the XML files which need to be opened.

Regards,
Radu

Re: open xml files with oxygen

Posted: Mon Oct 14, 2013 9:01 pm
by BrianDrian
one issue with this is the log4j. I want to also open one of my logger files and oxygen seems to be zeroing the file. I can get round this using a dirty copy hack but is there a better way?

Re: open xml files with oxygen

Posted: Mon Oct 14, 2013 10:18 pm
by BrianDrian
found the source of the issue. I had a log4j file in the dir where the app starts up. ouch!