⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 从 java 程序调用 c-c++ 代码12.htm

📁 JNI,用JAVA调用C
💻 HTM
📖 第 1 页 / 共 2 页
字号:
        <TR>
          <TD colSpan=6><IMG height=4 alt="" 
            src="从 Java 程序调用 C-C++ 代码12.files/c.gif" width=390 border=0></TD></TR>
        <TR vAlign=center>
          <TD class=dwsearch height=8><SELECT class=dwsearch 
              name=selScope><OPTION value=dW selected>dW 中国所有内容</OPTION><OPTION 
              value=dW>.................</OPTION><OPTION value=dW>dW 
              中国技术专区:</OPTION><OPTION value=comptZ> 组件技术</OPTION><OPTION 
              value=javaZ> Java 技术</OPTION><OPTION 
              value=linuxZ> Linux</OPTION><OPTION 
              value=xmlZ> XML</OPTION><OPTION value=linuxZ>dW 
              中国特别专题:</OPTION><OPTION value=securityZ> 安全</OPTION><OPTION 
              value=unicodeZ> Unicode</OPTION><OPTION value=all>IBM 
            全部内容</OPTION></SELECT></TD>
          <TD class=small><IMG height=1 alt="" 
            src="从 Java 程序调用 C-C++ 代码12.files/c.gif" width=5 border=0></TD>
          <TD><INPUT class=dwsearch maxLength=100 size=15 name=UserRestriction 
            height="15"></TD>
          <TD><IMG height=1 alt="" src="从 Java 程序调用 C-C++ 代码12.files/c.gif" 
            width=5 border=0></TD>
          <TD width=64><INPUT type=image height=23 alt=搜索 width=64 
            src="从 Java 程序调用 C-C++ 代码12.files/search.gif" value=Search border=0 
            name=Search></TD>
          <TD vAlign=top><IMG height=1 alt="" 
            src="从 Java 程序调用 C-C++ 代码12.files/c.gif" width=34 border=0></TD></TR>
        <TR vAlign=top>
          <TD class=small colSpan=6><A style="COLOR: #ffffff" 
            href="http://www-128.ibm.com/developerworks/cn/search/help-dw.html" 
            target=_blank>高级搜索</A><IMG height=1 alt="" 
            src="从 Java 程序调用 C-C++ 代码12.files/c.gif" width=1 border=0></TD></TR>
        <TR>
          <TD colSpan=6><IMG height=4 alt="" 
            src="从 Java 程序调用 C-C++ 代码12.files/c.gif" width=390 
        border=0></TD></TR></FORM></TBODY></TABLE></TD></TR>
  <TR>
    <TD class=hbg width=160 height=21></TD>
    <TD class=bbg vAlign=top colSpan=2 height=21>  <A class=mainlink 
      href="http://www-900.ibm.com/cn/">IBM 主页</A><SPAN class=divider> | 
      </SPAN><A class=mainlink 
      href="http://www-900.ibm.com/cn/products/index.shtml">产品与服务</A><SPAN 
      class=divider> | </SPAN><A class=mainlink 
      href="http://www-900.ibm.com/cn/support/index.shtml">支持与下载</A><SPAN 
      class=divider> | </SPAN><A class=mainlink 
      href="http://www-900.ibm.com/cn/account/index.shtml">个性化服务</A></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD width=150 bgColor=#ffffff height=1><IMG height=1 alt="" 
      src="从 Java 程序调用 C-C++ 代码12.files/c.gif" width=150></TD></TR>
  <TR>
    <TD width=150 bgColor=#cc6633 height=3><IMG height=3 alt="" 
      src="从 Java 程序调用 C-C++ 代码12.files/c.gif" width=150></TD></TR>
  <TR>
    <TD width=150 bgColor=#333333 height=1><IMG height=1 alt="" 
      src="从 Java 程序调用 C-C++ 代码12.files/c.gif" width=150></TD></TR>
  <TR>
    <TD width=150 bgColor=#000000 height=1><IMG height=1 alt="" 
      src="从 Java 程序调用 C-C++ 代码12.files/c.gif" width=150></TD></TR>
  <TR>
    <TD width=150 bgColor=#ffffff height=1><IMG height=2 alt="" 
      src="从 Java 程序调用 C-C++ 代码12.files/c.gif" width=150></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD><FONT face="Verdana, sans-serif" size=-1><A 
      href="http://www.ibm.com/">IBM</A> : <A 
      href="http://www.ibm.com/developerworks/cn/index.html">developerWorks 
      中国网站</A> : <A 
      href="http://www-128.ibm.com/developerworks/cn/java/index.html">Java</A> : 
      <A 
      href="http://www-128.ibm.com/developerworks/cn/views/java/tutorials.jsp">教学 
      - 在线教程</A></FONT> <BR><IMG alt="用 JNI 进行 Java 编程" 
      src="从 Java 程序调用 C-C++ 代码12.files/masthead.jpg"></TD>
    <TD vAlign=bottom align=right width=*><A 
      href="https://www6.software.ibm.com/developerworks/cn/education/java/j-jni/tutorial/j-jni.zip" 
      border="0"><IMG alt="下载 ZIP 文件" 
      src="从 Java 程序调用 C-C++ 代码12.files/icon-zip.gif" border=0></A><IMG alt=英文原文 
      src="从 Java 程序调用 C-C++ 代码12.files/c.gif" border=0> &nbsp;&nbsp;&nbsp; 
  </TD></TR>
  <TR>
    <TD colSpan=2 height=2><IMG height=2 alt="" 
      src="从 Java 程序调用 C-C++ 代码12.files/c.gif" width=1></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD width=150 bgColor=#000000 colSpan=6 height=1><IMG height=1 alt="" 
      src="从 Java 程序调用 C-C++ 代码12.files/c.gif" width=150></TD></TR>
  <TR>
    <TD background="从 Java 程序调用 C-C++ 代码12.files/sw-gold.gif"><A 
      onmouseover="iOver('topmain'); iOver('bottommain'); self.status=mainblurb; return true;" 
      onmouseout="iOut('topmain'); iOut('bottommain'); self.status=''; return true;" 
      href="https://www6.software.ibm.com/developerworks/cn/education/java/j-jni/tutorial/index.html" 
      border="0"><IMG alt=主菜单 src="从 Java 程序调用 C-C++ 代码12.files/main.gif" 
      border=0 name=topmain></A></TD>
    <TD background="从 Java 程序调用 C-C++ 代码12.files/sw-gold.gif"><A 
      onmouseover="iOver('topsection'); iOver('bottomsection'); self.status=sectionblurb; return true;" 
      onmouseout="iOut('topsection'); iOut('bottomsection'); self.status=''; return true;" 
      href="https://www6.software.ibm.com/developerworks/cn/education/java/j-jni/tutorial/index2.html" 
      border="0"><IMG alt=章节菜单 src="从 Java 程序调用 C-C++ 代码12.files/section.gif" 
      border=0 name=topsection></A></TD>
    <TD background="从 Java 程序调用 C-C++ 代码12.files/sw-gold.gif"><A 
      onmouseover="iOver('topfeedback'); iOver('bottomfeedback'); self.status=feedbackblurb; return true;" 
      onmouseout="iOut('topfeedback'); iOut('bottomfeedback'); self.status=''; return true;" 
      href="https://www6.software.ibm.com/developerworks/cn/education/java/j-jni/tutorial/j-jni-5-3.html" 
      border="0"><IMG alt=给出此教程的反馈意见 
      src="从 Java 程序调用 C-C++ 代码12.files/feedback.gif" border=0 
      name=topfeedback></A></TD>
    <TD width="100%" 
      background="从 Java 程序调用 C-C++ 代码12.files/sw-gold.gif"><IMG alt="" 
      src="从 Java 程序调用 C-C++ 代码12.files/c.gif"></TD>
    <TD background="从 Java 程序调用 C-C++ 代码12.files/sw-gold.gif"><A 
      onmouseover="iOver('topprevious'); iOver('bottomprevious'); self.status=previousblurb; return true;" 
      onmouseout="iOut('topprevious'); iOut('bottomprevious'); self.status=''; return true;" 
      href="https://www6.software.ibm.com/developerworks/cn/education/java/j-jni/tutorial/j-jni-2-12.html" 
      border="0"><IMG alt=上页 src="从 Java 程序调用 C-C++ 代码12.files/previous.gif" 
      border=0 name=topprevious></A></TD>
    <TD background="从 Java 程序调用 C-C++ 代码12.files/sw-gold.gif"><A 
      onmouseover="iOver('topnext'); iOver('bottomnext'); self.status=nextblurb; return true;" 
      onmouseout="iOut('topnext'); iOut('bottomnext'); self.status=''; return true;" 
      href="https://www6.software.ibm.com/developerworks/cn/education/java/j-jni/tutorial/j-jni-2-14.html" 
      border="0"><IMG alt=下页 src="从 Java 程序调用 C-C++ 代码12.files/next.gif" 
      border=0 name=topnext></A></TD></TR></TBODY></TABLE>
