IST Home page
IST Home Page About IST Site Map IST Contact Information
News Products Services Customers Downloads Support

X-Designer
Visaj
  -   Overview
  -   Specification
  -   Integrations
  -   Support
      *   FAQ
      *   Troubleshooting
      *   Inst & Rel Notes
      *   Changes
      *   JDK Notes
  -   Reviews
  -   Evaluation
  -   Download
Deltastream
Accessibility
XRT Widgets
INT Widgets
Motif
Product Updates
Product License
visaj SUPPORT products
side bar overview visaj logo
visaj support

Licensing/Authentication

 1

How does Visaj licensing work?

 2 Why is there a file called 'navajo.properties' stored in the root directory of my disk?

 3

What do I check when Visaj does not appear to authenticate or hangs on the splash screen?

JDK and OS Specific Issues

 1 When I use JDK1.2.x on Solaris 2.7 my X-Server crashes, how do I get around this?
 2 When I use JDK1.2 on Solaris I receive font errors, how do I fix this?
 3

When I use Visaj with JDK1.2.* on Windows NT4.0, it performs poorly. How do I get around this?

 4 When I use JDK1.2 across a network, it runs very slowly. How can I get around this?
 5 Using Solaris 2.6/2.7 with JDK1.2.x the properties sheet doesn't update correctly. How do I get around this?
 6 When using HP-UX JDK1.1.x I receive a serialization exception when trying to save
 7 Visaj hangs when trying to run on Linux using JDK1.2.2

Java Tips

 1  How do I compile the generated code from the tutorial?
 2 What is the difference between the JDK and JRE?
 3 How do I run the compiled tutorial code?
 4 How do I make a Bean?
 5

How do I run native Unix/Windows binary from within a Java application?

 6 What are the problems with mixing Swing and AWT components

Visaj Specific Tips and Questions

 1 Is there a list of available Visaj command line options?
 2 When I try to integrate Visaj with Java WorkShop 3.0.x it doesn't work, why is this?
 3 Is it possible in Visaj to select either a Unix or Windows look to the interface components?
 4 When I use JDK1.2 and save a design, and then reload that design into JDK1.1.6, the design fails to load. Why?
 5

How do I add items to a List or Choice component?

 6 If I associate an animated GIF with a component, the property sheet keeps flashing. How do I stop this?
 7 How do I create a TabbedPanel?
 8 How do I make Visaj use my System colors for Windows and text?
 9 How do I set up the Package name for my Design?
10 How do I use absolute positioning for components in Visaj?
11 Why can't I see the subcomponents of my composite component?

Other information

Back to Visaj Support page.

Licensing & Authentication


1. How does Visaj licensing work?
 

There are two types of Licensing for Visaj. These are described in the text file Licensing in the top level directory of the Visaj distribution. This file is also available in the docs directory as an html file - just point your browser at index.html in the docs directory.

The two types are:

  1. Web Licensing (usually only used for evaluations)
  2. Local Licensing

You can use web licensing from ANY machine that has an internet connection.

Local licensing involves getting a local license manager (wlmd) from the same download page from which you obtained Visaj. This would be:

http://www.visaj.com/cgi-bin/navajo-access/<reference number>/download.html

You need to then run wlmd -u on the machine you want to use as a license server. This will give you a machine identifier which you need to send to license@ist-inc.com. A line will be returned to you containing an authorization code. This line needs to be put into a license file and wlmd run with this file as a parameter.

Visaj can then be run on any machine connected to (on the same network as) your license server simply by giving Visaj the name of the license server in the License Configuration dialog.

If you have any more questions about licensing please email license@ist-inc.com. If you have any technical questions about the product or have any problems using it please email support@ist-inc.com.

   Go to top of this page

2. Why is there a file called 'navajo.properties' stored in the root directory of my disk?
 

The file 'navajo.properties' contains all the licensing details entered by the user in the Authentication dialog.
We place this file in the directory returned by the Java Virtual Machine for 'user.home'. On Windows or Unix systems where the user is 'administrator' or 'root', Java may return the root directory.

   Go to top of this page

3. What do I check when Visaj does not appear to authenticate or hangs on the splash screen?

