Using Pulpcore properly in your own project!

Posted by samson on May 28, 2010 in PulpCore |

Proper coding practises dictates that we classify our code according to the nature and function of the class, making it as descriptive as possible. However, using Pulpcore Module for Netbeans, we cannot do that.

By default, we are prompted for a new project name, which is used only as the directory name, while the rest of the generated files are simply copied over and dump into the directory. When starting a new Pulpcore full project, we will be presented with the following listing for files.

After you have converted the pulpcore libaries to the latest release, you are still stuck with a group of files that would compiled to display ‘Hello World’, with a program title called ‘Hello World’ and a class called ‘Hello World’!

My method of changing this with little to no headaches is using Netbean’s refractor.

The following window will then pop up, change the class name to whatever you want.

Remember to check ‘Apply Renmae on comments’ as that will make your JavaDoc making more sense should you refer to the class that you are changing name for.

Now, if you attempt a build, it will actually compile. However, if you launch it, the player will state that it can’t find the class ‘HelloWorld.jar’. So to fix that we have a few more steps to take.

Next, navigate to and change the two ‘HelloWorld’ to ‘MovingText’ or whatever you name your former ‘HelloWorld’ class.

Then, let’s navigate to and change all the ‘HelloWorld’ to ‘MovingText’ or whatever you name your former ‘HelloWorld’ class.

Lastly, navigate to your Netbean’s project folder and find a file called ‘build.properties’, open it notepad or other simple text editor. Replace all ‘HelloWorld’ with the new name of the class file.

Now, you can go back to NetBeans and have the system ‘Clean and build’ again. All files in the ‘build’ folder will now be regenerated and linked properly to launch ‘MovingText’ instead of ‘HelloWorld’

Tags: , , ,

Reply

Copyright © 2012 Pleasant Lifestyle All rights reserved. Theme by Laptop Geek.