• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help with these import statements

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do these import statements actually do? Do they go to Sun's site and grab the classes?

import com.sun.j3d.utils.universe.SimpleUniverse;
import com.sun.j3d.utils.geometry.ColorCube;

How can I look at the API for the SimpleUniverse and ColorCube classes?
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Adam Wilkins:
What do these import statements actually do? Do they go to Sun's site and grab the classes?

import com.sun.j3d.utils.universe.SimpleUniverse;
import com.sun.j3d.utils.geometry.ColorCube;

How can I look at the API for the SimpleUniverse and ColorCube classes?




Nope it does not... its like in c/c++ import it does not connect to the web and gets the package there.. better check the source if you package if any if there is not try going to the site where you ahve downloaded it.

Cheers!
 
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Adam Wilkins:
What do these import statements actually do? Do they go to Sun's site and grab the classes?

import com.sun.j3d.utils.universe.SimpleUniverse;
import com.sun.j3d.utils.geometry.ColorCube;

How can I look at the API for the SimpleUniverse and ColorCube classes?



Specifically these ones? Depends on the code. Maybe you can post the code?
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A google for the javadocs may also turn up something:

http://download.java.net/media/java3d/javadoc/1.4.0-latest/com/sun/j3d/utils/geometry/package-tree.html

http://download.java.net/media/java3d/javadoc/1.4.0-latest/com/sun/j3d/utils/universe/package-tree.html

But make sure they are for the version of java you are using
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Import statements don't "do" anything. They are simply declarations.

For the example "import com.sun.j3d.utils.universe.SimpleUniverse", this declares that whenever you mention the class "SimpleUniverse" in your code, perhaps by declaring a variable of that class, the compiler should assume that you actually mean the class "com.sun.j3d.utils.universe.SimpleUniverse" and not some other "SimpleUniverse" class in some other package.

Now the compiler will complain if that class is not in your classpath, I am sure you have seen that already. But your classpath is entirely composed of directories and jar files on your own computer. It doesn't contain anything elsewhere on the network.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic