D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] adding jar file to Ubuntu menu

 

On Sat, 14 Feb 2009 14:05:11 +0000
Simon Robert wrote:

> Hi 
> I've installed a java app called storYbook. It starts from the command
> line in its installation directory from a script file called
> storybook.sh. This contains java -Xmx192m -jar lib/storybook.jar which
> also works.
> 
> I'm trying to put it into the ubuntu menu. I've tried
> /home/simon/storybook/storybook.sh
> the same with a "." the front and 
> java -Xmx192m -jar /home/simon/storybook/lib/storybook.jar and
> variations on them.
> 
> Running the last command from anywhere apart from its directory gets a
> missing file report from java.
> 
> What should I be doing?
> 
> Thanks
>    Simon

Given your last statement "running the last command from anywhere apart
from...", I would make a 2-line bash script:
----
#!/bin/bash
cd /home/simon/storybook
java -Xmx192m -jar lib/storybook.jar
----
Make it executable (I usually have a ~/bin directory for things like
this) and use that in your Ubuntu Menu.

Grant.

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html