Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8589815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:08:49+00:00 2026-06-11T23:08:49+00:00

Where can I download the java native method source code? For example, I want

  • 0

Where can I download the java native method source code? For example, I want to know the source code of System.arraycopy(), but I can’t find.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T23:08:50+00:00Added an answer on June 11, 2026 at 11:08 pm

    You can download OpenJdk source code here.

    In the folder jdk\src\share you can get source code.

    jdk\src\share\native is the natice method souce write in c and c++.

    1. jdk\src\linux source for linux.
    2. jdk\src\windows source for windows.
    3. jdk\src\solaris souce for solaris.
    4. jd\src\share common source.

    eg: System.arrayCopy();

    int file hotspot\src\share\vm\oops\objArrayKlass.cpp line 168:

    void objArrayKlass::copy_array(arrayOop s, int src_pos, arrayOop d,
                               int dst_pos, int length, TRAPS) {
    assert(s->is_objArray(), "must be obj array");
    
    if (!d->is_objArray()) {
      THROW(vmSymbols::java_lang_ArrayStoreException());
    }
    
    // Check is all offsets and lengths are non negative
    if (src_pos < 0 || dst_pos < 0 || length < 0) {
      THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException());
    }
    // Check if the ranges are valid
    if  ( (((unsigned int) length + (unsigned int) src_pos) > (unsigned int) s->length())
       || (((unsigned int) length + (unsigned int) dst_pos) > (unsigned int) d->length()) )   {
      THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException());
    }
    
    // Special case. Boundary cases must be checked first
    // This allows the following call: copy_array(s, s.length(), d.length(), 0).
    // This is correct, since the position is supposed to be an 'in between point', i.e., s.length(),
    // points to the right of the last element.
    if (length==0) {
      return;
    }
    if (UseCompressedOops) {
      narrowOop* const src = objArrayOop(s)->obj_at_addr<narrowOop>(src_pos);
      narrowOop* const dst = objArrayOop(d)->obj_at_addr<narrowOop>(dst_pos);
      do_copy<narrowOop>(s, src, d, dst, length, CHECK);
    } else {
      oop* const src = objArrayOop(s)->obj_at_addr<oop>(src_pos);
      oop* const dst = objArrayOop(d)->obj_at_addr<oop>(dst_pos);
      do_copy<oop> (s, src, d, dst, length, CHECK);
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With this code I can download the file but I should know the file
is there a dictionary i can download for java? i want to have a
I know that: browsers can download two components in parallel per hostname example www.example.com
I know this the webpage to download java for linux but where i could
Does anyone know where I can download the Java communications API? On the repo1.maven.org
Can anybody help me, from where I can download LevelDB for Java-Windows because I
I'm looking for a java library that works on the android that can download
I want to ask if I can download files from the blobstore in google
Possible Duplicate: Where can I get to download Java comm api? I'm looking for
I know that I can set proxyhost and proxyport for the java application to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.