Showing posts with label aptitude. Show all posts
Showing posts with label aptitude. Show all posts

Sunday, August 30, 2015

JDK and NetBeans

Normal I would attempt to avoid install/add software manually and use aptitude to get the job done instead.

Although there is an option to install Java and JDK with aptitude, the version is a bit old, i.e. version 7 instead 8.  I have no option but do it manually.

Here are the steps which I tool to install JDK8 on my machine.

1) Download your JDK8 from Oracle.  Since I am using Debian, I picked and used the gzip version.
2) Decompress the gzip file, e.g.

tar zxvf jdk-8u60-linux-i586.tar.gz

3) Move the uncompressed package to your desired location.  In my case, I put it where other OpenJDK are located, e.g.

sudo   mv   jdk1.8.0u60   /usr/lib/jvm


4) Create a subversion mutual symbolic link to the /usr/lib/jvm/jdk1.8.0u60, e.g.

ln -s /usr/lib/jvm/jdk1.8.0u60   /usr/lib/jvm/oracle-jdk8

5) Use update-alternative to add java, javaws, javadoc, javac to the system.

update-alternatives   --install   "/usr/bin/java"  "java" "/usr/lib/jvm/oracle-jdk8/bin/java"   1

Repeat the above for javac, javadoc and javaws

6) You may need to use update-alternatives --config to update the default java executable path, e.g.

update-alternatives   --config   java

7) Test you setup by running

java   -version

(see: http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre)

8) If you have NetBeans setup before the installation, you need to update its java_homepath value by modifying its netbeans.conf file.

I kept the configuration personalized to my account, hence I used the localized version which is at:

~/.netbeans//etc/netbeans.conf

The contents in my netbeans.conf is

netbeans_jdkhome=/usr/lib/jvm/oracle-jdk8

note: You may not see the etc directory.  If you can't see it, you need to create the etc directory and .netbeans.conf file yourself.

(further information can be found at: Netbeans - ArchWiki)

Update 2016-01-28:  Alternatively, Java can be installed with APT by following the instructions at:

https://launchpad.net/~webupd8team/+archive/ubuntu/java

and

https://launchpad.net/~webupd8team/+archive/ubuntu/java

Sunday, September 14, 2008

Getting Lazarus to work

For my job, I need to learn Delphi. Instead of getting a commerical version of Delphi, I first checked out the repositary to see if there is on available for my Linux machine. The answer is simply yes, and is called Lazarus using Free Pascal. I download and install it with Aptitude. After it installed, it complained that it misses the Free Pascal source files. It seems the Apitiude does not do its job thoroughly. To have Lazarus to work, you also need the package of fpc and fpc-source, i.e.

sudo aptitude install fpc fpc-source


After, everything works as it should be.

Sunday, July 6, 2008

Opera respository

If you like me who likes Opera browser, you may want to add this into your sources.list file:




## Opera
# wget -O - http://deb.opera.com/archive.key | sudo apt-key add -
# deb http://deb.opera.com/opera/ sid non-free
# deb http://deb.opera.com/opera-beta/ sid non-free
deb http://deb.opera.com/opera/ stable non-free
deb http://deb.opera.com/opera/ testing non-free
deb http://deb.opera.com/opera/ unstable non-free


Update: You may want to use the official Howto at
https://help.ubuntu.com/community/OperaBrowser instead.



This would allows you to get the program and its updates through aptitude