If this blog helped you in any way, please donate a dollar here

Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Wednesday, December 21, 2011

Encoding Webcam data in Java

Java is the blue eyed boy of modern society. From Open Source lovers to Oracle, they all love Java. So, apparently, something like capturing data from a webcam and creating a video out if it should be a walk in the walk in the park, right?


Well, in this case, the walk appears to be rather full of potholes! Not only that, the road seems to veer off and disappear at times.


You see, there are various multimedia frameworks available in Java that allow you to capture webcam, but all of them have a JNI interface. This is where things so ugly. On Linux, such specific bits of code rely on Video for Linux (v4l or v4l2) abstractions. On Windows, DirectShow is the way to go.

Wednesday, November 17, 2010

Database connectivity with Java


Spent a lot of time today searching for ways to use Database connectivity on my Ubuntu box. I write the code but it just was not working!


Wrote this code to test for connectivity with this :


import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class TestDatabase {