Netbeans

Setting up Java

Check whether Netbeans alias is set in your terminal. It should be defined by default.

$ alias netbeans
alias netbeans='/home/software/Netbeans/netbeans-8.1/bin/netbeans'

If the alias is not found make sure you properly setup your default settings. In that case Follow here.

Add the JDK to your environment

  • Go to newest Java SE 8 JDK here
  • Accept Licence Agreement
  • Download Java SE Development Kit for Linux x64
  • Extract to ~/.local/jdk-8u181 (apapt version number),
    e.g.:
    tar -xzf jdk-8u181-linux-x64.tar.gz
    mv jdk1.8.0_181 ~/.local/jdk1.8.0_181
  • add this command alias to your bashrc and source it. Again, adapt the version number
    echo "alias netbeans='netbeans --jdkhome ~/.local/jdk1.8.0_181'">> ~/.bashrc
    source ~/.bashrc

Setting up Netbeans to work with Java

  • Start netbeans via the terminal
$ netbeans
  • On start screen press Install Java Plugins
    or, go to Tools > Plugins in the menu bar
  • Go to Available Plugins
  • Search for Java SE and select the package
  • Press Install, and allow dependent packages to be installed.
  • Then accept the license.
  • Verify signitures (Accept)
  • Restart Netbeans (Automatically)

Create a Java Project and Import StarCCM libraries

To start working on macros, you need to create a Netbeans project.

  1. In the File-menu, press New Project…
  2. In the opened window, select a Java Application
  3. Give the Project a name, such as: StarCCM_13.02_Projects and select the folder where this project should be stored
  4. Now you should have a setup like this:

Netbeans is a fully featured IDE. It provide have error highlighting, command completion, and API information and much more. To have specific support for a StarCCM macro, you need to import StarCCM's libraries.

The first time for a given StarCCM version, you should create a library which contains references to all StarCCM libraries This is done in the following way:

  1. In your Java Application project tree, you'll find the object Libraries
  2. Open the context menu and press Add Library…
  3. In the new menu, press the button Create…
  4. Put a self describing name, such as StarCCM+ 13.02
  5. In the opening window, you need to add the StarCCM class paths by pressing Add Jar/Folder. The locations are OS and version specific!
    • For Windows, e.g.: C:\Program Files\CD-adapco\13.02.013-R8\STAR-CCM+13.02.013-R8\star\lib\java\platform\modules\ext
    • For Linux, e.g. PC-Cluster: /home/software/CD-adapco/13.02.013-R8/STAR-CCM+13.02.013-R8/star/lib/java/platform/modules/ext/
      Different releases replace the path before /star/…
  6. Press Add JAR/Folder… and add every .jar file you find in the …/star/lib/java/platform/modules/ext/ folder which are described above.
    It should look like this:
  7. To add the documentation, too. Open the tab Javadoc
    Press Add zip/folder. Again, the locations for the api doc are OS and version specific.
    • For Windows, e.g.: C:\Program Files\CD-adapco\13.02.013-R8\STAR-CCM+13.02.013-R8\doc\client
    • For Linux, e.g. PC-Cluster: /home/software/CD-adapco/13.02.013-R8/STAR-CCM+13.02.013-R8/doc/client
  8. When all are selected, press OK at the bottom, to create the Library.
  9. The StarCCM+ 13.02 Library should now be added to your project, too. Make sure the library is selected. Then press Add Library…

For new future projects, you only need to add the created StarCCM+ 13.02 Library, but don't need to add all .jar files again.

In the end, your project's libraries should now look like this:

Quick Tutorial

guide/starccm/macro-programming-workshop/netbeans.txt · Last modified: 2018/09/17 15:11 by seengel
Back to top
CC Attribution-Share Alike 3.0 Unported
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0