Skip to content

Instantly share code, notes, and snippets.

View vorburger's full-sized avatar
💭
I may be slow to respond.

Michael Vorburger vorburger

💭
I may be slow to respond.
View GitHub Profile
package learning;
public class DevFirstJava {
public static void main(String[] args) {
// start bye saying hello
System.out.println("hello");
}
@vorburger
vorburger / CopyResourcesFromClassPathToFilesystemDirectory.java
Created July 3, 2011 22:29
Copy resources from Classpath into a temporary directory
import java.io.File;
import java.io.IOException;
import java.net.URL;
import org.apache.commons.io.FileUtils;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
@vorburger
vorburger / ClassPathScanner.java
Created July 3, 2011 21:56
List all resources under a certain directory on the Classpath (using Spring)
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
Resource[] resources = resolver.getResources(ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + "/META-INF/resources/birt/**");
public class helloclass
{
/**
* @author vorburger
*/
public static void main(String args[])
{
System.out.println("Hello World!");
}
}