bcvtb icon indicating copy to clipboard operation
bcvtb copied to clipboard

Actor Documentation cannot be generated because ptolemy.ptII.dir is not set properly

Open cxbrooks opened this issue 9 years ago • 0 comments

Under Mac OS X, the actor documentation cannot be generated.

  1. install bcvtb-install-mac64-v1.6.0.jar
  2. In the Finder, browse to /Applications/bcvtb/bin and click on bcvtb
  3. File -> New
  4. From Actors->Sources->GenericSources, drag in a Const actor
  5. Right click and select Documentation->GetDocumentation
  6. Click on Build
  7. Click on Generate
  8. The following text appears:

//Starting Doc Building Deleting the contents of "Applications/bcvtb/lib/ptII/doc/codeDoc". When creating docs, warnings are ok.

In "Applications/bcvtb/lib/ptII", about to execute:

    javac
    -classpath
    Applications/bcvtb/lib/ptII:/Library/Java/JavaVirtualMachines/jdk1.8.0_71.jdk/Contents/Home/jre/../lib/tools.jar
    doc/doclets/PtDoclet.java

IOException: java.io.IOException: Cannot run program "javac" (in directory "Applications/bcvtb/lib/ptII"): error=2, No such file or directory

It looks like the problem has to do with the missing / in $PTII. Clicking on View -> JVM Properties, I see that ptolemy.ptII.dir is missing the leading /

ptolemy.ptII.dir = Applications/bcvtb/lib/ptII

In my ptII devel tree, I modified $PTII/ptolemy/util/StringUtilities.java so that the StringUtilities.getProperty() method returns the value of the ptolemy.ptII.dir property.

I then ran "(cd $PTII; ant jars)" and copied $PTII/ptolemy/ptsupport.jar to /Applications/bcvtb/ptII/lib/ptolemy.

It looks like java.lang.System.getProperty("ptolemy.ptII.dir") is returning the property without the leading /.

StringUtilities.getProperty(ptolemy.ptII.dir) StringUtilities.getProperty(ptolemy.ptII.dir): System.getProperty() returns Applications/bcvtb/lib/pt

So, my guess is that somewhere in the BCVTB Launcher, the leading slash is being removed.

cxbrooks avatar Apr 22 '16 17:04 cxbrooks