inm logo
Corporate Website | Contact | Store | Support | Login  
     


Knowledgebase
View categorized listing of all common frequently asked questions.
Downloads
View our categorized library of downloads for all necessary manuals, software, etc.
 Article Options
Support Center » Knowledgebase » INM Moka Xtra for Director » Specifying the path for Java™ classes in the New() method
Support Page Banner
 Specifying the path for Java™ classes in the New() method
Product:Platform:Area:Version:
Moka Xtra for DirectorWindows, Mac OS 8 & 9
Mac OS X
Initializationall

Summary

When you call New(), to create an instance of Moka Xtra, you must specify an absolute path (or paths) to your custom classes. If you are accessing classes in a .JAR file, you must also specify the .JAR file name in the path.

The format of the path is specific to the end-user's platform:

  • On Windows, the folder delimiter is backslash ("\"), and the path separator is
    a semi-colon (";")
  • On Mac OS 8 & 9, the folder delimiter is colon (":"), and the path separator is
    a semi-colon (";")
  • On Mac OS X, you have a choice of either using the Mac OS 8/9 format, or the Unix format

The Unix format uses forward slash ("/") for the folder delimiter, and a colon (":") between paths, rather than a semi-colon. You may use this format to specify a complete absolute path. However, since Director's global variable "the moviepath", uses the Mac OS 8/9 format, you cannot use the Unix format in combination with "the moviepath".

NOTE for Mac OS 8 & 9: After changing the class path on Mac OS 8 & 9, you must restart Director (to stop the Java Virtual Machine) and then restart your project in order for the new path to be recognized. This also applied to the JClassBrowser, which uses the same instance of the JVM. For more information, view the technote entitled:
Recommended practice for working with multiple class paths

Example for Windows

Correct:
gMoka = new(xtra "MokaXtra","C:\MokaXtra\myClasses\class1\")

gMoka = new(xtra "MokaXtra",the moviepath & "myClasses\class1\" & the moviepath & ";myClasses\class2\)

gMoka = new(xtra "MokaXtra",the moviepath & "myClasses\class1\zip.jar")

Example for Mac OS 8 or 9

Correct:
gMoka = new(xtra "MokaXtra","users:MokaXtra:myClasses:class1:")

gMoka = new(xtra "MokaXtra",the moviepath & "myClasses:class1:" & the moviepath & ";myClasses:class2:")

gMoka = new(xtra "MokaXtra",the moviepath & "myClasses:class1:zip.jar"

Example for Mac OS X

Incorrect:
gMoka = new(xtra "MokaXtra", the moviepath & "myClasses/class1/")

Correct:
gMoka = new(xtra "MokaXtra", the moviepath & "myClasses:class1:")
OR
gMoka = new(xtra "MokaXtra","/volumes/Apps/myGreatMovie/myClasses/class1/")

 

 


Article Details
Article ID: 63
Created On: 26 Sep 2006 11:22 AM

 This answer was helpful  This answer was not helpful

inm general footer
Services Xtras Go Products Support Gallery Store Download About Us Contact Newsroom