Smart-Desktop tutorial


Prerequisites:

  1. Install MySql database with ‘root’ as username and ‘123456’ as password
  2. Create table names ‘jk-smart-desktop-db’

Note: We have missed to include the reports configuration table in the default script in this version, so be sure to execute the below script on the database  before proceeding to the next steps.(this has been fixed in version 0.0.9-7)

-- ----------------------------
 -- Records of reports
 -- ----------------------------
 CREATE TABLE `conf_reports` (
 `report_id` int(11) NOT NULL AUTO_INCREMENT,
 `report_name` varchar(255) NOT NULL,
 `report_file` varchar(255) DEFAULT NULL,
 PRIMARY KEY (`report_id`)
 ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

Instructions:

  1. Create Maven project
  2. Add smart-desktop dependency to your pom.xml file:
<dependencies>
    <dependency>
        <groupId>com.jalalkiswani</groupId>
        <artifactId>smart-eis-desktop</artifactId>
        <version>0.0.9-6</version>
    </dependency>
</dependencies>

3.  Create config files named system.config in your project root folder:

db-host=localhost
db-user=root
db-password=123456
db-port=3306
db-name=jk-smart-desktop-db

encoded=false
tablemeta.dynamic.generate=true

jk-support-mail-from=XYZ@Domain.com
jk-support-mail-to=XYZ2@Domain2.com

jk-mail-user=Username
jk-mail-password=Password

5. Create your application main class , as follows:

package com.jalalkiswani.demo;
import com.jk.framework.application.ApplicationManager;
public class SmartDesktopDemo {
      public static void main(String[] args)  {
         ApplicationManager.getInstance().start();
      }
}

6. Now run your main class, to check your installation:

7. If this was your first installation, a confirmation dialog will appear to ask you installing the base script on the specified database in the configuration file:

Click Yes

7. The application login-dialog will appear , Enter admin as username , 123456 as password:

8. Now you have the application and the framework up and running :