Some problems that can occur during authentication, or starting up:

  • May be down to interactions with the JIT compiler. Try switching off the JIT compiler by specifying a command line option such as:
    • -Djava.compiler=NONE
    • -Dnojit (or some other JDK specific option usually obtained from the documentation or from the command line help options).
    • In the case of JDK1.2.2 onwards there is the possibility that you may be using the HotSpot VM, if this is the case and you are experiencing intermittent problems, try launching with the classic VM, usually with an option such as -classic (or --classic on Unix machines.)
  • Check to see if there are any exceptions being thrown or messages recorded in the visaj.log file (usually located in the user.home directory). Send the visaj.log along with your customer ID and full system configuration to support@ist-inc.com
  • If you are using JDK1.2.2 on Linux please see here.
   Go to top of this page

JDK & OS Specific Issues


1. When I use JDK1.2.x on Solaris 2.7 my X-Server crashes, how do I get around this?
This is a problem that is mentioned in the release documentation that is distributed with JDK1.2.1 onwards - Exerpt as below:

A patch that is recommended in these circumstances is referenced below:

The patch reference is : 107078-08 or later.

 

Xserver Bugs

A couple of Solaris Xserver bugs can cause crashes in some situations when using the Java 2 SDK on the Solaris 7 operating environment.

  • When using the Solaris 7 operating environment, an Xserver crash can occur when accessing TrueType or Type1 fonts. This is similar to the Xserver bug fixed by patches 105633 (SPARCTM Platform Edition) and 106248 (x86) on Solaris 2.6. A patch for Solaris 7 is forthcoming. (Solaris Xserver bug 4215548)
  • GUI applications which use dgalib on Solaris 7 (SPARC Platform Edition) can crash the Xserver. Patch 107078-07 will fix this problem. This patch is currently available only with a SunSpectrum service contract. (Solaris Xserver bug 4198669)
There is a workaround that you can use until the patches become available. Set the environment variable NO_J2D_DGA to true before running your application:

%setenv NO_J2D_DGA true

This workaround tells the Java 2D software not to use DGA to render. This will avoid the crash but will affect performance of all graphics rendering.
 Go to top of this page

2. When I use JDK1.2 on Solaris I receive font errors, how do I fix this?
This problem can be solved by installing the appropriate fonts as described in the following bug report from Sun:

http://developer.java.sun.com/developer/bugParade/bugs/4167588.html

A copy of this report can be found below:
  Bug Id 4167588
  Synopsis Solaris-x86 - Font warnings appear upon loading applets or Java2D demo
  Category general:classes_2D
  Reported Against 1.2fcs
  Release Fixed  
  State Closed, not a bug
  Submit Date Aug 19, 1998
  Description Solaris-x86 5.6 8-bit (test machine: Dino)
JDK-1.2fcs-F
/usr/local/java/jdk1.2/solaris/demo/jfc/Java2D

Steps to reproduce
1. Load Java2Demo
2. Notice the Font warnings as it loads. Example:-

Font specified in font.properties not found
[-monotype-courier new-bold-i---*-%d-*-*-m-*-iso8859-1]
  Workaround Locate the package SUNWi1of on your Solaris x86 CD and (as root) pkgadd -d . SUNWi1of
  Evaluation This error is not x86 specific, and I believe it is probably a result of picking one of the Solaris non-full install options, when the OS was installed.

The missing fonts are part of the package SUNWi1of

    % pkginfo -l SUNWi1of
    PKGINST: SUNWi1of
    NAME: ISO-8859-1 (Latin-1) Optional Fonts
    CATEGORY: system
    ARCH: i386
    VERSION: 3.6.370,REV=0.97.06.18
    BASEDIR: /usr
    VENDOR: Sun Microsystems, Inc.
    DESC: ISO-8859-1 (Latin-1) Optional Fonts
    INSTDATE: Aug 24 1998 13:38
    HOTLINE: Please contact your local service provider
    STATUS: completely installed
    FILES: 200 installed pathnames
    5 shared pathnames
    8 directories
    9820 blocks used (approx)

