Reprint: Debugging OpenJDK 8 with NetBeans on Ubuntu

Source: Internet
Author: User
Tags using git netbeans

Original address: Https://

The overview is as follows:

1 is of course download openjdk. I chose jdk8u, which is the mainstream version of the current major companies, in addition Jdk9 and JDK10 directory structure compared with the traditional directory structure has changed, from the existing data to find the relevant code will increase the difficulty. Two ways to download:

1) HG clone (Note the period of the current directory behind this code), and then execute the downloaded script after this step is completed.

2) Download the full source code from HTTPS://GITHUB.COM/DMLLOYD/OPENJDK using Git or other means.

2 Download the dependencies to be used to compile the source code.

   sudo apt install   libx11-dev   libxext-dev   libxrender-dev    libxtst-dev   libxt-dev     libcups2-dev     libfreetype6-dev      libasound2-dev


$ cd openjdk-jdk8u/

$ chmod +x ./configure

5 Running our Java program
0) Prepare a Helloworld.class file
1) $ ./build/linux-x86_64-normal-server-slowdebug/jdk/bin/java   -cp "/home/me/dev/java/helloWorld/"   HelloWorld (第一个参数是你上步编译出的java可执行程序,第二个参数是classpath,这里指向你放class文件的目录,第三个是含有main方法的类名。

     Hello, world!(这是输出)

6 run and debug our openjdk with NetBeans. If you want to do this, you can omit the 3,4,5 step.
1) Download NetBeans from the official website and request support for C + +.
2) Create a new C + + project and import from the existing source.
3) Configure and run the Configure script.
4) When the configuration is complete, the project automatically runs make.
5) Specify executable Java programs such as 5.1 when the build is complete.
6) Set a breakpoint in the source code and click on the Debug button (if there is a signal interrupt pop-up box, select "No longer receive this signal" and "go forward.")
These steps are relatively brief, because the citation author has been very careful to give. It is no longer a reason.
7 plus the location of the breakpoint.
Refer to this blog post.

Reprint: Debugging OpenJDK 8 with NetBeans on Ubuntu

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: 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.