[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-700989-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-700989-en":130,"doc-similar-700989":293},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","the-java-native-interface-programmers-guide-and-specification","The Java Native Interface - Programmer’s Guide and Specification","","The Java™ Native Interface Programmer’s Guide and Specification provides a detailed technical framework for using JNI to integrate Java™ with native code. It describes the role of JNI in the Java platform and host environment, guidance on when to adopt JNI, and evolution of the interface. The guide covers setup and workflow for native method declaration, compilation, header generation, native implementation, and building native libraries, followed by core topics such as mapping types, string handling, and array access.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/the-java-native-interface-programmers-guide-and-specification/700989/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/the-java-native-interface-programmers-guide-and-specification/700989.png","ImageObject",300,407,{"name":42,"@type":43},"Supernature","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-22","2026-11-12",true,{"@type":52,"interactionType":53,"userInteractionCount":30},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"What is the role of JNI in the Java platform and host environment?","Question",{"text":62,"@type":63},"JNI defines how Java code interacts with native code by bridging the Java runtime and host environment. The guide explains its purpose and implications for application design.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"What are the typical steps to get started with JNI?",{"text":67,"@type":63},"The guide outlines declaring the native method, compiling the Java class, creating the native method header, implementing the native method in C, compiling the C source into a native library, and running the program.",{"name":69,"@type":60,"acceptedAnswer":70},"How does the guide approach working with Java strings and arrays in native code?",{"text":71,"@type":63},"It provides dedicated sections for accessing strings and arrays, including conversion to native strings, freeing native string resources, constructing new strings, and accessing arrays and primitive array mappings.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},700989,1794522639,{"code":4,"msg":81,"data":82},"success",[83,87,91,95,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":92,"show_sort_weight":93,"slug":94},"Exam",70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":30,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":79,"read_time":144,"preview_page_count":145,"preview_urls":146},962093270004,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","The Java™ Native Interface  \nProgrammer’s Guide and Specification  \nThe Java™ Native Interface  \nProgrammer’s Guide and Specification  \nSheng Liang  \nADDISON-WESLEY  \nAn imprint of Addison Wesley Longman, Inc.  \nReading, Massachusetts • Harlow, England • Menlo Park, California Berkeley, California • Don Mills, Ontario • Sydney Bonn • Amsterdam • Tokyo • Mexico City  \nCopyright © 1999 Sun Microsystems, Inc.  \n901 San Antonio Road, Palo Alto, CA 94303 USA.  \nAll rights reserved.  \nDuke™ designed by Joe Palrang.  \nSun Microsystems, Inc. has intellectual property rights relating to implementations of the technology described in this publication. In particular, and without limitation, these intellectual property rights may include one or more U.S. patents, foreign patents, or pending applications. Sun, Sun Microsystems, the Sun logo, and all Sun, Java, Jini, and Solaris based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, [Inc. in](Inc. in) the United States and other countries. UNIX is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company, Ltd.  \nSun Microsystems, Inc. (SUN) hereby grants to you a fully paid, nonexclusive, nontransferable, perpetual, worldwide limited license (without the right to sublicense) under SUN’s intellectual property rights that are essential to practice this specification. This license allows and is limited to the creation and distribution of clean room implementations of this specification that: (i) include a complete implementation of the current version of this specification without subsetting or supersetting;  \n(ii) implement all the required interfaces and functionality of the Java™ 2 Platform, Standard Edition, as defined by SUN, without subsetting or supersetting; (iii) do not add any additional packages, classes, or interfaces to the java.* or javax.* packages or their subpackages; (iv) pass all test suites relating to the most recent published version of the specification of the Java™ 2 Platform, Standard Edition, that are available from SUN six (6) months prior to any beta release of the clean room implementation or upgrade thereto; (v) do not derive from SUN source code or binary materials; and (vi) do not include any SUN source code or binary materials without an appropriate and separate license from SUN.  \nU.S. GOVERNMENT USE: This specification relates to commercial items, processes, or software. Accordingly, use by the United States Government is subject to these terms and conditions, consistent with FAR 12.211 and 12.212.  \nTHIS PUBLICATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.  \nTHIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE PUBLICATION. SUN MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN ANY TECHNOLOGY, PRODUCT, OR PROGRAM DESCRIBED IN THIS PUBLICATION AT ANYTIME.  \nThe publisher offers discounts on this book when ordered in quantity for special sales. For more information, please contact the Corporate, Government, and Special Sales Group, CEPUB, Addison Wesley Longman, Inc., One Jacob Way, Reading, Massachusetts 01867.  \nISBN 0-201-32577-2  \n1 2 3 4 5 6 7 8 9-MA-0302010099  \nFirst printing, June 1999  \nTo the VM Teams  \nContents  \nPreface .............................................. xiii  \nPart One: Introduction and Tutorial  \n1 Introduction............................................ 3  \n1.1 The Java Platform and Host Environment .......................... 4  \n1.2 Role of the JNI ............................................... 4  \n1.3 Implications of Using the JNI.................................... 6  \n1.4 When to Use the JNI........................................... 6  \n","cbCaiqdeQhLaaPoN","https://ap.wps.com/l/cbCaiqdeQhLaaPoN","pdf",3608584,318,"English","# Preface\n# Part One: Introduction and Tutorial\n## Introduction\n## Getting Started\n# Part Two: Programmer’s Guide\n## Basic Types, Strings, and Arrays","[{\"question\":\"What is the role of JNI in the Java platform and host environment?\",\"answer\":\"JNI defines how Java code interacts with native code by bridging the Java runtime and host environment. The guide explains its purpose and implications for application design.\"},{\"question\":\"What are the typical steps to get started with JNI?\",\"answer\":\"The guide outlines declaring the native method, compiling the Java class, creating the native method header, implementing the native method in C, compiling the C source into a native library, and running the program.\"},{\"question\":\"How does the guide approach working with Java strings and arrays in native code?\",\"answer\":\"It provides dedicated sections for accessing strings and arrays, including conversion to native strings, freeing native string resources, constructing new strings, and accessing arrays and primitive array mappings.\"}]","The Java Native Interface - Programmer’s Guide and Specification | PDF",801,32,[147,151,155,159,163,167,171,175,179,183,187,192,197,202,207,212,217,222,227,231,235,240,245,250,255,260,265,270,275,280,284,289],{"page_no":22,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/442dad1c1e26bb30e1e6f17e52e95cfa.webp",983,1232,{"page_no":26,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/15e17b04c1ceeb5bcacbc398984bb2bb.webp",982,1231,{"page_no":30,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/effda461628dbe5f0e4ad6598675ea77.webp",981,1230,{"page_no":33,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/951b073b3265fdf677d78f40aeff9053.webp",980,1228,{"page_no":96,"url":164,"width":165,"height":166},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/7bfb787aef4309ebe0a3efadd5acf37f.webp",979,1227,{"page_no":101,"url":168,"width":169,"height":170},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/52835b00bad91326338e38bf518ba70e.webp",978,1226,{"page_no":105,"url":172,"width":173,"height":174},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/f261c2fad5625698d1575687a68d59ba.webp",977,1225,{"page_no":110,"url":176,"width":177,"height":178},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/0998d8c0dc8cff4e09b0e008292cd510.webp",976,1223,{"page_no":115,"url":180,"width":181,"height":182},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/33f38843f1e9a45c9ad9dc23c8f26c51.webp",975,1222,{"page_no":123,"url":184,"width":185,"height":186},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/88e645b500992e391993209f696491fa.webp",974,1221,{"page_no":188,"url":189,"width":190,"height":191},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/da4574e786bc92b18f459100247dcdff.webp",973,1220,{"page_no":193,"url":194,"width":195,"height":196},12,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/3f717cba59d558edaf0ca45cf800aade.webp",972,1218,{"page_no":198,"url":199,"width":200,"height":201},13,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/ea104cd156b42f82e99ddbc4746939a7.webp",971,1217,{"page_no":203,"url":204,"width":205,"height":206},14,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/72a65e1dbe3a005d03603c43cf709e57.webp",970,1216,{"page_no":208,"url":209,"width":210,"height":211},15,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/7caf0a59a7d6ea1217c1c3c366e4fbe6.webp",969,1215,{"page_no":213,"url":214,"width":215,"height":216},16,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/631fef24a8464b1229031b01cda94384.webp",968,1213,{"page_no":218,"url":219,"width":220,"height":221},17,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/5ae72a750de7a6f48933a4f071f92a5d.webp",967,1212,{"page_no":223,"url":224,"width":225,"height":226},18,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/619495c966636f53b9b7f7eac1baba25.webp",966,1211,{"page_no":127,"url":228,"width":229,"height":230},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/41e88fb595eca78ac40d47a959903b71.webp",965,1210,{"page_no":117,"url":232,"width":233,"height":234},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/41a5ec0c78391055f6716e7915dca1d7.webp",964,1208,{"page_no":236,"url":237,"width":238,"height":239},21,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/1e6824e3a2ac1e7bcf7134c596849b0b.webp",963,1207,{"page_no":241,"url":242,"width":243,"height":244},22,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/74cfa3237f7ad884b499b6e3a0d4a38e.webp",962,1206,{"page_no":246,"url":247,"width":248,"height":249},23,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/d793ce38ce239429e02c507f5f8e31ec.webp",961,1205,{"page_no":251,"url":252,"width":253,"height":254},24,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/4e9e6158efb51dafca7ea3b60ef0536a.webp",960,1203,{"page_no":256,"url":257,"width":258,"height":259},25,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/a6f8cd6e0e99f24dc5f2b99e56929545.webp",959,1202,{"page_no":261,"url":262,"width":263,"height":264},26,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/4d5d35626bd719b7ba35b5e6ec4ef261.webp",958,1201,{"page_no":266,"url":267,"width":268,"height":269},27,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/e0a29e54dc30e63862c745bdc5d8b692.webp",957,1200,{"page_no":271,"url":272,"width":273,"height":274},28,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/d696cb9ba162aa5efbae2e0309465aa5.webp",956,1198,{"page_no":276,"url":277,"width":278,"height":279},29,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/db53991a76ee3a5bb8d0ad0a20f408ab.webp",955,1197,{"page_no":112,"url":281,"width":282,"height":283},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/6ff449242dd8cbdbe45e975074740967.webp",954,1196,{"page_no":285,"url":286,"width":287,"height":288},31,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/998a7f04d5c28a375c3c8f143f984c85.webp",953,1194,{"page_no":145,"url":290,"width":291,"height":292},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/431bec36ac578160da8641a14e22a779.webp",952,1193,{"list":294,"token":11},[295,301,307,313,319,325,331,337,343,349],{"doc_id":296,"doc_title":297,"file_type":137,"home_preview_img_url":298,"slug":299,"view_count":117,"category_name":29,"create_tm":300},347081,"Java - Programming - Ninth Edition","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229910997878/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796114219&Signature=NVsoiRMdoOqa5g8k3Ruk6OZLX3M%3D","java-programming-ninth-edition",1790065180,{"doc_id":302,"doc_title":303,"file_type":137,"home_preview_img_url":304,"slug":305,"view_count":198,"category_name":29,"create_tm":306},423014,"THE JAVA LANGUAGE CHEAT SHEET - quick reference","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229922611453/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796114219&Signature=x9cnc91lDRpMJKFFHXi9q3JJmGs%3D","the-java-language-cheat-sheet-quick-reference",1790629749,{"doc_id":308,"doc_title":309,"file_type":137,"home_preview_img_url":310,"slug":311,"view_count":33,"category_name":29,"create_tm":312},685688,"Lecture 11 - Arrays and ArrayLists - Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000179281/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796114219&Signature=YDAMDfVIKs3Fg3%2FnArNnx64Xoa0%3D","lecture-11-arrays-and-arraylists-introduction",1794016761,{"doc_id":314,"doc_title":315,"file_type":137,"home_preview_img_url":316,"slug":317,"view_count":188,"category_name":29,"create_tm":318},347820,"Introduction to Programming Using Java - Version 5.0 - About the book version","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229911557945/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796114219&Signature=%2FyaHQRexcpW2zjhGMyiDG7%2FoUgs%3D","introduction-to-programming-using-java-version-50-about-the-book-version",1790069243,{"doc_id":320,"doc_title":321,"file_type":137,"home_preview_img_url":322,"slug":323,"view_count":30,"category_name":29,"create_tm":324},700990,"MarkLogic Server - Java Application Developer’s Guide - 9 - Reference","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011575704/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796114219&Signature=XMMdNva830yBQoXvmNizGMkx%2BwI%3D","marklogic-server-java-application-developers-guide-9-reference",1794522640,{"doc_id":326,"doc_title":327,"file_type":137,"home_preview_img_url":328,"slug":329,"view_count":208,"category_name":29,"create_tm":330},347821,"JAVA - A Beginner’s Guide to Learning the Basics of Java Programming","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229911558006/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796114219&Signature=KlEHcVEgYK52BG%2BiY0SrHvgp6U8%3D","java-a-beginners-guide-to-learning-the-basics-of-java-programming",1790069246,{"doc_id":332,"doc_title":333,"file_type":137,"home_preview_img_url":334,"slug":335,"view_count":101,"category_name":29,"create_tm":336},681819,"MotiveWave - SDK Programming Guide - Version 1.5","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229998394935/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796114219&Signature=PRyUAAWlhkzrZmQJMQ3XjOYm5ZM%3D","motivewave-sdk-programming-guide-version-15",1793954872,{"doc_id":338,"doc_title":339,"file_type":137,"home_preview_img_url":340,"slug":341,"view_count":96,"category_name":29,"create_tm":342},670905,"Java Cheat Sheet - Notes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988353128/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796114219&Signature=9zckpJtvG2SN%2FuPiNIdYMwV763U%3D","java-cheat-sheet-notes",1793572659,{"doc_id":344,"doc_title":345,"file_type":137,"home_preview_img_url":346,"slug":347,"view_count":96,"category_name":29,"create_tm":348},700987,"The definitive guide to Java agents - agent fundamentals - code instrumentation - class loading - miscellaneous","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011575691/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796114219&Signature=pH4aSqo6YBpGuXgHPX2A%2FPRpO1E%3D","the-definitive-guide-to-java-agents-agent-fundamentals-code-instrumentation-class-loading-miscellaneous",1794522632,{"doc_id":350,"doc_title":351,"file_type":137,"home_preview_img_url":352,"slug":353,"view_count":33,"category_name":29,"create_tm":354},685689,"List and ArrayList - Java Data Structure Overview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000179285/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796114219&Signature=LabihvZJN3N0kwdmvA9B%2FTBp9kM%3D","list-and-arraylist-java-data-structure-overview",1794016763]