Results 1 to 6 of 6
  1. #1
    ScottVal is offline Member
    Join Date
    Jan 2009
    Posts
    35
    Rep Power
    0

    Default Where is "javax.media.j3d"?

    Hello-
    I'm trying to compile a Java3D application under NetBeans, and I get an error on the statement:

    import javax.media.j3d;

    saying that javax.media does not exist.

    (I have installed the java 3D 1.5.1 API.)

    Can you help me?
    Thanks.
    -Scott

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Those packages are not on your classpath.

  3. #3
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    Location
    San Jose, CA, USA
    Posts
    320
    Rep Power
    5

    Default

    https://j3d-core.dev.java.net/

    Add the library to your project and/or your classpath.
    My Hobby Project: LegacyClone

  4. #4
    ScottVal is offline Member
    Join Date
    Jan 2009
    Posts
    35
    Rep Power
    0

    Default

    Thank you all for your help.

    I'm pretty good at writing java code, but it's been a while since I've explicitly dealt with the classpath.

    I'm using NetBeans.

    I assume I have to customize my configuration, and add an Argument.

    I also noticed that my installation has some Java3D jar files, in the directory C:\Program Files\Java\Java3D\1.5.1\lib\ext. (Three of them: j3dcore.jar, j3dutils.jar, vecmath.jar.)

    So I added this argument:
    -classpath "c:/Program Files/Java/Java3D/1.5.1/lib/ext/j3dcore.jar"

    But it's still not finding the package.

    Also I'm concerned that adding a classpath argument this way will invalidate the default classpath.

    Your help is appreciated.
    -scott

  5. #5
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    Location
    San Jose, CA, USA
    Posts
    320
    Rep Power
    5

    Default

    if you are using netbeans then just add the jar as a library to your project.

    Right click on your project -> Properties -> Libraries -> Add JAR/Folder -> ...
    My Hobby Project: LegacyClone

  6. #6
    gyuvaraj is offline Member
    Join Date
    Sep 2010
    Posts
    17
    Rep Power
    0

    Default

    but your solution only to current project ..... each time i create a java3d program i need to include those JAR file.... is there any global solution for this issue...

Similar Threads

  1. Java, Military Format using "/" and "%" Operator!!
    By sk8rsam77 in forum New To Java
    Replies: 11
    Last Post: 02-26-2010, 03:03 AM
  2. Replies: 2
    Last Post: 10-08-2009, 11:28 PM
  3. Replies: 2
    Last Post: 08-07-2009, 10:21 PM
  4. Replies: 2
    Last Post: 01-24-2009, 06:56 PM
  5. Replies: 1
    Last Post: 10-20-2008, 07:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •