Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7744869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:52:19+00:00 2026-06-01T09:52:19+00:00

I have a simple java project (adapted from the example here ), which is

  • 0

I have a simple java project (adapted from the example here), which is as follows:

import com.sun.j3d.utils.universe.SimpleUniverse;
import com.sun.j3d.utils.geometry.ColorCube;
import javax.media.j3d.BranchGroup;

public class HelloWorld {

    public HelloWorld()
    {
        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) {
        System.out.println("Hello World!");
        System.out.println("PATH : " + System.getProperty("java.library.path"));
        new HelloWorld();        
    }
}

My output is:

Hello World!
PATH : /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib
Exception in thread "main" java.lang.UnsatisfiedLinkError: no j3dcore-ogl in java.library.path
  at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
  at java.lang.Runtime.loadLibrary0(Runtime.java:840)
  at java.lang.System.loadLibrary(System.java:1047)
  at javax.media.j3d.NativePipeline$1.run(NativePipeline.java:231)
  at java.security.AccessController.doPrivileged(Native Method)
  at javax.media.j3d.NativePipeline.loadLibrary(NativePipeline.java:200)
  at javax.media.j3d.NativePipeline.loadLibraries(NativePipeline.java:157)
  at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:987)
  at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:299)
  at HelloWorld.<init>(HelloWorld.java:10)
  at HelloWorld.main(HelloWorld.java:20)

I assume this Exception indicates that the library libj3dcore-ogl.so could not be found. Here’s where it is located:

$ locate libj3dcore-ogl.so
/usr/lib/jni/libj3dcore-ogl.so

As the output above shows, /usr/lib/jni is inside java.library.path. What am I doing wrong? (I’m using Ubuntu 10.04 and Eclipse 3.7.2 – if that may be an issue?)

Java is a bit of unknown territory for me. So please be as verbose as possible on your notes/suggestions/answers.

Update 1

Apparantly it’s a 64-bit library (on a 64-bit operating system):

$ file /usr/lib/jni/libj3dcore-ogl.so
/usr/lib/jni/libj3dcore-ogl.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped

I use openjdk as runtime environment. Both java3d (libjava3d-java) and the openjdk (openjdk-6-jdk) is installed via aptitude.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:52:21+00:00Added an answer on June 1, 2026 at 9:52 am

    Interestingly, it works if I compile and run the application from my terminal:

    javac -classpath /usr/share/java/j3dcore.jar:/usr/share/java/j3dutils.jar:/usr/share/java/vecmath-1.5.2.jar:. HelloWorld.java
    java -classpath /usr/share/java/j3dcore.jar:/usr/share/java/j3dutils.jar:/usr/share/java/vecmath-1.5.2.jar:. HelloWorld
    

    But I would really like to use eclipse to do this kind of things.

    $ java -version
    java version "1.6.0_20"
    OpenJDK Runtime Environment (IcedTea6 1.9.13) (6b20-1.9.13-0ubuntu1~10.04.1)
    OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
    

    It also works with Eclipse, if I copy the native library (libj3dcore-ogl.so) to the jvm directory and add the libraries (j3dcore.jar, j3dutils.jar, vecmath-1.5.2.jar) as external jars to the build path libraries (right click on project -> Properties -> Java Build Path -> Libraries -> Add External JARs…):

    sudo cp /usr/lib/jni/libj3dcore-ogl.so /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/
    

    But I wonder if there really is no solution that wouldn’t require this copy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple java code which gets html text from the input url:
I have a Java Project in which I am writing a simple JUNIT test
I have simple java project with structure: package com.abc: a.java b.java c.properties I have
I have a fairly simple maven-ized Java project, but am having trouble getting my
I have Simple java program named MainController.java. Wehn I try to compile it from
I have a simple Java class that has some methods: public class Utils {
I have a simple Java class in which I invoke a call to a
i found many related questions here. I have a simple java program . it
I have a simple java maven project. One of my classes when executing needs
I have created simple Java Dynamic Web project in Eclipse. I host my project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.