Over a million developers have joined DZone.

Ubuntu: Installing JDK and MongoDB

· Java Zone

Learn more about Kotlin, a new programming language designed to solve problems that software developers face every day brought to you in partnership with JetBrains.

I've started using Ubuntu recently and I'm still getting used to the new shortcuts and others.

Since the installation was also done by me, I encountered few issues.

Following are the few things which one could encounter and I've included the links to save time.

How to install JDK on Ubuntu…

https://help.ubuntu.com/community/Java

wget http://download.oracle.com/otn-pub/java/jdk/6u34-b04/jdk-6u34-linux-i586.bin
$ chmod u+x jdk-6u34-linux-i586.bin
$ ./jdk-6u34-linux-i586.bin
$ sudo mkdir -p /usr/lib/jvm
$ sudo mv jdk1.6.0_34 /usr/lib/jvm/
$ sudo update-alternatives –install “/usr/bin/java” “java” “/usr/lib/jvm/jdk1.6.0_34/bin/java” 1
$ sudo update-alternatives –install “/usr/bin/javac” “javac” “/usr/lib/jvm/jdk1.6.0_34/bin/javac” 1
$ sudo update-alternatives –install “/usr/lib/mozilla/plugins/libjavaplugin.so” “mozilla-javaplugin.so” “/usr/lib/jvm/jdk1.6.0_34/jre/lib/i386/libnpjp2.so” 1
$ sudo update-alternatives –install “/usr/bin/javaws” “javaws” “/usr/lib/jvm/jre1.6.0_34/bin/javaws” 1

  IMPORTANT choose the java you installed as default

How to enable hibernation

http://askubuntu.com/questions/94754/how-to-enable-hibernation

/etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

How to install MongoDB

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

sudo service mongodb stop

How to solve the VirtualBox Error
sudo /etc/init.d/vboxdrv setup

sudo apt-get install linux-headers-$(uname -r)

Thanks everyone who have contributed to the solutions. Without those, it is not possible for people like me to proceed further.



The Java Zone is brought to you in partnership with JetBrains.  Discover how powerful static code analysis and ergonomic design make development not only productive but also an enjoyable experience.

Topics:

Published at DZone with permission of Jagannathan Asokan , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}