Try Java Development in minutes

  1. Install JRE & JDK (java runtime environment with JAVA DEVELOPMENT KIT )
    sudo apt-get install openjdk-8-jre openjdk-8-jdk
  2. Verify JAVA tools are available on CONSOLE by typing  java following a  TAB character.
    java javac javadoc javah javap # default tools avail once jdk installed
  3. Download a Helloworld program for learning purpose. Here’s one from Oracle’s site on HelloWorldSwing
  4. Create a workspace directory for better practice and move the source code there.
  5. On terminal run and execute.
    javac HelloWorldSwing.java
    java HelloWorld
  6. You can now able to see Java Swing Window with  Helloworld

Update: MySQL Connectivity

  1. Install MySQL-LIB for JAVA
    sudo apt-get install libmysql-java
  2. Setup MySQL Schema and Tables
    CREATE DATABASE feedback; USE feedback;
    CREATE TABLE comments (
     id INT NOT NULL AUTO_INCREMENT,
     MYUSER VARCHAR(30) NOT NULL, EMAIL VARCHAR(30),
     WEBPAGE VARCHAR(100) NOT NULL, DATUM DATE NOT NULL,
     SUMMARY VARCHAR(40) NOT NULL, COMMENTS VARCHAR(400) NOT NULL,
     PRIMARY KEY (ID) );
    INSERT INTO comments values (default, 'thulasi', 'hi@kesavan.info',
    'https://kesavan.info', now(), 'Summary','My first comment' );
  3. For learning purpose , download a sample source from vogella
  4. Execute the  compile & main class
    javac Main.java
    java Main
  5. You can now able to see the data from MySQL DBMS. Good luck!
This entry was posted in gnu, linux, technology. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


− one = 7