請問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 》──┘ ◤ 唱片公司授權,音樂盡情下載
--
討論串 (同標題文章)