Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Javaµ÷ÓÃC/C++ – JNI

×òÌì²Å¿´µ½£¬µ«ÊÇÓöµ½Ò»Ð©ÎÊÌ⣬½ñÌì½â¾öÁË£¬¼ÇÏ¡­¡­£¨²Î¿¼£ºhttp://netbeans.org/kb/55/beginning-jni-part1.html£©
ÎÒÓõÄÊÇNetbeans 6.7£¬µ«ÊǺÍÆäËûµÄÒ²Ó¦¸Ã´óͬСÒì°É¡£ »ù±¾Á÷³Ì£º JavaÕâ±ßµÄ£º
´´½¨javaÎļþ£¨´ønativeµÄ£©£¬»¹Òª¼ÇµÃÔÚÀàÖмÓÈ룺System.loadLibrary(xxx) ¡£
È»ºóÓÃjavahÀ´Éú³ÉC/C++µÄÍ·Îļþ£¨±ÈÈ磺javah –o pzc.h –jni –classpath ¡­ pzjava.Main£©¡£ CÕâ±ßµÄ£º
×öÒ»¸ö¡°Öмä²ã¡±µÄC»òÕßC++Îļþ£¬include¸Õ²ÅÉú³ÉµÄÍ·Îļþ£¬°Ñ·½·¨¸´ÖÆÏÂÀ´¡£
»¹Òª¼ÇµÃ°Ñ%JAVA_HOME%\include\ºÍ%JAVA_HOME%\include\win32Ìí¼Óµ½±àÒëÆ÷µÄÍ·ÎļþËÑË÷·¾¶ÖУ¨»¹ÒªÌí¼ÓÉϸոÕÉú³ÉµÄÍ·ÎļþµÄËÑË÷·¾¶£© ¡£
ҪעÒâÉèÖúñàÒëÆ÷Êä³öµÄ¶¯Ì¬¿âÎļþÃû£¬ÒªºÍloadLibraryÖеÄÒ»Ö£¨ÔÚWindowsÏÂÈç¹ûxxxÊÇ"pzc¡±£¬ÄÇÊä³öµÄ¾ÍÊÇpzc.dll£¬Èç¹ûÊÇlinux£¬¾ÍÊÇlibpzc.so£©¡£
»¹Òª×¢ÒâÉèÖñàÒëÆ÷µÄÆäËû²ÎÊý£¬È磺--add-stdcall-alias£¨ÔÚWindowsÏÂÐèÒª£©£¨²é¿´gccÊÖ²á¾ÍÖªµÀËüµÄÒâ˼£©¡£
±àÒëºÃdllºó°Ñdll¸´ÖƵ½javaÏîÄ¿¿Õ¼ä¾ÍÐÐÁË¡£ ÓÐʱgccÑ¡ÏҪ¼Ó-m32£¬°´ÕÕÔ­ÎÄËù˵µÄ£¬Òâ˼Ӧ¸ÃÊÇ£¬Èç¹ûÊÇÔÚ64λµÄ»úÆ÷ÉÏÏëÒª°Ñdll±àÒë³É32λµÄ»°£¬ÄǾÍÒª¼ÓÉÏÕâ¸öÑ¡Ïî¡£


Ïà¹ØÎĵµ£º

java»ñÈ¡³ÌÐòµ±Ç°Ä¿Â¼¡£

import java.net.URL;
import java.net.URLDecoder;
public class PathUtil
{
 /**
  * Get the env of windir, such as "C:\WINDOWS".
  * @return the env of windir value.
  */
 public static String getWindir(){
  return System.getenv("windir");
 }
 
......

java½øÖÆת»»

¶ÔÓÚ10½øÖÆÊýת»»ÎªN£¨2-36£©½øÖÆÒ»°ã¶¼ÊÇÑ¡ÔñÈ¡Óà³ýµÄËã·¨½øÐÐת»» £¬ÏÂÃæ¸ø³öÁ½ÖÖ·½°¸
Ò»ÖÖÊǵݹ飬һÖÖÊǵü´ú¡£Í¨¹ýЧÂÊÆÀ¼ÛÁ½ÕßÐÔÄÜ
ÆäÖеü´úµÄ·½°¸Ö±½ÓÈ¡×ÔjavaÔ´´úÂë¡£
/*
*Class NotationConvert.java
*Create Date: 2009-11-12
*Author:a276202460
*/
package com.rich.notation;
public class Notat ......

´ø×Åjavaѧpython

 pythonÕýÎÄ£º     ºÍÆäËüÓïÑÔÒ»Ñù£¬ÎÒÃÇ¿ÉÒÔÒÔÃüÁîÐеÄÐÎʽ¸øÄãµÄpython³ÌÐò´«µÝ²ÎÊý£¬pyhtonÄܹ»×Ô¶¯°ÑÃüÁîÐвÎÊýÒÔ×Ö·û´®ÁбíµÄÐÎʽ´æ´¢ÔÚsysÄ£¿éµÄarv±äÁ¿¡£ok£¬ÎÒÃÇÏÈÀ´¿´¸öÀý³Ì£º
 
#  ÎļþÃû: printargs.py
#ÓÃ;£ºÑÝʾpythonµÄ´«²Î
import sys
print sys.argv
ÔÚÃü ......

C ÓïÑԺ궨ÒåÓ÷¨×ܽá

 
CÓïÑԺ궨ÒåʵÓÃ×ܽá
 ºê¶¨ÒåÁËÒ»¸ö´ú±íÌض¨ÄÚÈݵıêʶ·û¡£
 Ô¤´¦Àí¹ý³Ì»á°ÑÔ´´úÂëÖгöÏֵĺê±êʶ·ûÌæ»»³Éºê¶¨ÒåʱµÄÖµ¡£
 ºê×î³£¼ûµÄÓ÷¨ÊǶ¨Òå´ú±íij¸öÖµµÄÈ«¾Ö·ûºÅ¡£
 ºêµÄµÚ¶þÖÖÓ÷¨ÊǶ¨Òå´ø²ÎÊýµÄºê£¬ÕâÑùµÄºê¿ÉÒÔÏóº¯ÊýÒ»Ñù±»µ÷Ó㬵«ËüÊÇÔÚµ÷ÓÃÓï¾ä´¦Õ¹¿ªºê£¬²¢Óõ÷ÓÃʱµÄʵ¼Ê²ÎÊýÀ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