Eclipse: view the Spring source code and eclipsespring source code.

Source: Internet
Author: User

Eclipse: view the Spring source code and eclipsespring source code.
Digress

For Spring frameworks, the point-to-point method is usually used. I have always wanted to study it in depth. I just recently saw Spring source code deep analysis, so I want to study it with my book.

 

If Maven is used

If Maven is used and debugging is required, you can directly use Eclipse to download the source code !!

For example, I want to see the Attribute. java file under spring-core.

Open directly and you will be prompted that the source file cannot be found. Right-click the Maven dependency package,

 

Compile Spring source code

If you want to view and modify the source code of Spring, you need to re-import the Spring Project and compile it!

If you download the Spring source code and import it to Eclipse, there are a lot of online searches, and the results are similar. I followed the above method to execute the import-into-eclipse.bat file under the root directory and found that the first step reported an error:

Error occurred during initialization of VMCould not reserve enough space for object heapError: Could not create the Java Virtual Machine.

Probably it is to set JVM parameters, continue Baidu...

set DEFAULT_JVM_OPTS=-Xms512m -Xmx512m -XX:MaxPermSize=256m

The same error is reported!

Finally, I found a lot of information and found a different solution: Explain

set JAVA_HOME=D:\Softs\JDKset GRADLE_OPTS=-Dgradle.user.home=D:\Softs\gradle-2.2.1set DEFAULT_JVM_OPTS=

Then, switch to the source code root directory in cmd, execute the import-into-eclipse.bat, and find that the execution is down .....

Placeholder
The problem arises again. compilation errors and many dependent files cannot be found. It may be because of the network environment that can be executed several times. So, re-execute the import-into-eclipse.bat and finally download... However, the speed is not generally slow. Take it easy !!!

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.