-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjava_and_ubuntu_18_04.txt
53 lines (44 loc) · 3.22 KB
/
java_and_ubuntu_18_04.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
SO, I got this Dell Latitude 7480 with 8GB memory, Intel Core i5 (quad-core), 256GB SSD.
Its performance was superb when I first installed Ubuntu.
I had issues with resolution at first, however through some tweaks I managed to get it configured
to my liking.
However something was always bothering me. Always, at the middle of doing something great, my CPU fan
would start making this loud noise, meaning it was overheating. This happened in most cases when I opened
some websites on Google Chrome. Closing these sites would resolve the issue, well at least temporarily until
I opened that website again.
My first setup had so many configs which am sure had left lots of hanging config and system files.
So I decided to make a fresh install of Ubuntu 18.04.1
Then the machine went back to normal, I could open almost any website now, (not sure I opened any of the previous)
websites that had issues.
Then it was time to install Java. I always liked to install java using the webupd8 PPA, which is great for updates.
Then something happened. Immediately after I installed JDK 8u221, and ran the command java -version just to confirm
everything was alright, suddently the fan started making a very loud spin.
Running top showed lots of memory and CPU were in use, and these signaled to some processes I couldn't immediately tell.
But, java was the only new thing I had installed, and so decided to remove it right away.
Then I went ahead and dowloaded the tarball from oracle website, extracted the rar
I always like to put all custom stuff inside of /opt directory, and that is where I had put my Java.
Then I set up JAVA_HOME in ~/.bash_aliases and ran java -version again.
Am happily running my laptop until now without issues.
I will keep monitoring in case that loud fan spin comes back and freezes my laptop.
The reason why I switched to using Ubuntu linux in the December of 2008 was because of freezing Windows XP and
the BSOD. SInce then, I never experienced my laptop freezing, even when I tried to run machine learning algorithms
for about two days non stop on this same laptop.
But, for now I will conclude Java was the problem. I will take sometime to dig down why this was the problem. for the time
being, let Java be the suspect number.
How to install Java (not usign PPA)
# Visit the Oracle website
# Download the tarball for Ubuntu
# Extract it to some location say /opt/jdk1.8.0_202
# set JAVA_HOME variable in one of the environment config files ~/.bashrc, ~/.profile, /etc/bash.bashrc, etc
export JAVA_HOME=/opt/jdk1.8.0_202
# sometimes you will need to compile or run java programs from the command line say. for this you need PATH to know
where to find java executable files like java, javac, etc.
# in the same file you edited above, enter
export PATH=$PATH:$JAVA_HOME/bin
# To make sure everything went well,
# Load the new config with the source command
source filename (filename is the path to the file you edited above)
# run echo $JAVA_HOME (should print the path to the jdk)
# echo $PATH (the path should include the path to JAVA_HOME/bin)
$JAVA_HOME is an enviroment variable that all programs that run on a JVM will look for to locate JVM resource necessary for them to run
$PATH variable holds the path to all the commands that we run from the terminal.