Where should I install my program

Jeffrey F. Bloss jbloss at tampabay.rr.com
Sun Jan 28 22:28:03 UTC 2007

Gregor Tudan wrote:

> OOzy Pal schrieb:
> > Where should I install my programs that are not packaged. For
> > example, I have  program that I downloaded and after extraction
> > (untar), I can run it as
> >
> > java -jar xyz.jar
> >
> >   
> <snip>
> I know it's far from being a standard, but many people (as me ;-) )
> use the /opt directory since it's not used by any packages I know of.
> So you can keep an eye on what programs you have  manually installed
> and don't run into conflicts when a packaged version is released.

I'd say that if you're not going to place "manual installations" in the
default path, which indicates they're for personal use, you should
probably put them in ~/bin. That's what it's for, and recent releases
of both Dapper and Edgy will automagically add that directory to your
$PATH if it exists (check your ~/.bash_profile).

As for the OP's java program, I'd locate it in some logical place like
~/bin/MyJavaProgram then create a shell script in ~/bin that changes to
that program's sub-directory and invokes the appropriate 'java -jar'
incantation. That's how I do it anyway, with programs like the JavE
ASCII editor.

If you want the program to be usable by all, put it in a similarly
intuitive directory outside your $HOME (/usr/local/MyProgram ??) and
create the shell script "wrapper" in /usr/local/bin. That way you're
not hassling with adjusting the default $PATH, which might even
raise other issues if for some reason you do run across that one in a
million application that uses /opt for something. ;)

     _?_      Outside of a dog, a book is a man's best friend.
    (o o)         Inside of a dog, it's too dark to read.
-oOO-(_)--OOo-------------------------------[ Groucho Marx ]--
    grok!              Registered Linux user #402208
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 892 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20070128/6dee6a9e/attachment.pgp>

More information about the ubuntu-users mailing list