logo

Create Interactive Applets of Precomputed Geometry Models

JavaView offers different ways to include precomputed geometry files in web pages, or to view geometries in a stand-alone applications. Different file formats are supported for import and export.

HTML

How to display geometry files in your web pages

How to include other JavaView applets in your web pages

Windows

How to use the JavaView application

How to view geometry files from Windows command line prompt

Unix

How to view geometry files from the UNIX command line prompt

How to attach the JavaView class library to your Java programs


How to display geometry files in your web pages

  1. Download the JavaView archive as described on the download page.
  2. Create your own geometry file myGeom.obj similar to sample.obj. E.g. you can save a geometry from within JavaView and use the file. See Import Formats for a list of supported file formats.
  3. Create your own HTML file myPage.html similar to sample.html, and insert the following applet tag somewhere in the body of the file:
    <applet code=javaview.class archive=jars/javaview.jar width=200 height=200>
    	<param name=Model value=sample.obj>
    	<param name=Control value=Hide>
    </applet>

    code=javaview.class

    name of class file in archive (do not change!)
    archive=jars/javaview.jar
    or

    archive=jars/javaview.jar,jars/jvx.jar
    or

    archive=jars/javaview.jar,jars/jvx.jar,jars/vgpapp.jar
    name of archive (do not change!).
    use second version to include advanced geometry effects and numerics algorithms
    use third version to include additionally a collection of projects
    width=200
    horizontal size of applet window in pixels, modify according to your needs
    height=200
    vertical size of applet window in pixels, modify according to your needs
    <param name=model value=sample.obj>
    name of geometry file to show
    <param name=control value=Hide>
    if not set or set to Show control panel will be shown

The names of the JavaView archives and the geometry file may include path information relative to the codebase of the applet.

  1. Load your web page in a browser.

Further information is described in the tutorial. It is also possible to include a panel for browsing a set of files.

How to include other JavaView applets in your web pages

  1. Follow the instructions on the download page to download the JavaView archive.
  2. Look at the HTML code of one of the applets in the JavaView demo and copy the complete applet tag into your own page.

How to use the JavaView application

The JavaView standalone application contains the full JavaView base system and all applets published on the Visual Geometry Pages.

By using the menu sequence

FILE -> NEW -> PROJECT

any project may be loaded. The application may be used to browser the disk for displaying geometry models or doing numerics like root finding or solving of differential equations. The application may also be used to view Mathematica graphics.

The application requires that Java is installed on your computer. Java Virtual Machine.

How to view geometry files from Windows command line prompt

  1. Put the batch file javaview.bat in a directory where your system is looking for executables or in the directory of your geometries.
  2. Then adapt it to your needs i.e. open it with an editor of your choice and change the value of the variable 'jv_jar' so it is pointing to the location of the archive.
  3. Hereafter you can view geometries by just typing in a dos box:
    bin\javaview.bat <geometry file>
    where <geometry file> must be replaced with the name of the geometry file you want to view (e.g. javaview sample.obj).

For experts: you might associate the file extensions .byu and .obj with javaview.bat to start JavaView whenever you double-click on a geometry file.

How to view geometry files from the UNIX command line prompt

  1. Download the JavaView archive as described on the download page.
  2. Extract it to for example: /usr/local/javaview.
  3. Optionally, create your own geometry file myGeom.obj similar to sample.obj.
  4. If the location of JavaView is not /usr/local/javaview then edit the shell script bin/javaview and set the variable CODEBASE to the directory, where you installed javaview.
  5. Next make the script file bin/javaview accessible:
    first check if the mode flags are set to executable,
    second put it in a directory thats included in your PATH variable or make there a link to it.
  6. Finally invoke it like:
    [prompt]>> bin/javaview sample.obj
    which should open a new window displaying the geometry.

How to use the JavaView class library to write own Java programs

  1. Follow the instructions on the download page to download the JavaView archive.
  2. Add the JavaView archives to your class path and follow the standard rules to import JavaView classes in your Java code.
  3. Have a look at the JavaView tutorials and the reference documentation which may be downloaded optionally.
© 1997-2017 Last modified: 22.06.2017 --- www.javaview.de --- The JavaView Project