# Where to find the standard Java package path?



## DenisVS (Mar 25, 2018)

I want to install the apktool for android applications works.
Now it runs by type

```
% java -jar apktool_2.3.1.jar
```
But i want to put apktool_2.3.1.jar into an another wide accessible  directory, and make alias `setenv     apktool    java -jar apktool_2.3.1.jar`, which lead us to common use `% apktool`
What is the best path for placing .jar file?


----------



## tobik@ (Mar 25, 2018)

Many ports put them into /usr/local/share/java/classes/


----------



## Junkie (Mar 25, 2018)

You could use the 
	
	



```
pkg info -l pkg_name
```
 to check which files are installed and where they are stored locally


----------



## ShelLuser (Mar 25, 2018)

DenisVS said:


> But i want to put apktool_2.3.1.jar into an another wide accessible  directory, and make alias `setenv     apktool    java -jar apktool_2.3.1.jar`, which lead us to common use `% apktool`
> What is the best path for placing .jar file?


Somewhere in your home directory if you'll be the only person on the server to use this. Otherwise somewhere in /usr/local but I would advice against using /usr/local/share/java/classes but instead use /usr/local/share/java, optionally another subdirectory.

See; the problem is that 'classes' is used for just that: Java libraries. This isn't a library, you won't be using this jar file on the classpath but mostly as a self-contained executable. So why risk creating confusion by placing it into a location which was meant for the classpath (or in other words: Java libraries)?


----------

