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 8363949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:18:51+00:00 2026-06-09T12:18:51+00:00

I am finishing up a game that I developed using Java3D. Since Java3D does

  • 0

I am finishing up a game that I developed using Java3D. Since Java3D does not come with the standard JRE, all of the people who I am giving this game to will have to download Java3D. Some of my friends are a little less computer savvy so I thought it would be a lot less work to just write the Jars to the disk and dynamically load them in Java. Is there a better solution to this? Or is dynamically loading the Jars the way to go?

I have installed Java3D on another computer of mine from here:

  • Download Java3D

It was a pretty quick installation but it would be better if you didn’t have to download anything at all. If they are only going to use Java3D for my game then it doesn’t really seem logical for them to go through the trouble of downloading it.

Are there any more efficient solutions to this? Is dynamically loading the Jars just the way to go?


EDIT

Here is my problem simplified:

  1. Java3D is not a standard part of Java, it is an extension that must be installed separately
  2. Java3D consists of 3 Jar Files (j3core.jar, j3dutils, vecmath)
  3. I want to be able to run my game on other computers without them having to download the Jar files

Now here is my simplified question:

How do I run Java3D on a computer that doesn’t have Java3D installed? I want to write the Jar files to a CD, along with the game, and be able to play the game right off the CD, no installations no downloads. How can I do this?

  • 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-09T12:18:53+00:00Added an answer on June 9, 2026 at 12:18 pm

    The jars are not platform specific, the native code in the dynamic libraries is. The dynamic libraries are already loaded as they are called for in code. If you take a look back at that code you will see that loadLibrary() does not ask for the extension. There is a reason for this, JNI (the Java Native Interface) looks for certain extensions based on what system it is running on. For this reason just package all the dynamic libraries where JNI can find it, such as right next to your application and JNI will take care of the rest.

    Some code to point you in the right direction:

    Blah.java

    public class blah{
        public native void meh();
    
        public static void main(String args[]) {
            meh();
        }
    }
    static {
        System.loadLibrary("thing");
    }
    

    Blah.cpp

    #include <jni.h>
    #include <iostream>
    #include "Blah.h"
    
    JNIEXPORT void JNICALL Java_Blah_meh() {
        cout << "Meh.";
    }
    

    Blah.cpp (with the Blah.h generated by the javah program) is compiled into a dynamic library for each major system (thing.dll, thing.dylib, thing.so). Blah.java is compiled into a .class file, toss it in a jar just for ease for execution.
    Now for the important part, the layout of files!

    ThingApp //that's a folder
      |thing.dll
      |thing.dylib
      |thing.so
      |Blah.jar
    

    Put this on any system and JNI will find the right file for the system due to the extensions, load the library into memory, execute the code, and print out “Meh.”. JNI finds the files because they are in the PATH environment variable (or the system equivalent). The PATH includes the folder the executed code/program is in, folders set with the java.library.path system property, and the folders included int he PATH variable itself.

    Basically you just need to worry about the part about the PATH as everything else is done for you!

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

Sidebar

Related Questions

I'm finishing up a website with code partially done by a freelancer that didn't
I need help finishing this statement. It is frustrating that two of the PHP
I'm TEN pages from finishing Using Drupal and I'm stuck. I turned on the
I've been asked (as part of homework) to design a Java program that does
I have a layer in my game. At finishing of game I want to
I'm finishing iCloud feature for my app and can't solve one problem: Since I'm
I am finishing up a rewrite of a project management tool using ASP.NET MVC,
I'm working on a game project and I've written some basic code that allows
While finishing a project at My Map , I discovered that the API, V2,
I'm finishing up my first web service. It stores data on a dataset that

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.