This package is not installed on the Solaris x86 system 'dino'
        % uname -n 
       dino
      % pkginfo -l SUNWi1of
ERROR: information for "SUNWi1of" was not found
Perhaps we shouldn't require so-called "optional" fonts, but if we do, we ought to document it in a suitable README.
   Go to top of this page

3. When I use Visaj with JDK1.2.* on Windows NT4.0, it performs poorly. How do I get around this?
 

This appears to be a problem that has been introduced with the advent of Java 2/JDK1.2+. There appear to have been a few performance issues related to graphics and font rendering in JDK1.2+/Java 2. Unfortunately some system configurations appear to be more susceptible to these effects than others. Some suggestions on how you may improve the situation are mentioned below.

  • Plus! Display Setting Options:
    There are two Display Setting options that have been found to have an impact on the performance of Visaj under these circumstances. These are listed below, and should be switched off using the appropriate check boxes.
    • Show Window Contents While Dragging
    • Smooth the Edges of Screen Fonts
  • Screen Resolution:
    It is suggested that, if at all possible, a screen resolution of around 1024x768 (or lowest convenient) should be used.
  • Colour Depth:
    Setting a colour depth of 16bit (16 Million Colours) is preferable over higher colour depth settings.
  • Alternate JDK/Swing Combination:
    An alternative would be to use a 1.1.x JDK in conjunction with a 1.1.x version of Swing with Visaj. This configuration can provide a more stable platform for creating your designs and the code generated from this Java/Swing combination should be compatible with JDK1.2/Java2.
    (Note: If you want to place beans on the palette that contain JDK1.2 specific code, this combination would not be ideal.)
   Go to top of this page

4. When I use JDK1.2 across a network, it runs very slowly. How can I get around this?
 

When attempting to run Visaj on a system using JDK1.2 across a network, a dramatic performance degradation may be encountered.

There is an option that visaj can pass to the JDK that may help with this. Visaj can be run with the following option:

  visaj -Djava2d.font.usePlatformFont=true

This still works with the current release of JDK1.2.2, but is likely to be removed in the next major release.

   Go to top of this page

5.

Using Solaris 2.6/2.7 with JDK1.2.x the properties sheet doesn't update correctly. How do I get around this?

This is a problem that is reported occasionally against Solaris 2.6, and very rarely against Solaris 2.7. This effect seems to happen more on some systems than others when using JDK1.2.x.

There is a workaround available that involves the launching of Visaj with the following option:

    -Djava2d.font.usePlatformFont=true

Please note that this work around can effect the appearance and behaviour of your fonts and the option is likely to be removed in the next major release JDK(1.3).
 Go to top of this page

6.

When using HP-UX JDK1.1.x I receive a serialization exception when trying to save.

This appears to be an interaction with the JIT compiler. Switching the JIT off using the command line option --nojit when running Visaj should solve this problem. 
 Go to top of this page

7.
Visaj hangs when trying to run on Linux using JDK1.2.2
There is a bug in both the Blackdown and Inprise versions of JDK 1.2.2 involving the setting of labels on MenuItems.

The problem occurs when "MenuItem.setLabel" is used, this in turn causes MMenuItemPeer to call "MenuItem.getShortCut()" which is NULL by default, and then goes on to call "toString()" on the returned value (NULL) - hence a NullPointerException (this should be visible in the visaj.log file).

You should be able to find this issue documented at: http://developer.java.sun.com/developer/bugParade/bugs/4234266.html

To fix the problem copy the tar archive visaj_linux_patch.tar to the root of your Visaj installation, extract it with 'tar xf' and then restart Visaj.

 Go to top of this page

Java Tips


1. How do I compile the generated code from the tutorial?
  If you have only the Java Runtime Environment (JRE) then you do not have a compiler, so, to use the Java compiler, you must obtain the full Java Development Kit (JDK), which is available for download from the Sun Java web site at the following URL:
http://www.java.sun.com/products/jdk/index.html
The Java compiler is then available via the executable command javac.

For example, using from the command prompt:

   javac MyFirstVisajApp.java

(Making sure to take note of the case sensitivity)