<TABLE height=400 cellSpacing=0 cellPadding=2 width="100%" bgColor=#ffffff 
border=0>
  <TBODY>
  <TR vAlign=bottom></A><A name=navskip></A>
    <TD colSpan=4 height=25><IMG height=25 alt="2.从 Java 程序调用 C/C++ 代码" 
      src="从 Java 程序调用 C-C++ 代码12.files/titlebar2.jpg" width=562 border=0></TD></TR>
  <TR>
    <TD width=15 bgColor=#ffffff>&nbsp;</TD>
    <TD width=12 bgColor=#ffffff>&nbsp;</TD>
    <TD vAlign=top align=left width=* bgColor=#ffffff>
      <P><BR>
      <TABLE cellSpacing=0 cellPadding=0 border=0>
        <TBODY>
        <TR>
          <TD width="90%"><FONT face="Verdana, Arial, Helvetica" size=4><B>步骤 
            5:创建共享库文件</B></FONT></TD>
          <TD align=right width=200><FONT face="Verdana, Arial, Helvetica" 
            size=1><NOBR>第 13 页(共16 
      页)</NOBR></FONT></TD></TR></TBODY></TABLE><BR><BR></P><FONT 
      face="Verdana, Arial, Helvetica" size=2>
      <P>接下来,我们创建包含本机代码的共享库文件。大多数 C 和 C++ 
      编译器除了可以创建机器代码可执行文件以外,也可以创建共享库文件。用来创建共享库文件的命令取决于您使用的编译器。下面是在 Windows 和 
      Solaris 系统上执行的命令。</P>
      <P>
      <TABLE border=0>
        <TBODY>
        <TR>
          <TD align=right width=100><B>Windows:</B></TD>
          <TD width=375><CODE>cl -Ic:\jdk\include -Ic:\jdk\include\win32 -LD 
            Sample1.c -FeSample1.dll</CODE></TD></TR>
        <TR>
          <TD align=right width=100><B>Solaris:</B></TD>
          <TD width=375><CODE>cc -G -I/usr/local/jdk/include 
            -I/user/local/jdk/include/solaris Sample1.c -o 
        Sample1.so</CODE></TD></TR></TBODY></TABLE></P><BR></FONT></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD background="从 Java 程序调用 C-C++ 代码12.files/sw-gold.gif"><A 
      onmouseover="iOver('topmain'); iOver('bottommain'); self.status=mainblurb; return true;" 
      onmouseout="iOut('topmain'); iOut('bottommain'); self.status=''; return true;" 
      href="https://www6.software.ibm.com/developerworks/cn/education/java/j-jni/tutorial/index.html" 
      border="0"><IMG alt=主菜单 src="从 Java 程序调用 C-C++ 代码12.files/main.gif" 
      border=0 name=bottommain></A></TD>
    <TD background="从 Java 程序调用 C-C++ 代码12.files/sw-gold.gif"><A 
      onmouseover="iOver('topsection'); iOver('bottomsection'); self.status=sectionblurb; return true;" 
      onmouseout="iOut('topsection'); iOut('bottomsection'); self.status=''; return true;" 
      href="https://www6.software.ibm.com/developerworks/cn/education/java/j-jni/tutorial/index2.html" 
      border="0"><IMG alt=章节菜单 src="从 Java 程序调用 C-C++ 代码12.files/section.gif" 
      border=0 name=bottomsection></A></TD>
    <TD background="从 Java 程序调用 C-C++ 代码12.files/sw-gold.gif"><A 
      onmouseover="iOver('topfeedback'); iOver('bottomfeedback'); self.status=feedbackblurb; return true;" 
      onmouseout="iOut('topfeedback'); iOut('bottomfeedback'); self.status=''; return true;" 
      href="https://www6.software.ibm.com/developerworks/cn/education/java/j-jni/tutorial/j-jni-5-3.html" 
      border="0"><IMG alt=给出此教程的反馈意见 
      src="从 Java 程序调用 C-C++ 代码12.files/feedback.gif" border=0 
      name=bottomfeedback></A></TD>
    <TD width="100%" 
      background="从 Java 程序调用 C-C++ 代码12.files/sw-gold.gif"><IMG alt="" 
      src="从 Java 程序调用 C-C++ 代码12.files/c.gif"></TD>
    <TD background="从 Java 程序调用 C-C++ 代码12.files/sw-gold.gif"><A 
      onmouseover="iOver('topprevious'); iOver('bottomprevious'); self.status=previousblurb; return true;" 
      onmouseout="iOut('topprevious'); iOut('bottomprevious'); self.status=''; return true;" 
      href="https://www6.software.ibm.com/developerworks/cn/education/java/j-jni/tutorial/j-jni-2-12.html" 
      border="0"><IMG alt=上页 src="从 Java 程序调用 C-C++ 代码12.files/previous.gif" 
      border=0 name=bottomprevious></A></TD>
    <TD background="从 Java 程序调用 C-C++ 代码12.files/sw-gold.gif"><A 
      onmouseover="iOver('topnext'); iOver('bottomnext'); self.status=nextblurb; return true;" 
      onmouseout="iOut('topnext'); iOut('bottomnext'); self.status=''; return true;" 
      href="https://www6.software.ibm.com/developerworks/cn/education/java/j-jni/tutorial/j-jni-2-14.html" 
      border="0"><IMG alt=下页 src="从 Java 程序调用 C-C++ 代码12.files/next.gif" 
      border=0 name=bottomnext></A></TD></TR>
  <TR>
    <TD width=150 bgColor=#000000 colSpan=6 height=1><IMG height=1 alt="" 
      src="从 Java 程序调用 C-C++ 代码12.files/c.gif" width=150></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD width="100%">
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><IMG height=1 alt="" src="从 Java 程序调用 C-C++ 代码12.files/c.gif" 
            width=1></TD></TR>
        <TR vAlign=top>
          <TD class=bbg height=21> <A class=mainlink 
            href="http://www-900.ibm.com/cn/ibm/index.shtml">关于 IBM</A><SPAN 
            class=divider> | </SPAN><A class=mainlink 
            href="http://www-900.ibm.com/cn/ibm/privacy/index.shtml">隐私条约</A><SPAN 
            class=divider> | </SPAN><A class=mainlink 
            href="http://www-900.ibm.com/cn/ibm/legal/index.shtml">法律条款</A><SPAN 
            class=divider> | </SPAN><A class=mainlink 
            href="http://www-900.ibm.com/cn/ibm/contact/index.shtml">联系 
          IBM</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<SCRIPT language=JavaScript1.2 src="从 Java 程序调用 C-C++ 代码12.files/stats.js" 
type=text/javascript></SCRIPT>
<NOSCRIPT><IMG height=1 alt="" src="G:\ye\从 Java 程序调用 C-C++ 代码12.files\c(1).gif" 
width=1 border=0></NOSCRIPT> </BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -