Page 1 of 1
opening a file at the command-line
Posted: Wed Jun 04, 2003 10:09 pm
by nihilo
I am trying to open Oxygen with an initial file, or open a file within Oxygen if it's already running, at the command-line. I've tried both the oxygen and the oxygen.sh shell scripts with the filename as the first argument, but this does not work. Oxygen opens successfully in either case, but the file is not opened. Perhaps there is an additional argument that I need? I didn't see anything about this in the documentation.
For example, to open foo.xsl, I would like to be able to type
, where 'oxygen' is aliased to one of the shell scripts (oxygen or oxygen.sh). I'm running Gentoo Linux, with a 2.4.20 kernel and java 1.4.1.
thanks...
Posted: Thu Jun 05, 2003 10:39 am
by Dan
Indeed, the script fails to open the file because there is a problem with the working directory.
For example, if I make an alias "oxy" to the "oxygen" script, the editor starts, but searches for the file argument relative to the installation directory.
The workaround is to specify the argument with full path:
# oxy /home/dan/test.xml
We will fix this problem in a next version.
Posted: Thu Jun 05, 2003 10:51 am
by Dan
Other workaround is to modify the oxygen.sh script like this:
-------------------
#!/bin/sh
ROOT=/home/dan/Oxygen2.0.1
java -Xmx256m -Dcom.oxygenxml.classpath.relativeToOxygen.jar=true -cp $ROOT:$ROOT/lib/oxygen.jar ro.sync.exml.Oxygen $1 $2 $3
-------------------
The ROOT must be set to the installation directory. The java command must be on a single line. It is possible for the editor ask again for the license. You have to browse for it.
success -- thanks
Posted: Thu Jun 05, 2003 8:24 pm
by nihilo
Dan wrote:Other workaround is to modify the oxygen.sh script like this:
-------------------
#!/bin/sh
ROOT=/home/dan/Oxygen2.0.1
java -Xmx256m -Dcom.oxygenxml.classpath.relativeToOxygen.jar=true -cp $ROOT:$ROOT/lib/oxygen.jar ro.sync.exml.Oxygen $1 $2 $3
-------------------
The ROOT must be set to the installation directory. The java command must be on a single line. It is possible for the editor ask again for the license. You have to browse for it.
Great. This works with just a relative path to the file. Thanks a lot

one more issue
Posted: Thu Jun 05, 2003 8:50 pm
by nihilo
After following Dan's second post, Oxygen now opens a file with a relative path to the file, but I discovered another issue.
If Oxygen is already running, and I try to again open a file from the command line, nothing happens. The file isn't opened. So it seems that after you've opened a file, you can't open any more except from within Oxygen using the GUI Hopefully there's a workaround for this, as I am really happy with Oxygen, but I need to be able to open files at the command line when it's already running.
Posted: Fri Jun 06, 2003 8:17 am
by Dan
Yes, we will corect this. The current mechanism is to send to the running instance the arguments of the second call. The problem is also the way arguments are interpreted. We should send to the running instance the absolute paths of the arguments.
Thank you for pointing this.
Dan