Skip to main content

Posts

Showing posts from September, 2014

SNMP Trap Generator using SNMP4J

This project is set up as a maven project where snmp4j library is mentioned as a dependency. <dependency>     <groupId>org.snmp4j</groupId>     <artifactId>snmp4j</artifactId>     <version>1.10.1</version> </dependency> This program will send SNMPv2 Trap message to any ip address mentioned. A SNMP Trap receiver program or application which is listening on port 162 would be able to receive the message. import java.io.IOException; import org.snmp4j.CommunityTarget; import org.snmp4j.PDU; import org.snmp4j.Snmp; import org.snmp4j.mp.SnmpConstants; import org.snmp4j.smi.Address; import org.snmp4j.smi.OID; import org.snmp4j.smi.OctetString; import org.snmp4j.smi.TimeTicks; import org.snmp4j.smi.UdpAddress; import org.snmp4j.smi.Variable; import org.snmp4j.smi.VariableBinding; import org.snmp4j.transport.DefaultUdpTransportMapping; public class TrapGenerator { /** * @param args

How to add Javadoc for a class in eclipse IDE

1. Go to Project Properties->Java Build Path -> Libraries  and Expand the library that you need to add     Java doc. 2. Click on ‘Javadoc location’ as shown in the image below and ‘edit’ it. 3. For spring framework I have given the URL as http://docs.spring.io/autorepo/docs/spring-framework/3.1.x/javadoc-api/ . Now the Javadoc is appearing in Eclipse IDE as below.

Terminal emulator for Windows operating system

If you are a heavy UNIX user then you might find it very difficult to use windows command prompt because of different set of commands and look and feel. If you need a terminal emulator for windows then  you may check it out the 'Git Bash' tool provided by Git community. You can download and install Git from the link :  http://msysgit.github.io/ Once installation is completed then got to Start menu and type 'Git Bash' to open the terminal.