I am opening Matlab as command line only on on a Unix machine. 'ver' gives me the following output. See that java is not enabled.

If I open the Matlab GUI , "ver" gives me the following. note that java is enable in this case.

I am using the following command:
unitMap = java.util.Hashtable;
It runs fine when the Matlab GUI is opened as java is enabled by default.
But I get the following error when I run it on Matlab opened as command line only as java is not enabled:

Here:

How should I enable java?