Top Posts & Pages
- Eclipse prompt for arg when launching an application
- Difference between two dates in java
- A web server embedded in your java application with Jetty
- Validate XML schema with Commons Configuration in Java
- Generate a XSD easily from an existing XML
- Simple SFTP example in Java with Jsch
- Wake on Lan with Java
- Add color to eclipse console output using the log level
- Pass through proxy from your java program
- Connect to ssh server with java
Categories
Category Archives: java programming
Difference between two dates in java
The easiest way to get the difference between two dates without using a third library is using the TimeUnitclass. Be careful, the result is rounded. I use this code mostly when I need to render a human readable interval. Notice … Continue reading
Validate XML schema with Commons Configuration in Java
If you’re looking for a way to generate an XSD file, you should check this link. There is many ways to change the behavior of a program, one of them is to use a configuration file. If you have many … Continue reading
Posted in java programming, library
Tagged Commons Configuration, validation, xml, xsd
Leave a comment
Simple SFTP example in Java with Jsch
I use Jsch lib to connect in ssh to a remote sftp server. The program connects to the server, and then count the number of files in the directory and then displays their contents.
Wake on Lan with Java
My house has more computers than people living in. Most of these machines are sleeping. Sometime, I need to retrieve one or more files from one of them. It will be troublesome if I had to walk around to boot … Continue reading
Pass through proxy from your java program
How to pass through your company proxy to access http resources on the net ? This simple code has been tested on a NTLM Authorization Proxy Server, the kind of proxy you find when your company work with MS OS. … Continue reading
Connect to ssh server with java
I often have to write a program to connect to a ssh server and manage tasks. Here is how I do. First you need to download the library. You will find it here, it’s called JSch. This simple program will … Continue reading
Jetty embedded serving jsp
If you’re looking for a way to serve jsp easily, you’re at the good place. Today, to serve jsp, most of the time, you will need a web server and a servlet container (like Apache Tomcat). But if you don’t … Continue reading
How to connect to oracle database via jdbc
Add the jdbc jar to your project, for a recent oracle database, you can use this link. You have to sign up with oracle. Load the jdbc driver. With the DriverManager class, get a connection. Don’t forget to close it … Continue reading
Installing jdk7 on a linux box – The easy way
If you want to install the oracle jdk7 and you don’t have root privileges, don’t worry, you don’t need it. Download the zip file from the oracle website. On your linux box, unzip the tar : tar -xvf <filename> on the … Continue reading