| View previous topic :: View next topic |
| Author |
Message |
logical_guy Apprentice

Joined: 18 Sep 2007 Posts: 238
|
Posted: Fri Jul 06, 2012 7:17 pm Post subject: running a java jar file from a different directory[solved] |
|
|
Hi, I've got a java jar file in a directory and its got a subdirectory with some fonts in it that the java app uses. How do I put a link to this java app in the /usr/bin folder so everyone can use it? Thanks.
Last edited by logical_guy on Tue Jul 10, 2012 2:43 pm; edited 1 time in total |
|
| Back to top |
|
 |
Bzub Tux's lil' helper

Joined: 25 Dec 2004 Posts: 87 Location: Belgium
|
Posted: Mon Jul 09, 2012 10:32 pm Post subject: Re: running a java jar file from a different directory |
|
|
| logical_guy wrote: | | Hi, I've got a java jar file in a directory and its got a subdirectory with some fonts in it that the java app uses. How do I put a link to this java app in the /usr/bin folder so everyone can use it? Thanks. |
Hi,
Easiest solution I can think of is making a small bash script:
Put this in a file and give it a name you like, I'm calling it MyApp
| Code: |
#!/bin/bash
cd /path/to/jar/file
java -jar MyApp.jar
|
Change MyApp permissions
| Code: | chown root:root MyApp # makes user: root and group: root owner of this file
chmod 755 MyApp # change permissions of MyApp to -rwxr-xr-x
|
Put that in /usr/bin (or better /usr/local/bin) and it should work. |
|
| Back to top |
|
 |
logical_guy Apprentice

Joined: 18 Sep 2007 Posts: 238
|
Posted: Tue Jul 10, 2012 2:43 pm Post subject: |
|
|
Great stuff, bro, thanks a mill - it worked!! Help much appreciated  |
|
| Back to top |
|
 |
|