Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Java 3D / October 2003

Tip: Looking for answers? Try searching our database.

Which java3d version is installed locally?

Thread view: 
javamad - 21 Oct 2003 11:50 GMT
Hi there,

I am a newbie at java3d and would like to know if there is anyway of
knowing through the API or otherwise which version of java3d I have
installed on my machine.

It would be perfect if there was a class I could inquire with maybe a
getVersion() or maybe a property value, such as, System.getProperty(
"java3d.version" )?

Thanx in advance,

Fabricio.
LeW - 21 Oct 2003 15:32 GMT
good question;
I'm interested to;
what is the best way of java3d version detecting..

p.s.:
..u can determine active version of your java instaliations by typing via "command
prompt": java -version

> Hi there,
>
[quoted text clipped - 9 lines]
>
> Fabricio.
javamad - 22 Oct 2003 11:27 GMT
Hi LeW,

Found a way to do it, it depends on the fact that certain classes of
jvava3d exist only on version 1.3 and not on version 1.2 for it to work
(you can do the same with other versions too, just find out which new
classes were introduced in each).

Here's a sample code of a class that detects the presence of java3d 1.3
by searching for class javax.media.j3d.TransformInterpolator (that
exists in java3d 1.3 but not on the earlier releases)

----CODE BEGINS----
import java.io.*;

public class Threed {

