java rmi ±à³Ì³öÏÖµÄaccess deniedÎÊÌâ½â¾ö
java ÓÃrmi±àд¿Í»§/·þÎñ³ÌÐò
³öÏÖaccess denied ÎÊÌâ
ÒòΪ²»ÖªµÀÔõôÅäÖà ²ßÂÔÎļþ ¾Í½«¿Í»§¶ËµÄSystem.setSecurityManager(new RMISecurityManager())ɾÁË£¬ÔËÐÐjava ProductClient
³É¹¦£¡
ÅäÖòßÂÔÎļþµÃÖ®ºó²ÅŪÀ²
Ïà¹ØÎĵµ£º
11.дÈëÊôÐÔ
//import java.io.*;
File filereadonly=new File(%%1);
try {
boolean b=filereadonly.setReadOnly();
}
catch (Exception e) {
System.out.println("¾Ü¾øд·ÃÎÊ£º"+e.printStackTrace());
}
12.ö¾ÙÒ»¸öÎļþ¼ÐÖеÄËùÓÐÎļþ
//import  ......
À´µ½¹ãÖÝ7ÌìÁË£¬»¹Ã»ÓÐÒ»¸öÃæÊԵ绰£¬Ò»ÆðÀ´Øí.net½ñÌ춼ÃæÊÔÈ¥£¬Ò»¸öÈËÔÚ·¿¼äÀK¶ÈÓôÃÆ£¬×ÔÈÏΪ»¹ËãÊǸöÈËÆ·¡¢¼¼Êõ¶¼²»´íµÄÒ»ÓÅÐãÅ®ÇàÄ꣬ÄѵÀÕæÈ紫˵Öеģ¬ÓÐÐÔ±ðÆçÊÓ£¿Î´±Ø°É£¬×òÌì¾Í¼ûµ½Ò»¸ö£¬ÄǸöƯÁÁ¡£¡£¡£ÆñÒ»¸ö³þ³þ¶¯ÈËÁ˵ð¡¡£¡£¡£
°¥¡£¡£±¯°§Ñ½£¡
´ýÐø¡£¡£¡£¡£¡£¡£ ......
Àࣺ
·ÃÎÊÐÞÊηû
ÐÞÊηû
class
ÀàÃû³Æ
extends
¸¸ÀàÃû³Æ
implement
½Ó¿ÚÃû³Æ
£¨·ÃÎÊÐÞÊηûÓëÐÞÊηûµÄλÖÿÉÒÔ»¥»»£©
·ÃÎÊÐÞÊηû
Ãû³Æ
˵Ã÷
±¸×¢
public
¿ÉÒÔ±»ËùÓÐÀà·ÃÎÊ£¨Ê¹Óã©
publicÀà±ØÐ붨ÒåÔÚºÍÀàÃûÏàͬµÄͬÃûÎļþÖÐ
package
¿ÉÒÔ±»Í¬Ò»¸ö°üÖеÄÀà·ÃÎÊ£¨Ê¹Óã©
ĬÈϵķÃÎ ......
½ñÌìÔÚÑо¿JAX-WS£¬Å¼È»·¢ÏÖjava6µÄÖÐÎÄAPIÔÚjavax.xml.ws°ü϶ªÁËһЩannotation£¬Ò²ÊǺÜżȻ·¢ÏÖÕâÖÖÇé¿ö£¬ÎÒÔÚдjava´úÂ룬·¢ÏÖ¿ÉÒÔÓõÄannotation£¬µ«ÊÇÔÚÖÐÎÄapiÀïÕÒ²»µ½£¬ºóÀ´ÕÒÁËÒ»ÏÂÓ¢ÎÄ°æzpi£¬²Å·¢ÏÖÖÐÎİ涪ÁËһЩannotation£¬ÔÝʱ²»Çå³þ±ðµÄ°üÀïÓÐûÓжªÊ§µÄÇé¿ö¡£ÎÒÊÇʹÓÃÔÚÏßAPI£¬ºóÀ´·¢ÏÖÏÂÔØ°æºÍÔÚÏß°æÒ»Ñù¶ ......