open xml files with oxygen

Oxygen general issues.
BrianDrian
Posts: 6
Joined: Sat Oct 05, 2013 4:34 pm

open xml files with oxygen

Post 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
Radu
Posts: 9445
Joined: Fri Jul 09, 2004 5:18 pm

Re: open xml files with oxygen

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
BrianDrian
Posts: 6
Joined: Sat Oct 05, 2013 4:34 pm

Re: open xml files with oxygen

Post 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?
BrianDrian
Posts: 6
Joined: Sat Oct 05, 2013 4:34 pm

Re: open xml files with oxygen

Post by BrianDrian »

found the source of the issue. I had a log4j file in the dir where the app starts up. ouch!
Post Reply