Source code file content

Revision: 2

» Project Revision History

» Checkout URL

web-content / trunk / docs / hotspot-projects / Using.html

Size: 6331 bytes, 1 line
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

        <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
        <title>Using OpenJDK HotSpot with NetBeans C/C++ Development Pack</title>
        <META NAME="AUTHOR" CONTENT="Sergey Grinev">
    <body LANG="en-US" >
        <H1>Using NetBeans C/C++ development pack to work with OpenJDK HotSpot project</H1>
            HotSpot under NB project 
            <a href=""></a>
            OpenJDK - HotSpot
            <a href=""></a>
            Since May, 2007 Sun opens almost all of the JDK under the GPL 6.5
            HotSpot part of it handles Java virtual machine sources.
            NetBeans IDE
            <a href=""></a>
            NetBeans C/C++ development pack
            <a href=""></a>
            The NetBeans C/C++ Development Pack provides C and C++ development support to 
            the NetBeans community.
            <a href=""></a>
            For compilers required to build HotSpot.
            <li>You need to have NetBeans IDE with C/C++ NetBeans development pack installed. Follow instructions <a href="">here</a> if you don't have one.</li>
            <li>Your machine have to fulfil the requirements to compile HotSpot. Usually it's enough to have linux-intel or solaris-intel machine with SunStudio installed and JDK 1.5 or later. You can find more details <a href="">here</a>.</li>
            <li> NB projects for Solaris-intel/sparc or Linux configuration </li>
            <li> Readme</li>
        <h2>Preparing sources to use with premade NB projects</h2>
            <li> Premade projects were created for HotSpot build b16 from July 20, 2007. But
            they should work for later builds as well.</li>
            <li> Download and unpack to the same folder
                    <li><a href="">HotSpot sources</a></li>
                    <li>NB+HotSpot project files</li>
            <li> Check if your HotSpot sources are writable. If not run next command on hotspot folder: <pre>chmod a+rw hotspot</pre></li>
            <li> Copy hotspot folder from preconfigured folder according to your system.<br/> 
                E.g. for solaris system you can run next command from the folder you've unpacked
                files to in step 1:<br/>
            <pre>cp -R solaris-intel/hotspot openjdk</pre></li>
            <li> You need to build HotStop if you want to have fully functional project because 
                HotSpot has a lot of generated sources. If you just want to browse sources you
                can skip this step.<br/> 
                To build HotSpot 
                    <li>go to openjdk/hotspot/build/solaris</li>
                    <li>set JAVA_HOME variable to your JDK, e.g: <pre>export JAVA_HOME=/usr/java/</pre></li>
                    <li>give execution rights to with command <pre>chmod a+x</pre></li>
                    <li>run build command according to table below where &lt;dir&gt; is absolute path to your 
                    sources of hotspot, e.g. /export/home/openjdk/hotspot.</li>
            <li> Run NetBeans IDE with set up C/C++ development pack</li>
            <li> From NB open folder openjdk/hotspot/build. Choose one of next projects:  
   | Project for | Path to projects                       | Build Command
      server       solaris_i486_compiler2/projects/hotspot jvmg &lt;dir&gt;
      client       solaris_i486_compiler1/projects/hotspot jvmg1 &lt;dir&gt;
      core         solaris_i486_core/projects/hotspot jvmgcore &lt;dir&gt;
      tiered       solaris_i486_tiered/projects/hotspot jvmgtiered &lt;dir&gt;
                <b>Makefile: Unexpected end of line</b><br>
                    Reason: you are using dmake or make by default, but HotSpot require gmake (gnumake) to handle it's Makefiles<br>
                        <li>before building HotSpot you have to run next command: <pre>export MAKE=gmake</pre></li>
                        <li>in NetBeans IDE go to "Tools/Options" -> "C/C++ Setings" and change "make command" field to "gmake"</li>
            <li><b>Build reports compilers incompatibility</b><br>
                Reason: most likely you are using last Sun compilers version 5.9 and HotSpot wants 5.8 by default<br>
                    <li>in most cases 5.9 works the same way, run next commands to force build scripts to use 5.9:
export ENFORCE_C_COMPILER_REV=5.9</pre>
                    <li>if you would experience this problem in the IDE go to "Project Properties -> Make" and add next string to 
                    "build command" and "clean command" fields: <pre>ENFORCE_COMPILER_REV=5.9 ENFORCE_C_COMPILER_REV=5.9</pre></li>

Project Features

About this Project

CND was started in November 2009, is owned by DimaZh, and has 197 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
Please Confirm