The dmshell is a web server accepting a shell command string, and run it on web server host.
Setup DataBase
Fix Derby Server Startup Failed
When start Derby server with /home/chad/apps/jdk1.6.0_45/db/bin/startNetworkServer
, the following error raised:
access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve")
Solution:
Find out system's JRE. On my laptop, it's /usr/lib/jvm/java-7-openjdk-amd64/jre Add the following codes into file lib/security/java.policy in this folder:
grant {
permission java.net.SocketPermission "localhost:1527", "listen";
};
Ref: http://stackoverflow.com/questions/21154400/unable-to-start-derby-database-from-netbeans-7-4
Create Database and Table
Run ~/apps/jdk1.6.0_45/db/bin/ij and run following commands:
connect 'jdbc:derby://localhost:1527/dmdb;create=true';
create table shellstatus (id int not null generated by default as identity (start with 1, increment by 1), shellname varchar(40), starttime timestamp, endtime timestamp,status int);
Then you can use select * from shellstatus;
to list all data in this table.