My favorites | Sign in
Project Logo
                
Search
for
Updated Nov 16, 2009 by brackeen
NetBeans  
Setup in NetBeans 6

New: Get the PulpCore NetBeans 6 Module! With the module, you don't need the instructions below.

About PulpCore Player

PulpCore Player has two main features not available in Appletviewer:

Note, PulpCore Player does not install a SecurityManager. Always test applets in web browsers, too.

NetBeans Setup

For the BubbleMark example:

  1. Click File->New Project...
  2. In the "Java" category, select "Java Project with Existing Ant Script", then click "Next >".
  3. In "Location:" click "Browse..." and select "<pulpcore path>\examples\BubbleMark".
  4. The other fields will automatically fill in. Click "Next >".
  5. The page "Build and Run Actions" is also automatically filled in. Click "Next >".
  6. In "Source Package Folders", click "Add Folder..." and select "<pulpcore path>\examples\BubbleMark\src".
  7. Click "Next >".
  8. Click "Add JAR/Folder..." and select "<pulpcore path>\build\pulpcore-applet-debug-0.10.jar".
  9. Click "Finish".

You can now use NetBeans' Build and Run actions.

Reloading Scenes

If a Scene has a public no-argument constructor, the PulpCore Player can automatically jump to that scene when the code is reloaded. To reload, in PulpCore Player click "File->Reload".

This eliminates the need to traverse through start up scenes (like the Title, Menu, and Game Scenes) just to get to later scene (like HighScoreScene) every time the code changes. The HighScoreScene can be automatically loaded - as long as it has a public no-argument constructor.

PulpCore Player can automatically reload when you click "Run" in NetBeans. (NetBeans' runs Ant in the same VM instance, unlike Eclipse). To enable this feature for all PulpCore apps:

  1. Select Tools->Options
  2. Select the "Miscellaneous" icon, then select the "Ant" tab.
  3. In the Properties box, enter (without the quotes) "pulpcore.player.wait=false".
  4. Click OK.

NetBeans Debugger Setup

If you'd like to use NetBeans' integrated debugger, follow these steps:

  1. Click File->"BubbleMark" Properties.
  2. Select the "Output" category.
  3. Click "Add JAR/Folder..." and select "<pulpcore path>\examples\BubbleMark\BubbleMark.jar".
  4. Click "OK".

The first time you run the debugger, NetBeans will ask you to edit an ide-file-targets.xml file. Copy & paste this code, which works with any PulpCore app:

<?xml version="1.0" encoding="UTF-8"?>
<project basedir=".." name="PulpCore-IDE">
    <target name="debug-nb">
        <path id="cp">
            <fileset dir="build"><include name="*.jar" /></fileset>
        </path>
        <nbjpdastart addressproperty="jpda.address" name="PulpCore" transport="dt_socket">
            <classpath refid="cp"/>
        </nbjpdastart>
        <java jar="${ant.home}/lib/ant-launcher.jar" fork="true">
            <arg value="run" />
            <jvmarg value="-Xdebug"/>
            <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
        </java>
    </target>
</project>

Comment by stencyl, Jan 26, 2008

It'd be nice to write up a small section on configuring to use the NetBeans profiler, similar to what you did for the debugger.

Comment by doug.holton, Mar 16, 2009

Here's a sample scala Netbeans project:

http://itls.usu.edu/~dholton/pulpcore/Scala-PulpCore-Netbeans.zip and how the applet looks: http://itls.usu.edu/~dholton/pulpcore/scala

It's based on a java freeform netbeans project. The changes to the build.xml include adding support for scaladoc, debugging. Not complete are profiling and testing.


Sign in to add a comment
Hosted by Google Code