This old API is deprecated. Please use the new API instead!
Building JSyn Programs Using Borland JBuilder
Important: we strongly recommend using Eclipse instead of JBuilder. Eclipse is a great Integrated Development Environment (IDE) for Mac, Windows and Linux.
JBuilder is a Java Integrated Development Environment (IDE) from Borland. It includes a text editor, compiler, debugger, and special tools for designing AWT or Swing graphical user interfaces. These instructions are for using the JBuilder Personal Edition which is available for free download from Borland. Click here to get the free SDK.
Follow these steps to compile and run the simple TJ_Beep program included with the JSyn SDK. Let's assume the JSyn SDK was unpacked and was installed properly. We will refer to that folder as the "JSyn SDK Folder".
Create a New JBuilder Project.
- Install and register JBuilder using the key from Borland.
- Run Borland JBuilder.
- Select "New Project..." from the File menu.
- Enter a project name like "jsynWork".
- Keep hitting "Next>" button until "Finish" button appears then hit "Finish".
- Select "Add Files" from the Project menu.
- In the newer JSyn SDK Folder look in the sub folder "jsrc/mystuff". On the older SDK look in the sub folder "jsyn/usercode".
- Select the file "TJ_Beep.java" and hit "OK".
Tell JBuilder Where to Find the JSyn Classes
- Select Select "Project Properties..." from the Project menu.
- Select the "Path" tab, and the "Required Libraries" tab.
- Hit the "Add..." button.
- Select the User Home folder.
- Hit the "New..." button. A dialog will pop up.
- Set the Name to "JSyn".
- Hit the Add button.
- Find and select the file "classes\JSynClasses.jar" in the JSyn SDK Folder and hit OK.
- Hit the Add button again
- Find and select the file "classes\SoftSynthTools.jar" in the JSyn SDK Folder and hit OK.
- Hit the OK button until the small dialogs are all closed.
Compile and Run Program
- To Make and Run the program click on the first green triangle in the JBuilder toolbar at the top.
- After compilation you will be presented with a Runtime Properties Dialog. (For JBuilder7. click on the New..." button.) Click on the "..." button next to the Main Class field and select "mystuff" then "TJ_Beep". Hit "OK".
- Hit "OK".
- The TJ_Beep program will launch and you can click the Beep button to make a random tone. Note some of the notes may be too low a pitch to hear on laptop speakers.
- Click once on "TJ_Beep.java" in the left side margin to edit the file and make it more interesting.
Tips and TricksQ: I changed the name of a Java file, or a package name. Now JBuilder tells me that the package name is incorrect. How can I fix this?
A: There are at least two possible causes for this:
- Your package name must match the folder hierarchy of the Java source code. Suppose JBuilder is looking for source code in the folder "src/". Suppose you have a class called "MyThing" in the package "com.mydomain.goodstuff". The source code must then be in a file called "src/com/mydomain/goodstuff/MyThing.java".
- If the folder hierarchy is correct, then it is possible that JBulder is just confused. It keeps track of where to find various packages and that information can become corrupt. So look for a folder called "package cache" in your classes folder. It is likely to contain a bunch of files whose names correspond to your packages and that have a ".dep2" suffix. Close JBuilder then delete folder. When you restart JBuilder and compile then it will rebuild that cache.
You can quickly run any Java class that has a valid main() method by right-clicking on its name in the file browser at the left hand side of the JBuilder screen. Then select Run or Debug from the popup menu. Mac users will need a 2 or 3 button mouse for this.