Recent Linux distros come with an open-source implementation of
Java. That's what apt-get is offering to download and install.
Don't let it. That product isn't fully capable, at least for
J2EE. You want to use the Oracle JDK that you downloaded.
To do that, the recommended process is to setup the environment/execution path as follows:
Once you do that, the "java -version" command should indicate that you're running the desired java distro.
You can put these lines into your ~/.bash_profile file and they will be executed automatically every time you log in. Assuming you're using bash. Do the equivalent for whatever shell you prefer.