 public Threed() {
   // Try to load a java3d class to see if it exists
   // class TransformInterpolator was introduced in java3d 1.3
   // so if user has java3d 1.2 it will not recognise it.
   try {
     ClassLoader loader = ClassLoader.getSystemClassLoader();
     loader.loadClass( "javax.media.j3d.TransformInterpolator" );
     System.out.println( "Java3D 1.3 is installed!" );
   }
   catch ( ClassNotFoundException e ) {
     System.out.println( "It looks like java3D 1.3 is not
installed!" );
   }
 }

 public static void main( String[] args ) {
   System.out.println( "Checking if java3D 1.3 is installed, please
wait..." );
   
   Threed t = new Threed();
 }
 
}
----CODE ENDS----

Regards,

Fabricio.

> good question;
> I'm interested to;
[quoted text clipped - 17 lines]
>>
>> Fabricio.
LeW - 22 Oct 2003 12:18 GMT
understood.
thanks.
the way of detection is not "standart/direct", but works..

..anybody has more ideas?

"javamad" <dontwantnospam@nospam.com> wrote in message
news:Xns941C7460C3576georgiaRibeiraoPreto@212.159.13.2...
> Hi LeW,
>
> Found a way to do it, it depends on the fact that certain classes of
> jvava3d exist only on version 1.3 and not on version 1.2 for it to work
> (you can do the same with other versions too, just find out which new
> classes were introduced in each).
P. Flavin - 23 Oct 2003 17:05 GMT
 Yes, you can find the version of Java3d in your machine.

 Here's the info on mine:

 Extension-Name: javax.media.j3d

 Implementation-Version: 1.3.0
 -----------------------------

 Manifest-Version: 1.0
 Specification-Title: Java 3D API Specification
 Created-By: 1.4.1 (Blackdown Java-Linux Team)
 Implementation-Title: Java 3D Core Runtime Environment
 Specification-Vendor: Sun Microsystems, Inc.
 Specification-Version: 1.3
 Implementation-Vendor-Id: com.sun
 Extension-Name: javax.media.j3d
 Implementation-Version: 1.3.0
 Implementation-Vendor: Blackdown Java-Linux & Sun Microsystems, Inc.

 I briefly looked from a run-time solution and I think
I can do it that way using either ClasLoader or Package
but I didn't try ...

 The kludgy way I got the above info was
 to unjar one of the Java3d .jar" files:

  cp $JAVA_HOME/jre/lib/ext/j3dcore.jar .
  jar xvf j3dcore.jar
  more META-INF/MANIFEST.MF

 Nasa and multiple NSF Funded projects at universities
around the country use Java3d for Web Animation
and deployed networked applications including
Nasa's Mars Rover WITS VRML 3d modeler & controller.

Nasa 3d Web Animation & Mars Robotic Rover VRML controler
----------------------------------------------------------
http://www.frontiernet.net/~imaging/Nasa_3d_animation.html

 Expanding the question to find out the
Java3d runtime environment on deployed
Java3d web applets and applications onto
machines other than your own ( so not you
but your program can know what is available )
see below.

> Hi there,
>
[quoted text clipped - 9 lines]
>
> Fabricio.

  Java enables web and network portable code
to be deployed via WebStart which installs
the multiple compomonets the program may require
and ensuring that current libaries are available
and install them if required and let the user
grant additional permissions if required and desired.

 A NSF Funded Java3d VRML Webstart Archiology program
is shown below which you can try ( DANA ).

 | The Extension Mechanism: Table of Contents
 |
 |   Creating and Using Extensions
 |
 |   Installed Extensions
 |   Download Extensions
 |   Understanding Extension Class Loading
 |
 http://java.sun.com/docs/books/tutorial/ext/TOC.html#basics

| java.lang Class Package
|
[quoted text clipped - 16 lines]
| compatible with a particular version, see the
| isCompatibleWith method for details.

 http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Package.html

| java.lang Class ClassLoader

| java.lang.Object
| java.lang.ClassLoader
[quoted text clipped - 14 lines]
| Every Class object contains a reference to the
| ClassLoader that defined it.

 http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ClassLoader.html

 Extension Mechanism Architecture
 --------------------------------
 http://java.sun.com/j2se/1.4.2/docs/guide/extensions/spec.html

java3d-Extension-Name: javax.3d
java3d-Specification-Version: 1.0
java3d-Implementation-Version: 1.2.1
java3d-Implementation-Vendor-Id: com.sun

 http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html

 Specifying Java Extensions in the applet

 To deploy Java Extensions with applets, the applet
 must be packaged as a JAR file. The MANIFEST file of
 the applet must contain proper information about the
 Java Extensions to be installed, according to the
 Extension Versioning Specification. For example,

Extension-List: RectangleArea RectanglePerimeter
RectangleArea-Extension-Name: com.mycompany.RectangleArea
RectangleArea-Specification-Version: 1.2
RectangleArea-Implementation-Version: 1.2
RectangleArea-Implementation-Vendor-Id: com.mycompany
RectangleArea-Implementation-URL: http://mycompany.com/RectangleArea.jar
RectanglePerimeter-Extension-Name: com.mycompany.RectanglePerimeter
RectanglePerimeter-Specification-Version: 1.2
RectanglePerimeter-Implementation-Version: 1.2
RectanglePerimeter-Implementation-Vendor-Id: com.mycompany
RectanglePerimeter-Implementation-URL:
    http://mycompany.com/RectanglePerimeter.jar


http://www.doc.ic.ac.uk/csg/java/1.4docs/guide/plugin/developer_guide/extensions
.html#specifying


 http://www.j3d.org/tutorials/quick_fix/auto_install.html

 http://java.sun.com/products/plugin/

 Overview

    Version 1.3 of the JavaTM 2 Platform introduced support for an
expanded set of Jar-file manifest attributes that enable applets to
specify version and vendor information for the optional packages that
they require. The manifests of Jar-packaged applets can specify a URL at
which the latest version of the optional package the Java Plug-in can
download if

        * the needed optional package is not already installed in the
Java runtime environment, or
        * the optional package is installed but has an out-of-date
version number, or
        * the optional package is installed but is not from a specified
vendor.

    The manifest attributes that can be used to specify version and
vendor information are described below.

 http://java.sun.com/j2se/1.4.2/docs/guide/extensions/versioning.html

 import java.applet.*;
 import java.awt.*;
 public class JavaVersionDisplayApplet extends Applet
 { private Label m_labVersionVendor;
   public JavaVersionDisplayApplet() //constructor
   { Color colFrameBackground = Color.pink;
     this.setBackground(colFrameBackground);
     m_labVersionVendor = new Label (" Java Version: " +
                                    System.getProperty("java.version")+
                           " from "+System.getProperty("java.vendor"));
     this.add(m_labVersionVendor);
   }
 }
 http://javatester.org/version.html

  Java3d VRML viewer with Webstart ( Dana )
  --------------------------------
  http://atl.ndsu.edu/resources/dana-3d.php
  http://testserv.archaeology.ndsu.nodak.edu/~abergstr/jnlp/dana-3d.jnlp
  http://atl.ndsu.edu/danatutorial/
  http://application.dana-wh.net/dana-wh.php
  http://atl.ndsu.edu/archive/danainfo.php
  http://atl.ndsu.edu/danatutorial/images/FIGURE7-AS-21-68-3-load3D.GIF

  CruiseViewer Ocean Exploration Console
  --------------------------------------
  http://nsdl.sdsc.edu/tools/index.html
  http://nsdl.sdsc.edu/apps/CruiseViewer_prod_20030821.jnlp

  WebStart -- single click safe web installs
  ------------------------------------------
  http://java.sun.com/products/javawebstart/demos.html
  http://java.sun.com/products/javawebstart/developers.html

 UndieWare - using Java's getProperities( ) function, demo
 ---------------------------------------------------------
 http://www.frontiernet.net/~imaging/undieware.html

 -- Paul, Java Developer & Web Animator
 --------------------------------------
 Imaging the Imagined: Modeling with Math & a Keyboard


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.