Setting up the Java Dev Environment in Slackware 14 – Part 3

IntelliJIDEA

This is the third part in the series ‘Setting up the Java Dev Environment in Slackware‘. The previous part was to discuss about how to install IDEs for java development in Slackware. And it was ending with mentioning IntelliJ IDEA but without giving the steps to install it. So this part will be dealing with that.

Steps for installation :

  1. Download the Gnu/Linux package.
  2. Login as root :
    $ su
    $ Password:
  3. Copy the downloaded file to /opt/ :
    # cp /home/user/downloads/ideaIC-12.1.4.tar.gz   /opt/
  4. Uncompress the file and rename the uncompressed directory :
    # cd /opt/
    # tar -xzvf /opt/ideaIC-12.1.4.tar.gz
    # mv -f ideaIC-12.1.4/ idealC
  5. Create an executable file :
    # touch /usr/bin/IDEA 
    # chmod 755 /usr/bin/IDEA
    Open the file in an editor
    # vim /usr/bin/IDEA
    and paste the following lines

    #!/bin/sh 
    export IDEA_HOME="/opt/idealC/bin" 
    $IDEA_HOME/idea.sh $* 

    OR we can directly link the `IDEA_HOME/idea.sh`

    # ln -fs /opt/idealC/bin/idea.sh /usr/bin/IDEA

    but I think the first approach is the neat one.

  6. Create an entry in menu :
    Create an entry in KDE or XFCE Menu.

Setting up the Java Dev Environment in Slackware 14 – Part 2

So we have installed the jdk in the Slackware system ( part I ). But for java program development it is not enough, for effective management of code we need to have a good Ides. And two of them are Eclipse and Netbeans.

Eclipse

First Method :

  • Download the Eclipse for Gnu/Linux from here. Choose the appropriate version and type.
  • Extract the downloaded compressed files to the location where you want to install them. You might have to have the admin privileges.for example : if I want to install eclipse in/opt of Slackware ( a good choice to install non default Slackware  programs)
    # cp  /opt
    # cd /opt
    # tar xzvf
  • Change directory ownership to your user/group.
    # chown -R  eclipse
  • Create link in desktop, Menu.
  • Click on the icon and give the workspace directory on start up.
  • Use your Eclipse IDE.

Second Method : There exists links to the sites which provides installers, download them and install eclipse (You might have to have admin rights)

Third Method : Use Slack builds.

Netbeans

  • Download the installer from here , which is a script file.
  • Install Netbeans as admin
    #bash <netbeans.sh>

    and follow the installer window instructions

  • Use Netbeans.

Other Options

There is an editor called JEdit which has plenty of  plugins to empower it for code management.

Happy Slacking guys 🙂

 

Setting up the Java Dev Environment in Slackware 14 – Part 1

From Slackware 14 jdk is not available as txz package in the installation medium, instead of the jdk package  ‘extra’ directory contains the Slackbuild script to convert the official jdk package by Oracle to Slackware txz formated package.

So here goes the steps for jdk Slackware package creation and installation

  1. Open the installation medium (cd containing the ‘extra’ directory or the dvd) in a file manager.
  2. Find the directory ‘java’ in the ‘extra’ directory of the installation medium
  3. Copy the ‘java’ folder to any place in your system.
  4. Download the jdk tarball ( Let it be jdk-7u7-linux-x64.tar.gz for example ) from Oracle website and copy it to the JAVA_PATH ( which is the copied ‘java’ directory path, like /home/abhi/java )
  5. Unzip the Slackbuild tarball inside the JAVA_PATH directory and copy the jdk into the Slackbuild directory
  6. Make Slackbiuld script executable, i.e, #chmod +x JAVA_PATH/java.SlackBuild
  7. Run the Slackbuild script, cd JAVA_PATH && ./java.SlackBuild  /tmp/jdk-7u7-linux-x64.txz
  8. Run the command   upgradepkg –install-new jdk-7u7-linux-x86_64-1.txz
  9. Create java programs and test your java skills

Happy coding and Happy slacking buddies 🙂