Trying to install JOGL for my Windows Eclipse installation and I'm picking up the error as described in the title.
This is what I did to try and install JOGL:
Downloaded jogamp-all-platforms.7z
Followed http://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL for full installation using native libraries:
Made a new directory called jogl-2.0
Copied the shown .dll files to jogl-2.0\lib
Copied the shown .jar files to jogl-2.0\jar
Copied the shown .zip files to jogl-2.0\src
In Eclipse, went to Build Path => Add Libraries... => User Library
Created a new user library, set it to system library
Add the jars from External JARs
Add the dlls by specifying the libraries for each JAR
Add javadocs from URLs
Add sources from .zips
Yet it still reckons I haven't added the libraries in to complete the installation. I also added jogl-2.0\lib to my %PATH%, but that also did nothing.
Whilst typing this question, I found the solution!
Problem was checking the box for 'system library' in the 'Add Library' dialog. This needs to remain unchecked. If anyone can tell me why, I'll be grateful.
When I unset that, it was fine, but yelled because it couldn't find a couple more JAR files.
I added these JAR files to my jogl-2.0\jar directory and it worked:
gluegen-rt-natives-windows-amd64.jar
jogl-all-natives-windows-amd64.jar
I didn't need to do anything more within Eclipse.
Related
I'm trying to make this .exe file of my eclipse project for my teacher, but every time I do it gives me errors claiming that the lwjgl libraries aren't in there. However when I exported the runnable jar from eclipse that I used to make the .exe from, I selected "Package required libraries into generated jar." I tried running the .jar through the command prompt, but it gave me these errors (click the link): https://scontent-dfw.xx.fbcdn.net/hphotos-xpt1/v/t1.0-9/11059766_1609765759310316_8110952137507721084_n.jpg?oh=af235bc0bdb7ecf1e4d875619bd20631&oe=55D1E928
I don't know why it's doing this. I need this executable by tomorrow and it's already like 10:47 PM and I'm freaking out! Could someone PLEASE help me?!?!
EDIT
I tried selecting "Extract required libraries into generated JAR" instead, but gave me "java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path"
I solved my problem! I changed the lwjgl libraries from being an external library to it being in a folder inside the project, and then I exported it with the required libraries outputed to a folder next to the jar, and then created a fat jar using JarSplicer. Now, however, I'm having this other issue that makes it unable to get image and sound resources even though (I checked with 7-zip) they are in the correct file position. I'll post another question for this other problem.
I have a Java project in Netbeans, which uses Java3d. When I distribute the jar file, it doesn't work. I tried various ways to add the files vecmath.jar, j3dutils.jar, j3dcore.jar, but they seem to be ignored. I tried to run the resulting jar on another PC with Windows XP, and I asked a friend to try it on Mac, and it didn't launch.
What I tried so far and didn't work (based on answers on the Internet, some maybe don't make sense, but I tried everything I could find):
check enable native packaging actions in project menu
distribute the dist folder, including a folder named lib generated by Netbeans, with the three Java3d jars
right click the project, Properties->Libraries, and add there the Java3d jars
right click the Libraries folder under the project, and add jar/folder
include a folder with the jars in the src folder
create a library with "Add Library..." from "Project Properties", in the "Global Libraries" folder, and added it to the project.
Nothing worked.
If I make a Windows installer with "Package as", the installation works on Windows XP (although if I doubleclick the jar, is not launched). How can I make an installer for Mac?
To resume, the questions are:
How can I distribute the Java3d jar files so that it works on other computers?
In particular, I am interested for Mac
Update
Here is the error I get when running the jar file on Windows XP:
java.lang.UnsatisfiedLinkError: no j3dcore-ogl-chk in java.library.path
I added the dll files, and it works. I have to see how I make it work on Mac.
I have created an application using the JFreeChart library for use on another machine.
Previously I have developed applications with JFreeChart (using the same libraries) which has worked fine on other machines. The only difference is this machine is running Vista.
Please see below for the run-time exception I am getting:
The class that cannot be found, however, is located in the highlighted jar in the below image showing my imported libraries for the JAR. I have also established that this JAR is included in the manifest for the application. See below image:
So I very much need this to work and have no idea where to look next - or what is causing this problem!
Development machine Java version:
1.7.0_45
Target machine Java version:
1.7.0_45
Thanks in advance.
Check the Class-Path attribute in your JAR's manifest, which should contain entries like this:
Class-Path: lib/jfreechart-1.0.17.jar lib/jcommon-1.0.21.jar …
Also, examine dist/README.TXT in your NetBeans project folder, which should say something like this regarding libraries required by your project:
To run the project from the command line, go to the dist folder and
type the following:
java -jar "CISOnlineMonitor.jar"
To distribute this project, zip up the dist folder (including the lib folder)
and distribute the ZIP file.
This has nothing to do with os i belive.You dont have all the necessery libs within your jar.Try to open a jar and see if you have them in.Fact that you are able to run it on your maschine only proves that.Make executable jar with eclipse or whathever you use.And when it ask you for libs check -Extract required libraries into generated Jar.
if you dont know how to get to that point
File>Export>Java>Runnable Jar File> Runnable JAR File Specification.
Also right click on your project and check Your build path.
RightClick project>Properties>Java Build Path>Libraries
Make sure you have everything correct
EDIT-
As i see you use NetBeans im not sure exactly how to find all this there.Bud it will be very similiar.
I did check the already answeared questions which have almost the same topic as this question but none of the answeared onces were able to solve my problem.
I have been searching now online for about 4 hours and tried soo many different things to solve my problem..
Im trying to make a Pong game in Java and now i wanted to export my project so i can send it to some friend so he can try it.
Im using LWJGL for this project so i do have some jars added to the referenced libraries, And the LWJGL.jar has the windows natives added which is included in the projects lib folder.
Here is an image of the project viewer:
Reason im posting this image is so you get an idea of that i have all the libraries inside the project aswell as the natives needed for the project to run.
While reading about why the jar didnt work i also read that you need a Manifest.mf file so i created one and inside this manifest file i have the following text:
Manifest-Version: 1.0
Main-Class: jGame.Main
Class-Path: lib/jars/asm-debug-all.jar lib/jars/jinput.jar lib/jars/lwjgl.jar lib/jars/izma.jar lib/jars/slick.jar
Also 2 empty lines underneath Class-Path since i heard u have to have that.
This project runs fine aslong as i run it in eclipse but when i export the project with either runnable jar or jar wizard in eclipse it doesn't start when i double click the .jar file so i went into the cmd and used this command:
java.exe -jar JGame.jar
And the following message was shown:
I have checked atleast 10 times that i provided the correct path for the main class.. And i dont know what to do anymore. In the eclipse wizard i have been trying both to export runnable jar and exporting normal jar but none of the two is working. Also in the wizards i have selected to export a normal jar not runnable since when i choose runnable the libraries get messed up because the lib folder gets replaced.
I tried opening the jar file as an archive and got the following:
In an attempt of using JarSplice i suceeded to solve the problem.
After reading this:
It's not going to work the way you're trying to currently do it, since you need to have the native files along side the jar and point
to them via the '-Djava.library.path' parameter.
If you just want a single jar and want to avoid the hassle of the
command line and native files use the JarSplice tool. JarSplice is
easy to use and will automatically handle the native file stuff for
you.
1) Simply export your project (class and resources) to a jar (easier
just to do it through your IDE).
2) Then run JarSplice, add all the jars you need to the jars tab (your
app jar, lwjgl.jar, and any other external jar you're using).
3)Then on the natives tab add all the natives files (windows *.dll,
linux *.so, mac *.dylib & *.jnilib).
4)On the class tab add your main class. Then create your jar.
You can then run this jar just by double clicking it (or if you wish
via command line using 'java -jar yourapp.jar').
I found this solution from this link: Can't start .jar file (using LWJGL)
Reason why it didnt work the first time were i didn't include the actual .jar file that was exported from eclipse while using JarSplice.
I want to add Selenum 2.21 libraries to Eclipse java project. I tried two methods.
One through Command line:
I have downloaded the Selenium 2.2(previously selenium RC) from their website for Java and unzipped them. When I write, java -jar (selenium-filename).jar, I am getting 'No main manifest attribute' error.
I know, the line mainclass has to be added in manifest file. There is no folder for the manifest in v2.21.
I also had Seleniumv1.03, which had the Manifest option. I added the line and a new line character, as mentioned in another post in someplace, but still I faced the issue.
two through copy/paste of jar files under JRE system library of the project:
This action is also not allowed. Cannot paste under JRE system library corresponding to the project.
Can you please tell a step by step procedure, other than refering somewhere in Sun tutorial, where they have given about java cfe (jar name) (class name) (class name.class), for defining the entry point... I had tried that too, at present...
For other reference, Java6 Update 32, I have downloaded for SDK and JRE. Firefox 12 and ie9, I am using. Eclipse Indigo IDE for Java Developers is been used.
what you have to do it download selinium jar file and save it in your project folder(Prefer if you have a lib floder)
Then right click on project in project explorer. You can find build path option. Then click on it and it will show you configure build path option. Then you can add your library in to the project. Just show the path for selinium jar file.