Source code file content

Revision: 2

import
» 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">

<html>
    <head>
        <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">
    </head>
    <body LANG="en-US" >
        
        <H1>Using NetBeans C/C++ development pack to work with OpenJDK HotSpot project</H1>
        <p/>
        <H2>Links</H2>
        <p>
            HotSpot under NB project 
            <a href="http://cnd.netbeans.org/docs/hotspot-projects">http://cnd.netbeans.org/docs/hotspot-projects</a>
        </p><p>
            OpenJDK - HotSpot
            <a href="http://openjdk.java.net/groups/hotspot/">http://openjdk.java.net/groups/hotspot/</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.
        </p><p>
            NetBeans IDE
            <a href="http://www.netbeans.org/products/ide/">http://www.netbeans.org/products/ide/</a>
        </p><p>
            NetBeans C/C++ development pack
            <a href="http://www.netbeans.org/products/cplusplus/">http://www.netbeans.org/products/cplusplus/</a>
            The NetBeans C/C++ Development Pack provides C and C++ development support to 
            the NetBeans community.
        </p><p>
            SunStudio
            <a href="http://developers.sun.com/sunstudio/downloads/">http://developers.sun.com/sunstudio/downloads/</a>
            For compilers required to build HotSpot.
        </p>
        
        <h2>Requirements</h2>
        <ul>
            <li>You need to have NetBeans IDE with C/C++ NetBeans development pack installed. Follow instructions <a href="http://www.netbeans.org/community/releases/55/1/cnd-install.html">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="http://openjdk.java.net/groups/hotspot/faq.html#WhatElse">here</a>.</li>
        </ul>
        
        <h2>Content</h2>
        <ul>
            <li> NB projects for Solaris-intel/sparc or Linux configuration </li>
            <li> Readme</li>
        </ul>
        
        <h2>Preparing sources to use with premade NB projects</h2>
        <ol>
            <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
                <ul>
                    <li><a href="http://download.java.net/openjdk/jdk7/">HotSpot sources</a></li>
                    <li>NB+HotSpot project files</li>
                </ul>
            </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 
                <ul>
                    <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 build.sh with command <pre>chmod a+x build.sh</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>
                </ul>
            </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:  
                <pre>
   | Project for | Path to projects                       | Build Command
   ----------------------------------------------------------------------------
      server       solaris_i486_compiler2/projects/hotspot  build.sh jvmg &lt;dir&gt;
      client       solaris_i486_compiler1/projects/hotspot  build.sh jvmg1 &lt;dir&gt;
      core         solaris_i486_core/projects/hotspot       build.sh jvmgcore &lt;dir&gt;
      tiered       solaris_i486_tiered/projects/hotspot     build.sh jvmgtiered &lt;dir&gt;
                </pre>
            </li>
        </ol>
        
        <h2>Troubleshooting</h2>
        <ul>
            <li> 
                <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>
                    Solution: 
                    <ul>
                        <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>
                    </ul>                
            </li>
            <br>
            <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>
                Solution:
                <ul>
                    <li>in most cases 5.9 works the same way, run next commands to force build scripts to use 5.9:
                        <pre>
export ENFORCE_COMPILER_REV=5.9
export ENFORCE_C_COMPILER_REV=5.9</pre>
                    </li>
                    <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>
                </ul>
            </li>
        </ul>
    </body>
</html>

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
 
 
Close
loading
Please Confirm
Close