Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

About native keyword

This is a discussion on About native keyword within the Java forums, part of the Software Development category; Can anyone please say how to use native keyword in java...

Go Back   Geeks Talk > Software Development > Java
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

Java Java related Issues and Problems

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-27-2009
Junior Member
 
Join Date: Jun 2009
Location: Andhra Pradesh, India
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Shravan Mahendra is on a distinguished road
Post native keyword in java

Can anyone please say how to use native keyword in java

Last edited by Shravan Mahendra; 06-27-2009 at 06:46 AM. Reason: no replies
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-27-2009
Junior Member
 
Join Date: Jun 2009
Location: Andhra Pradesh, India
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Shravan Mahendra is on a distinguished road
Re: About native keyword

JDK 1.0 (january 23, 1996) oak
- Initial release


JDK 1.1 (february 19, 1997)
- Retooling of the AWT event model
- Inner classes added to the language
- JavaBeans
- JDBC
- RMI


J2SE 1.2 (December 8, 1998) playground
This and subsequent releases through J2SE 5.0 were rebranded retrospectively Java 2 & version name "J2SE"
(Java 2 platform, Standard edition) replaced JDK to distinguish the base platform from
J2EE (java 2 platform, enterprise edition) and J2ME (java 2 platform, micro edition).

- Strictfp keyword
- Reflection
- Swing api integration into the core classes
- JVM equipped with a jit compiler
- Java plug-in
- Java IDL
- An IDL implementation for corba interoperability
- Collections Framework


J2SE 1.3 (may 8, 2000) kestrel
- Hotspot jvm included
- JavaSound
- JNDI included in core libraries
- Java platform debugger architecture (jpda)
- RMI was modified to support optional compatibility with corba


J2SE 1.4 (february 6, 2002) merlin
- assert keyword
- Regular expressions
- Exception chaining (allows an exception to encapsulate original lower-level exception)
- Internet protocol version 6 (IPV6) support
- Non-blocking nio (new input/output)
- Logging API
- Image i/o api for reading and writing images in formats like jpeg and png
- Integrated XML parser and XSLT processor (JAXP)
- Integrated security and cryptography extensions (JCE, JSSE, JAAS)
- Java web start


J2SE 5.0 (september 30, 2004) tiger [originally numbered 1.5]
- Generics: provides compile-time (static) type safety for collections and eliminates the need for most typecasts (type conversion).
- Metadata: also called annotations; allows language constructs such as classes and methods to be tagged with additional data, which can then be processed by metadata-aware utilities.
- Autoboxing/unboxing: automatic conversions between primitive types (such as int) and primitive wrapper classes (such as integer).
- Enumerations: the enum keyword creates a typesafe, ordered list of values (such as day.monday, day.tuesday, etc.). Previously this could only be achieved by non-typesafe constant integers or manually constructed classes (typesafe enum pattern).
- Swing: new skinnable look and feel, called synth.
- Var args: the last parameter of a method can now be declared using a type name followed by three dots (e.g. Void drawtext(string... Lines)). In the calling code any number of parameters of that type can be used and they are then placed in an array to be passed to the method, or alternatively the calling code can pass an array of that type.
- Enhanced for each loop: the for loop syntax is extended with special syntax for iterating over each member of either an array or any iterable, such as the standard collection classesfix the previously broken semantics of the java memory model, which defines how threads interact through memory.
- Automatic stub generation for rmi objects.
- Static imports concurrency utilities in package java.util.concurrent.
- Scanner class for parsing data from various input streams and buffers.
- Assertions
- StringBuilder class (in java.lang package)
- Annotations



Java SE 6 (december 11, 2006) mustang
sun replaced the name "J2SE" with java se and dropped the ".0" from the version number.
Beta versions were released in february and june 2006, leading up to a final release that occurred on december 11, 2006.
The current revision is update 14 which was released in may 2009.

- Support for older win9x versions dropped.
- Scripting lang support: Generic API for integration with scripting languages, & built-in mozilla javascript rhino integration
- Dramatic performance improvements for the core platform, and swing.
- Improved web service support through JAX-WS JDBC 4.0 support
- Java compiler API: an API allowing a java program to select and invoke a java compiler programmatically.
- Upgrade of JAXB to version 2.0: including integration of a stax parser.
- Support for pluggable annotations
- Many GUI improvements, such as integration of swingworker in the API, table sorting and filtering, and true swing double-buffering (eliminating the gray-area effect).


Java se 6 update 10
A major enhancement in terms of end-user usability.
- Java Deployment Toolkit, a set of javascript functions to ease the deployment of applets and java web start applications.
- Java Kernel, a small installer including only the most commonly used jre classes. Enhanced updater.
- Enhanced versioning and pack200 support: server-side support is no longer required.
- Java quick starter, to improve cold start-up time.
- Improved performance of java2D graphics primitives on windows, using direct3D and hardware acceleration.
- A new Swing look and feel called NIMBUS and based on synth.
- Next-generation java plug-in: applets now run in a separate process and support many features of web start applications.


Java se 6 update 12
This release includes the highly anticipated 64-bit java plug-in (for 64-bit browsers only), windows server 2008 support,
and performance improvements of java and JAVAFX applications.
Reply With Quote
  #3 (permalink)  
Old 06-27-2009
Expert Member
 
Join Date: May 2009
Location: Bangalore
Posts: 979
Thanks: 155
Thanked 417 Times in 198 Posts
rijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nice
Re: About native keyword

Hi shravan,

U can call code written in any programming language(c,c++ etc) from a program written in the java language by declaring a native java method, loading the library that contains the native code, and then calling the native method.


That means writing native methods involves importing (c,c++) code into your java application.

U can implement it by following steps.........

1)write u r java pgm & compile .

Before running the pgm.......

U have to generate a header file the native code implements the function defintions contained in the generated header file and implements the business logic as wel

2)native method declaration.

The native declaration provides the bridge to run the native function in the java virtual machine.


3)load the library the library containing the native code implementation is loaded by a call to system.loadlibrary().


4)compile the program(Dont run t pgm at this stage, that's imp.)

5)generate the header file the header file defines the interface to map the java language method to the native c ,c++ function to generate a header file, run the javah command on u r java file eg: javah -jni filename

6)Implement the native method u can do it by using....

a)map the name generated by jni to the existing c function name

b)use the shared stubs code available from the jni page on the java.sun.com web site.

7)compile the dynamic or shared object library

The library needs to be compiled as a dynamic or shared object library so it can be loaded at runtime. Static or archive libraries are compiled into an executable and cannot be loaded at runtime.

8)Run the pgm.

To run the pgm, the java virtual machine needs to be able to find the native library. To do this, set the library path..

Try these steps....

If any pblm let me know..

Thanks,
Riju.

Last edited by rijus; 06-27-2009 at 07:15 AM.
Reply With Quote
Reply

  Geeks Talk > Software Development > Java

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
AJAX Made Easy - Native JSON Implementation Lokesh M AJAX & XML 0 05-31-2009 03:10 PM
Informatica Native Driver souses Data Warehousing 0 01-07-2009 11:24 PM
IS / AS keyword in Procedure Geek_Guest Oracle 2 10-24-2007 02:30 AM
ASM keyword in C language Geek_Guest C and C++ 1 08-21-2007 02:01 AM
Explain about Assemblies, native assemblies, and the Global Assembly Cache GeekAdmin VB.NET 0 05-17-2006 11:59 PM


All times are GMT -4. The time now is 08:15 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved