Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Slightly OT: soft link to a java app stub?



Or if you use bash shell in your terminal window, which is the default, you could set up a bash alias like this:

	alias te=/Applications/TextEdit.app/Contents/MacOS/TextEdit

And then use it like this:

	te file

If you put alias command in your .profile file (create one in your home dir if not exists yet) then you will have it in every terminal window you open.

You could also write a shell script (one-liner) that starts correct executable using $* as argument. You can also do this in Java using Runtime.exec() and arguments from your main().

Regards/Mikael

On Aug 29, 2008, at 11:24 AM, Norman Gray wrote:


Greetings,

On 2008 Aug 28, at 23:45, Robert Koberg wrote:

I am looking for a simple way to open a file in a running java app. I have a java application (oXygen XML editor). I have found that I can open a file in a running instance of oxygen like so:

/Applications/oxygen/Oxygen.app/Contents/MacOS/JavaApplicationStub / path/to/file.xml

...or there's the easy way:

   % open -a /Applications/oxygen/Oxygen.app /path/to/file.xml

or

   % open -b ro.sync.exml.Oxygen /path/to/file.xml

And if Oxygen is the default handler for those files -- quite possible, since it seems quite aggressive in setting itself as the handler for an awful lot of things -- then just 'open /path/to/ file.xml' will work as well.

On 2008 Aug 28, at 23:54, Jason Proctor wrote:

Apple regards Terminal users as second class citizens anyway ;-)

This seems a slightly eccentric point of view.

OS X is just BSD with bells, whistles and gongs in the window manager. If you want more details here, then you might want to look at <http://images.apple.com/server/macosx/docs/Command_Line_Admin_v10.5.pdf > or <http://manuals.info.apple.com/en/Command_Line_v10.4.pdf>. Those are both for headless admin of OS X Server, but quite a lot of the functionality is present in OS X Client as well, so it's perfectly feasible to do headless admin of an OS X Client machine, too.

All the best,

Norman


-- Norman Gray : http://nxg.me.uk Physics and Astronomy, University of Leicester

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Slightly OT: soft link to a java app stub? (From: Robert Koberg <email@hidden>)
 >Re: Slightly OT: soft link to a java app stub? (From: Norman Gray <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.