JAVAͨ¹ýJNIµ÷ÓÃDLLÎÊÌâ
×î½üÒªÔÚÒ»¸öJAVA¹¤³ÌÖе÷ÓÃÒ»¸ö±ðÈ˵ÄDLL¿â£¬³öÏÖÁËÒÔÏÂÎÊÌ⣺ƽ̨ÊÇJDK1.6.0_2
±ðÈ˵ÄDLLµ¼³öµÄº¯ÊýÀàËÆÓÚ_Java_Sth_1Find@12 £¬¶øÎÒ·ÃÎʸú¯ÊýµÄÀàÈç¹ûÔÚdefault packageϾͿÉÒÔÕý³£·ÃÎÊ£¬¾ÍÊÇ˵DLLµ¼³öµÄJNIÊÇÔÚĬÈϰüÏµģ¬¶øÈç¹û°Ñ¸ÃÀà·ÅÈëÌØ¶¨µÄ°üϾͻá³öÏÖException in thread "main" java.lang.UnsatisfiedLinkError:com.Sth.Find()IµÄÒì³££¬µ«Èç¹ûÖ±½Ó·Åµ½default packageÏ£¬ÆäËüÀàÓÖÎÞ·¨·ÃÎÊËü£¨¾²éÔÚJDK1.4.0ÒÔºó¾Í²»Ö§³Öµ¼Èëdefault package°üÖеÄÀàÁË£©
³ýÁ˰ÑËùÓÐÀà¶¼·ÅÈëdefault packageÏ£¬²»ÖªµÀ»¹ÓÐûÓбðµÄ°ì·¨¡£
Ïà¹ØÎĵµ£º
±¾ÎĽéÉܵÄJAVA¹æÔòµÄ˵Ã÷·ÖΪ5¸ö¼¶±ð£¬¼¶±ð1ÊÇ×î»ù±¾Ò²ÊÇ×îÖØÒªµÄ¼¶±ð£¬ÔÚ½ñºó½«Â½ÐøÐ´³öÆäËûµÄ¹æÔò¡£×ñÊØÁËÕâЩ¹æÔò¿ÉÒÔÌá¸ß³ÌÐòµÄЧÂÊ¡¢Ê¹´úÂëÓиüºÃµÄ¿É¶ÁÐԵȡ£
£¨1£© ±ÜÃâʹÓÃNEW¹Ø¼ü×ÖÀ´´´½¨String¶ÔÏó¡£
°ÑÒ»¸öString³£Á¿copyµ½String ¶ÔÏóÖÐͨ³£ÊǶàÓà¡¢ÀË·Ñʱ¼äµÄ
Public class test{
&nbs ......
ÏëÅúÁ¿ÐÞ¸ÄÒ»¸öÎļþ¼ÐµÄËùÓÐÎļþµÄÎļþÃû£¬ÔÚÍøÉÏÕÒÁ˺öàÈí¼þ¶¼²»ºÃÓã¬ÃÍÈ»ÏëÆðÀ´ÎÒ×Ô¼ºÒ²»áд´úÂëô~~~
Õâ¸ö´úÂëÖ»ÄÜ×Ô¶¨ÒåÀ©Õ¹Ãû¡£¡£ÎļþÃûĬÈÏÊÇ0£¬ÒÔºó¾Í++À²£¬Ò²¾ÍÊÇ1£¬2£¬3……Ö»ÊÇ»ù´¡ÐÔ´úÂë
import java.io.File;
public class Rename {
/**
* @param args
......
ÅжÏÌ⣺ÉùÃ÷int a = 10; ÅжÏÒÔÏÂ3¸öÔËËãÊÇ·ñÄܹ»·Ö±ðͨ¹ýJava±àÒëÆ÷£º
a = a/2; a = a/3; a = a*2.89;
½â£ºa = a*2.89;²»ÐУ¬a*2.89ÔËËã»áÌáÉý³ÉdoubleÀàÐÍ
Êý×éÓÐûÓÐlength()Õâ¸ö·½·¨? StringÓÐûÓÐlength()Õâ¸ö·½·¨£¿
½â£ºÊý×éûÓÐlength()Õâ¸ö·½·¨£¬ÓÐlengthµÄÊôÐÔ¡£
¡¡¡¡ StringÓÐÓÐlength()Õ ......
ÀûÓÃoracle×Ô´øµÄutl_file°ü¿ÉÒÔ·ÃÎÊ´ÅÅÌÎļþ£¬µ«ÓиöÏÞÖÆ--ÎÞ·¨·ÃÎÊÎļþ¼Ð£¿Ê²Ã´ÒâË¼ÄØ£¿¾ÍÊÇ˵oracleÖ»ÄÜ·ÃÎÊÖ¸¶¨µÄÎļþ£¬¶ø²»ÄÜ·ÃÎÊÎļþ¼ÐϵÄδ֪Îļþ¡£ËùÒÔ£¬Èç¹ûҪͨ¹ýoracleÈ¥±éÀúijָ¶¨Â·¾¶ÏµÄËùÓÐÎļþ£¬sorry, impossible! µ«ÊÇ£¬ÓÐÒ»ÖÖÌæ´ú·½°¸¿ÉÒÔÖúÄãÒ»±ÛÖ®Á¦£¡
ÖÚËùÖÜÖªjavaÖ®FileÀàÖ¸ÏòµÄ¿ÉÒÔÊÇĿ¼Ҳ¿ÉÒÔÊ ......
javaÀàµÄ³ÉÔ±±äÁ¿ÓÐÁ©ÖÖ£º
Ò»ÖÖÊDZ»static¹Ø¼ü×ÖÐÞÊεıäÁ¿£¬½ÐÀà±äÁ¿»òÕß¾²Ì¬±äÁ¿
ÁíÒ»ÖÖûÓÐstaticÐÞÊΣ¬ÎªÊµÀý±äÁ¿ ÀàµÄ¾²Ì¬±äÁ¿ÔÚÄÚ´æÖÐÖ»ÓÐÒ»¸ö£¬javaÐéÄâ»úÔÚ¼ÓÔØÀàµÄ¹ý³ÌÖÐΪ¾²Ì¬±äÁ¿·ÖÅäÄڴ棬¾²Ì¬±äÁ¿Î»ÓÚ·½·¨Çø£¬±»ÀàµÄËùÓÐʵÀý¹²Ïí¡£ ¾²Ì¬±äÁ¿¿ÉÒÔÖ±½Óͨ¹ýÀàÃû½øÐзÃÎÊ£¬ÆäÉúÃüÖÜÆÚÈ¡¾öÓÚÀàµÄÉú ......