If you have completed the tutorial using the diamonds and demo components, you will need to make sure that you have the diamonds.jar and demos.jar file from the Visaj install\lib directory in your CLASSPATH environment variable.
   Go to top of this page

2. What is the difference between the JDK and JRE?
  The Java Development Kit contains the software and tools that you need to compile, debug, and run applets and applications that you've written using the Java programming language. The JDK TM software and documentation is free.

The Java Runtime Environment is a separate download that consists of the Java virtual machine, core classes, and supporting files. It is the runtime part of the Java Development Kit that software vendors can redistribute with their products.
   Go to top of this page

3. How do I run the compiled tutorial code?
  If the tutorial has been followed completely, you should be able to run your Java compiled application from the command prompt:

  java MyFirstVisajApp

(Note: The file MyFirstVisajApp.class should be accessible by Java e.g. be in a directory located in your CLASSPATH environment variable)
   Go to top of this page

4.  How do I make a Bean?
 

There are a number of tutorials available on the Internet on how to create your own JavaBeans. Javasoft maintains 2 short courses on Bean creation and are well worth a visit:

JavaBeans Short Course JavaBeans Course Part I JavaBeans Course Part II
JavaBeans Course Part III JavaBeans Course Part IV

Using Visaj, you could try the following:

A JavaBean itself is very simple. As long as your class follows the rules below, everything should work ok:

  1. The Class must be public. 
  2. The Class must provide a default constructor, e.g. public MyClass()

Once your class follows the above rules, packaging it is fairly simple.

One of the best ways to handle your Bean is to place it into its own .jar file.

First you must create a manifest file. Called "MANIFEST.MF" this file contains a list of all the .class files in the .jar archive. If one isn't specifically created, one is automatically generated by the "jar" command.

The manifest file must also be stored inside the "META-INF" directory. So an example directory structure would look like:
       META-INF/
           META-INF/MANIFEST.MF 
           MyClass.class 
The final touch is to create the file META-INF/MANIFEST.MF.

Inside the file, you will need the write the following:
        Name: MyClass.class
	Java-Bean: True
To package all your files into a .jar you should use the following command line:
        jar cvfm myjar.jar META-INF/MANIFEST.MF *
"cvfm" stands for "c"reate, "v"erbose, "f"ile name, name of "m"anifest file.
The parameters for "f" and "m" must be specified in the same order in which "f" and "m" are specified, e.g.
        jar cvmf META-INF/MANIFEST.MF myjar.jar *
Once finished you should now have your JavaBean.
   Go to top of this page

5. How do I run native Unix/Windows binary from within a Java application?
 

This is achieved by using the exec() method, found in class java.lang.Runtime.

A Windows example of this:

           import java.io.IOException; 

               public static void main(String []args) { 
                   try { 
                       java.lang.Runtime.getRuntime().exec("notepad.exe"); 
                       } catch (IOException e) { 
                            e.printStackTrace(); 
                       } 
               } 
           } 

A Unix example of this:

           import java.io.IOException; 

           public class RunEmacs { 
                public static void main(String []args) { 
                    try { 
                        java.lang.Runtime.getRuntime().exec("emacs"); 
                        } catch (IOException e) { 
                             e.printStackTrace(); 
                        } 
                } 
           } 
   Go to top of this page

6. 

What are the problems with mixing Swing and AWT components

There are special rules and conditions that must be observed if you are planning on mixing AWT and Swing components. For a look at some of the areas to be aware of, follow the below URL:

http://java.sun.com/products/jfc/tsc/archive/tech_topics_arch/mixing/mixing.html

 Go to top of this page

Visaj Specific Tips & Questions


1. Is there a list of available Visaj command line options?
Adding the -D<property> flag to the command line allows you to pass environment variables through to Visaj and the JVM. Passing environment variables directly to the JVM is possible through using the "--" flag.

An example of this can be seen below:
 
	visaj --classic -Dvj.useSwing=true -Djava2d.font.usePlatformFont=true 
--classic should allow you to pass the -classic flag through to the JVM - so that of you are running HotSpot (or other JIT compiler) you should be able to revert to the classic JIT.

Below is a list of the main properties that you can use with Visaj:
 
	 -Dvj.AWTPalette.file= <Path to palette file> 
   
