Discussion:
Java 3D 的install小問題?
(时间太久无法回复)
Jojoba
2006-12-16 04:13:22 UTC
Permalink
請問Java 3D 安裝的問題?

我下載JDK 1.5 及Java-3d-1-3-2 安裝順利(我用的是WIN Me 不能用 Java 3d 1.4)
Javac 以下的程式Hello3d.java
-------------------------------
import com.sun.j3d.utils.universe.SimpleUniverse;
import com.sun.j3d.utils.geometry.ColorCube;
import com.sun.j3d.utils.geometry.Sphere;
import javax.media.j3d.BranchGroup;

public class Hello3d {

public Hello3d()
{
SimpleUniverse universe = new SimpleUniverse();
BranchGroup group = new BranchGroup();
group.addChild(new ColorCube(0.3));
universe.getViewingPlatform().setNominalViewingTransform();
universe.addBranchGraph(group);
}

public static void main( String[] args ) {
new Hello3d();
}
} // end of class Hello3d
-------------------------------
出現以下的訊息.....
Hello3d.java:1: package com.sun.j3d.utils.universe does not exist
import com.sun.j3d.utils.universe.SimpleUniverse;
^
Hello3d.java:2: package com.sun.j3d.utils.geometry does not exist
import com.sun.j3d.utils.geometry.ColorCube;
^
Hello3d.java:3: package com.sun.j3d.utils.geometry does not exist
import com.sun.j3d.utils.geometry.Sphere;
^
Hello3d.java:4: package javax.media.j3d does not exist
import javax.media.j3d.BranchGroup;
^
Hello3d.java:10: cannot find symbol
symbol : class SimpleUniverse
location: class Hello3d
SimpleUniverse universe = new SimpleUniverse();
^
Hello3d.java:10: cannot find symbol
symbol : class SimpleUniverse
location: class Hello3d
SimpleUniverse universe = new SimpleUniverse();
^
Hello3d.java:11: cannot find symbol
symbol : class BranchGroup
location: class Hello3d
BranchGroup group = new BranchGroup();
^
Hello3d.java:11: cannot find symbol
symbol : class BranchGroup
location: class Hello3d
BranchGroup group = new BranchGroup();
^
Hello3d.java:12: cannot find symbol
symbol : class ColorCube
location: class Hello3d
group.addChild(new ColorCube(0.3));
^
9 errors

我想是沒下載到 com.sun.j3d.utils.universe.SimpleUniverse 的檔案吧
可是這些檔要去那裡找?
--
┌─────◆KKCITY◆─────┐ ◢ ◤ 找歌最方便 KKBOX 歌詞搜尋!!
│ bbs.kkcity.com.tw │ \^_^ /  ★http://www.kkbox.com.tw★
└──《From:124.8.30.74 》──┘   ◤ 唱片公司授權,音樂盡情下載
--
Jojoba
2006-12-16 23:51:35 UTC
Permalink
很仔細的把以下的動作重做一次, 發現可以run Java 3D 了
* Unzip or untar the Java3D download

* There will be another zip/tar-gz file included named j3d-132-platform.zip

* Change into your JDK/JRE installation directory, for example c:\j2sdk1.5.0\.

* Extract the contents of the zip/jar file here, making sure to keep the directories.

* Check that in your bin directory you have 2 DLLs named j3d-ogl.dll, j3d-utils.dll (unix equivalents are libj3dcore-ogl.so, libj3dutils.so). On MS-Windows you'll have a 3rd DLL j3d-d3d.dll. In your lib/ext directory you should have three files j3
dcore.jar, j3dutils.jar, vecmath.jar
--
┌─────◆KKCITY◆─────┐ ◢ ◤  ★ 線上音樂新震撼 ★ ◢ ◤
│ bbs.kkcity.com.tw │ ^_^ /  隨選隨播免等待  KKBOX◤  ^_^ / 
└──《From:124.8.5.55 》──┘    ◤ http://www.kkbox.com.tw   ◤
--

继续阅读narkive:
Loading...