I don't use java much so what are the common (best practice) locations to install components like this. I want to put them in a system directory so multiple users have access.
-
8I'm not looking to do it half-assed. Unix software has common places such as /opt. I would like to know what is common for java/android packages and such.– Translucent PainSep 23, 2011 at 22:52
-
i've said to you that it doesn't matter where , create a new directory and define the autorisation to all user to acces it , and then , pass the path on your Eclipse to refer the sdk ,– HoucineSep 23, 2011 at 22:53
4 Answers
Common locations are /opt
, /srv
, and /usr/local
. I tend to lean toward /usr/local
.
Note that the Android SDK doesn't really require you to install much, it's mostly self-contained. All you need to do is tell Eclipse where it is. You may also want to add the tools
and/or platform-tools
directories to the system-wide PATH so that your users can use adb and other tools.
-
-
4@caffinatedmonkey: Because it's the "correct" location for locally-installed software that isn't part of the standard distribution according to the Filesystem Hierarchy Standard.
/opt
is also perfectly valid, and some would argue that it's even more appropriate since the Android SDK is self-contained and doesn't itself follow the FHS. In fact, if I were to install the SDK today I might put it in/opt
and then symlink to the binaries in/usr/local
(since the latter location has the added benefit of being on thePATH
by default). Oct 22, 2013 at 22:50
On Linux, I typically use /usr/local/android-sdk
, but anywhere that makes sense and that won't get clobbered by your system works. Just be aware that it may actually make sense to put the SDK in a per-user location, since it requires write access to create a VM image and to download SDK updates.
To be more concise and allow user writing for things like sdk installations and etc, you could put it somewhere inside the ~/.local
directory as per the XDG file system hierarchy like ~/.local/lib/arch-id/android-sdk
Also remember to set the ANDROID_SDK_ROOT
env variable to that directory as the ANDROID_HOME
variable was deprecated.
It doesnt matter where you put the sdk. Just put it in any folder where all user's can access it...