DevTech101

DevTech101

java

Java sockets – system monitoring / server – parallel stats capturing

While capturing local system stats I needed a way to run parallel captures The code below is still a work in progress how to can/will be done, more on that is explained below. For example: I am trying to capture CPU, Mem every second, but at the same I am also capturing my db response …

Java sockets – system monitoring / server – parallel stats capturing Read More »

Java sockets – system monitoring / server publisher process

This is part two – on how to capture and publish Solaris client performance stats. To read part one please click here. This program will retrieve the last system stats from the local SQLite DB and make it available over a socket or http connection for remote fetching. Once the program is running, just telnet …

Java sockets – system monitoring / server publisher process Read More »

Java sockets – system monitoring / server capture process

Monitoring remote Solaris client’s by using Java sockets. The below configuration shows how to configure a host (Solaris or Linux), to expose local performance states in JSON using Java sockets, the stats are then collected by a remote system to crunch (graph/chart) the data. The full capture pipeline process is outline below. Note: If losing …

Java sockets – system monitoring / server capture process Read More »

Java – How to create a jar file from multiple packages

How to create a runnable jar file from multiple java packages. The below example has two packages mypkg1 & mypkg2 with the below directory structure As you can see below I have 3 java files and two packages # pwd /tmp/prog # du -a 4 ./mypkg1/One.java 4 ./mypkg1/Two.java 16 ./mypkg1 4 ./mypkg2/Res.java 8 ./mypkg2 Example …

Java – How to create a jar file from multiple packages Read More »

Java solution for – Error: Could not find or load main class

For example java package mypkg1 contains the main but I am still getting the error Error: Could not find or load main class One Full example below. mypkg1/One.java package mypkg1; import mypkg2.Res; public class One { public static void main(String[] args) { Two two = new Two(); Res res = new Res(); System.out.println(two.Two(2, 2)); System.out.println(res.Res(4, …

Java solution for – Error: Could not find or load main class Read More »

JME3 and Blender howto

JME beginners howto Full walkthrue http://www.gamefromscratch.com/post/2015/08/31/A-Closer-Look-at-jMonkeyEngine.aspx JME3 howto https://docs.jmonkeyengine.org/beginner/hello_simpleapplication.html Terrain map howto https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_terrain.html Blender howto Blender Beginner Tutorial – Part 2: Moving, Rotating Blendor compile for Solaris (was not able to get it working) https://wiki.blender.org/index.php/Dev:2.4/Doc/Building_Blender/Solaris Free blender 3d models https://www.blender-models.com/model-downloads/buildings/ OpenRTS Engine https://github.com/methusalah/OpenRTS jme3 help series # JME31 Sneak Peek Install # 140621 GitHub First …

JME3 and Blender howto Read More »

Java hashmap single key Multiple Values

Default java library import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; Google java library import java.util.Set; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; Apache java library package com.sqlitedb.examples.util.map; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; Full working example /** * * @author Eli Kleinman */ public class TestArr { public void TestArr() { // create map to …

Java hashmap single key Multiple Values Read More »