Loads the palette file as designated in the command line at startup.
 
         -Dvj.menuFont= <Font definition> 
   
Allows you to alter the menu font.
 
         -Dvj.windowFont= <Font definition> 
   
Allows you to alter the window font
 
         -Dvj.beanDesignTime= <true/false> 
   
To set the design time flag for beans which will cause all beans to operate in design mode.
 
         -Dvj.tmpDir= <Path to temp directory> 
   
Used to define the place where Visaj compiles it's event bindings.
 
         -Dvj.convertPackages=true 
   
Allows for conversion of swing package names com.sun.java.swing.* - javax.swing.*
 
         -DDTColors 
   
Changes the colours in Visaj to the system colours.
 
         -Dvj.useSwing= <true/false> 
   
Equivalent to using the -swing option, but needs to be used for Java Workshop 2.0 integration.
 
         -Dvj.propertyEditorSearchPath= <Search Path> 
   
Used to set a search path for property editors.
 
         -Dvj.beanInfoSearchPath= <Search Path> 
   
Used to set a search path for BeanInfos.
 
        -Dvj.variablesDefaultToInstanceVars= <true/false> 
   
Controls whether beans added to design are local variables or instance variables (defaults to true).
 
        -Djava.compiler=NONE 
   
Switches off the JIT compiler (May vary between Java Versions - not a Visaj option e.g. with HPUX Java use -nojit).
   Go to top of this page

2.

When I try to integrate Visaj with Java WorkShop 3.0.x it doesn't work, why is this?

On attempting to follow the instructions for integrating Visaj with Java WorkShop 2.0 whilst using Java WorkShop 3.0.x, you will probably receive the following error:

 
        java.lang.NoClassDefFoundError: sun/jws/env/PlugInBase 
    
Visaj 2.1.4 does not have an option to be integrated with Java WorkShop 3.0, though we are now able to announce that Sun and IST are partnering to produce Visaj WorkShop for Java. This is an integration between the latest version of Visaj, with the newly developed - more open API (which will, as the product develops, offer a tighter integration than could previously be offered), and Sun's latest IDE offering Java WorkShop 3.0.2.

For further information, please visit our main web page.
 Go to top of this page

3. Is it possible in Visaj to select either a Unix or Windows look to the interface components?
  It is possible to "trick" Visaj into producing the desired look and feel by using the following command lines:

(1) For a Windows Look and Feel on, for example a Unix system:

visaj -Dos.name=Windows -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel -swing

(2) For a Motif style look on a Windows system:

visaj -Dswing.defaultlaf=com.sun.java.swing.plaf.motif.MotifLookAndFeel -swing

(Note: Substitute javax.swing.* for com.sun.java.swing.* when appropriate)
   Go to top of this page

4. When I use JDK1.2 and save a design, and then reload that design into JDK1.1.6, the design fails to load. Why?
 

This most likely cause of this problem is Fonts. When saving a design, all properties are Serialized. In JDK1.2 the structure of the Font class has drastically changed, so when loading a design which contains a JDK1.2 Font into Visaj running on JDK1.1.6, JDK1.1.6 has trouble reading the Font and prevents Visaj from loading that file.

So far the only work around we have for this, is to remove all specified fonts from your JDK1.2 design, save, and then reload using Visaj on JDK1.1.6.

We are working very hard to fix this problem. However, it is possible that other such incompatibilities exist, and, if one is found, we would greatly appreciate any information you may have. Please contact support@ist-inc.com if you find such a problem.

   Go to top of this page

5. How do I add items to a List or Choice component?
 

To add items to a List or Choice component:

  1. Highlight the component
  2. Select "Customize..." from the Object menu.

A window will appear, and you will be able to add and remove items as you wish.

   Go to top of this page

6. If I associate an animated GIF with a component, the property sheet keeps flashing. How do I stop this?
 

If you are using the Swing ImageIcon Resource or Image Resource options in the PropertySheet, there are two different fields:

  1. Design-Time file
  2. Runtime resource path

If you leave the "Design-Time file" field blank then the image will not be loaded into Visaj, but the correct code will be generated.

   Go to top of this page