javaµÃµ½Ò»¸ö°üµÄËùÓÐÀà
public static Class[] getClasses(String pckgname)
throws ClassNotFoundException {
ArrayList<Class> classes = new ArrayList<Class>();
// Get a File object for the package
File directory = null;
try {
ClassLoader cld = Thread.currentThread().getContextClassLoader();
if (cld == null)
throw new ClassNotFoundException("Can't get class loader.");
String path = '/' + pckgname.replace('.', '/');
URL resource = cld.getResource(path);
if (resource == null)
throw new ClassNotFoundException("No resource for " + path);
directory = new File(resource.getFile());
} catch (NullPointerException x) {
throw new ClassNotFoundException(pckgname + " (" + directory
+ ") does not appear to be a valid package a");
}
if (directory.exists()) {
// Get the list of the files contained in the package
String[] files = directory.list();
for (int i = 0; i < files.length; i++) {
// we are only interested in .class files
if (files[i].endsWith(".class")) {
// removes the .class extension
classes.add(Class.forName(pckgname + '.'
+ files[i].substring(0, files[i].length() - 6)));
}
}
} else
throw new ClassNotFoundException(pckgname
+ " does not appear to be a valid package b");
Class[] classesA = new Class[classes.size()];
classes.toArray(classesA);
return classesA;
}
Õâ¸ö·½·¨ÊÇ´ÓsunÂÛ̳ÉÏÕÒµ½µÄ£¬ËûÔÚeclipseµÄtomcat6.0»·
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
JavaÍøÂç±à³Ì³õ²½
Kagula
2009-11-23
¹Ø¼ü´Ê
Java Socket DataInputStream DataOutputStream
¸ÅÒª
ʹÓÃJavaͬ²½IOÓ¦ÓóÌÐò¿â£¬ÊµÏÖCS½á¹¹ÍøÂç±à³Ì¡£
ÕýÎÄ
ʹÓÃSocketÀ´½¨Á¢ÍøÂçÁ¬½Ó£¬Ê¹ÓÃDataInputStream¡¢DataOutputStreamÀ´´æÈ¡ÍøÂçÁ÷¡£
¿Í»§¶Ë²¿·Ý
µÚÒ»²½ ......
JAVA ÀàÒýÓÃÓг£Óõ½µÄÓÐÈýÖУº
µÚÒ»ÖÖ :super ÊǸ¸ÀàÒýÓã¬Í¨¹ýËü¿ÉÒÔ·ÃÎʸ¸ÀàµÄÊôÐԺͷ½·¨¡£
µÚ¶þÖÖ £ºthisÊǵ±Ç°ÀàµÄÒýÓá£Í¨¹ýËû¿ÉÒÔ·ÃÎʵ±Ç°ÀàµÄ·½·¨ºÍÊôÐÔ¡£
µÚÈýÖÖ£º×ÓÀàµÄÒýÓã¬ÎÒ³£Óø¸ÀàµÄ¶ÔÏóÈ¥·ÃÎÊ×ÓÀàµÄ¶ÔÏóÀ´ÊµÏÖ¶à̬¡£ÀýÈ磺ˮ¹ûÀà Ë®¹û=new Æ»¹ûÀࣨ£©£»
ÕâÑùÎÒÃÇ¿ÉÒÔͨ¹ý Ë®¹ûÕâ¸ö¶ÔÏóÈ¥·ÃÆ»¹ûÀ ......
ÌùÔÚÎÒÃǶàÏß³Ì Java ±à³ÌÂÛ̳ÉÏ×î³£¼ûµÄÎÊÌâÖ®Ò»ÊÇ“ÔõÑù´´½¨Ï̳߳أ¿”¡£¼¸ºõÔÚÿ¸ö·þÎñÆ÷Ó¦ÓóÌÐòÖж¼»á³öÏÖÏ̳߳غ͹¤×÷¶ÓÁÐÎÊÌâ¡£±¾ÎÄÖУ¬Brian Goetz ̽ÌÖÁËÏ̳߳صĶ¯»ú¡¢Ò»Ð©»ù±¾ÊµÏֺ͵÷Óż¼ÊõÒÔ¼°Ò»Ð©Òª±ÜÃâµÄ³£¼ûΣÏÕ¡£
ΪʲôҪÓÃÏ̳߳أ¿
ÖîÈç Web
·þÎñÆ÷¡¢Êý¾Ý¿â·þÎñÆ÷¡¢Îļþ·þÎñÆ÷»òÓÊ ......