Validate Root User is executing the command

January 24, 2012 by · Leave a Comment 

if (getuid())) {
    NSLog(@"You must be root to run this command.");
    exit(1);
}

Compile Java class with external jar files

October 1, 2011 by · Leave a Comment 

This should be so easy, but not being much of a java developer anymore I was treating the jar files like libraries and only specifying the directory in the class path.

How to:


javacĀ -classpath classes:/path/to/jars/my.jar /path/to/java_files/my.java