Pergunta

I have a java project on netbeans (Mac OS X) that uses Java3d. On the mac version of java distribution, java3d is already included. However now I want to distribute my application as jar for other platforms. When I Clean and Build the project in netbeans it generates the dist folder as the follow:

.
├── lib
│   ├── AbsoluteLayout.jar
│   ├── jgrapht-jdk1.6.jar
│   └── swing-layout-1.0.4.jar
├── README.TXT
└── MyApp.jar

But as you can see it has not included any jar file related to java3d. How can I force Netbeans to include necessary jar files to my distribution folder?

Update:

On a second try, I downloaded java3d from Oracle website and extracted everything until I found three java3d related jars. However adding them to the project causes an error in Ubuntu when I try to run java -jar MyApp.jar:

java.lang.UnsatisfiedLinkError: no j3dcore-ogl in java.library.path

This software is targeted for several platforms and I want my users to be able to run it by simply executing the jar file without getting involved in any technical issues. How should I do that?

Foi útil?

Solução

Looks like there are native libraries involved here. This won't be easy; maybe impossible.

Netbeans won't help your users.

Perhaps you can script some setup commands to create the appropriate environment variables, then call the executable JAR.

You'll have to create different versions of the script for *nix and Windows.

You'll need to package everything in a ZIP file that arranges the artifacts as needed or write an installer to help.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top