Friday, October 21, 2005

Microsoft Cordless Mouse Ce0560 Driver

out of memory error [java] function: getResource (), example. Annotations on Java Basic

This is a clear example of how to use the getResource (). The program returns the address where "getClassPathInfo.class is located.


//--------------------------------------- -----
public class getClassPathInfo {public
getClassPathInfo () {}

public static void main (String [] arg) { System.out.
println ("File:" + getClassPathInfo. class . getResource ( "get ClassPathInfo.class"). getFile ()); System.out.
println ("URL:" + getClassPathInfo. class . getResource ( "getClassPathInfo.class" )); System.out.
println ("Path:" + getClassPathInfo. class . getResource ( "getClassPathInfo.class" ). GetPath ());
}}
//------------------------------------- -------