Creating our Extension and Entity Projects
Start by opening Netbeans. Here we will want to create 2 new Java Class Libraries.
We don't care where these projects are. I name them [GameName]Entities and [GameName]Extension.
So now you will have 3 projects, [GameName] (php), [GameName]Entities and [GameName]Extension (java). Next we need to reference a new library set. Open up the [GameName]Entities project and right-click Library and click Properties. The compile tab will start empty:
- Click Add Library...
- Click Create...
- Name it SmartFoxServer and leave it as Class Libraries type.
- Click OK.
- Click Add JAR/Folder...
- Navigate to [SFSInstallDir]
\SFS2X\lib and select sfs2x.jar and sfs2x-core.jar - Hit Add JAR/Folder to close the window.
- Hit Add JAR/Folder...
- Navigate to [OpenJPADir]
and select openjpa-all-2.0.1.jar - Hit Add JAR/Folder to close the window.
- Hit Add JAR/Folder...
- Navigate to
[OpenJPADir]\lib and select ALL .jar files - Hit Add JAR/Folder to close the window.
- Hit OK to create the library.
- Scroll through the list of Available Libraries and select SmartFoxServer
- Hit Add Library to close this window.
- Click OK to close the project properties window.
Before you close the Project Properties window for the Extension project, you will also want to click Add Project and navigate to your [GameName]Entities project and click Add Project JAR Files.
This will give you the setup you will use for your entities and extension in Smart Fox Server.
No comments:
Post a Comment