I'm stuck on installation.
I downloaded Maven, but I'm not sure which file within
the metadata-extractor folder (that I downloaded from the repo) to use as the target.
I tried all the files at the top level.
All attempts have failed, e.g.
java -jar metadata-extractor-2.13.0.jar build.gradle
com.drew.imaging.ImageProcessingException: File format could not be determined
I am using v2.13.0 of the meta-data extractor
I've just started to code and took interest in this project but also had issues using it. Instead of using Maven i just downloaded the source code from github and threw the 'com' folder into my myproject/src folder. Then i downloaded the xmpcore-6.1.10.jar library and added it to the Build Path. Got it working that way. I hope someone will give you a better solution but if you just wanna do something right away, you can try this solution.
Try downloading IntelliJ and create a "new project from version controll". Use the URL given on the GitHub page (under download/code). That will save you a lot of problems.
Related
I have the Problem that i want to add OR-Tools into my project via eclipse IDE. I want to use the Linear Solver. I added the two jars form the downloaded Zip file. Now i want to run the SimpleLpExample from the OR-Tools site. I've got the Error that no jniortools in java.library.path. I see that at other posts they say you have to run make third_party and make java, but i don't know where i have to run these commands.
When somebody added it successfully into an IDE it would be glade when this person can explain how he does it. Thanks for help.
No. You need to add the path to the jniortools shared library I'm eclipse.
All dynamic libraries are located in the lib/ directory of the extracted archive.
To add the correct path, please follow these instructions:
I created a project but I am using an external library for it. enter link description here
I added the library to my Beans as follows:
Right click on folder "Libraries"
Add Library
Create...
Gave it a name "gson 2.7"
Picked the class, source and javadoc files.
I went on and continued programming and then I added my code to Github. Then when I cloned it my Library was missing.
How can I fix this ? How can I make it dynamic so I dont have to worry about this anymore. In other words I need to add the library to my code and not just the reference.
Thanks a lot for the help
Just upload a copy of your library to github.
I have not used netbeans, but from what I understand it adds the jar somewhere outside of your project directory, and it simply adds the location of the jar to your classpath. When you upload and then clone the project from github, the jars are not uploaded/cloned, and the project structure metadata for your project is also lost from netbeans.
My suggestion is to learn and start using a build tool like maven. It takes up the responsibility of adding your dependency libraries everytime, given that you have an internet connection. It also adds the libs to the target directory of your project folder, so you probably will need the internet connection only once. The libs will be uploaded and cloned back from the github repo everytime.
IDEs like eclipse have inbuilt support for maven, so you don't even have to worry about executing the mvn commands. Here's a tutorial that will get you intrigued - with the IDE that you prefer.
https://platform.netbeans.org/tutorials/nbm-maven-quickstart.html
Thanks a lot for all the replies and comments.
Technically there are two approaches to my problem. For this articular example I chose to copy the external jar files to my project.
1. Copy jar files to your project.
Go to project properties
Under Libraries folder make sure to set up a libraries folder by following the steps.
Add Library at the bottom ( you can create or import; since I already had gson in Netbeans I just imported it.)
Press ok to confirm and you are done!
2. Use Maven
Go to plugings and make sure you have all Maven plugins installed, if not do so.
Create an new project and choose maven/java application
Follow the prompts
At this point you can start coding (in my case I just imported my class files from the other project)
Right click in "Dependencies folder and then "Add Dependency"
Under query type the repository you are looking for; in my case "com.google.code.gson : gson : 2.7"
Click add and you are done!
Thanks a lot to everyone for the help :)
I'm trying to use the library "selenium-server-standalone-2.37.0.jar" in a project. The project was previously using "selenium-server-standalone-2.24.1.jar", but I think that is too out of date for my current version of Chrome.
When I tried to switch out the old jar for the new jar, though, I started getting the Eclipse error:
Description Resource Path Location Type
Archive for required library: 'mypath/lib/selenium-server-standalone-2.37.0.jar' in project 'BookProject' cannot be read or is not a valid ZIP file BookProject Build path Build Path Problem
So I tried unpacking the jar with 7-zip, but in there I got the error:
Can not open file 'mypath/selenium-server-standalone-2.37.0.jar' as archive
Is this jar actually broken, or is there something I'm missing here? If this one isn't working, does anyone know where I could find the previous version? I couldn't find that anywhere.
If you are unable to open the jar even using 7-zip, then it's corrupt.
I'd recommend re-downloading it. Furthermore, when using eclipse, it might be a good idea to clear your dependency cache when upgrading things.. that usually solves things.
Edit
I suppose that it could be possible that the jar itself is just corrupt. If that's the case, try going to https://code.google.com/p/selenium/downloads/list and where it says "Search: Current Downloads" Select "Deprecated Downloads"
I still use
https://code.google.com/p/selenium/downloads/detail?name=selenium-server-standalone-2.35.0.jar
I think Eclipse is trying to make me miserable. A couple of hours ago, my project was working and compiling well. Suddenly that all changed. Eclipse somehow wipes out all changes I have made to my files(activity, manifest etc.) I make sure to save often but when I go to run the project, I get the error that I have a build error. I checked and there was none, so I go to close Eclipse, so I can reopen and see if the errors will go away. Instead what happens is Eclipse wipes clean all my files and I end up with a project on disk with lots of blank code files. I try to run anyway, and I get the error message below.
Failed to read the project description file (.project) for 'com.example.android.nfc.simulator.FakeTagsActivity.FakeTagsActivity'. The file has been changed on disk, and it now contains invalid information. The project will not function properly until the description file is restored to a valid state.
Anyone have an idea what in the world this is about and how I can rectify this?
I would recommend to wipe out all the eclipse related configuration files(make sure you take the backup if you have manually made some changes in those) and import the project again, by following
File -> Import... -> Existing Project into Workspace
Make sure you take the backup of whole project before doing this.
When Eclipse gets stuck in some obscure status, I usually find useful to recreate the .metadata folder in workspace directory. It is a drastic solution, but it usually works for me. After that you can reimport all your projects.
This happened to me because I had a conflict in my .project file. I opened it up in a text editor and fixed the conflict (in my case, removed from ====... to >>>branch..., as well as <<<HEAD) and then I was able to open the project in eclipse.
I was just encountering this same issue (using Zend Studio 12, which is built on Eclipse). My problem was that I was creating a project from a Remote Server, and I was just downloading everything, which also included the .project file from the old project. It wasn't showing this error until I'd closed the program and tried to open it again (which usually wasn't until the next day).
I seem to have resolved it by making sure not to download the .project when initializing the project.
If the .project file is a text file, so if you have it in version control you might want to copy it over from there.
Before you trying the following make a backup of your current project state.
Assuming you don't have an old copy, you can open it in a text editor and try to see if there is something obvious wrong.
If this fails, copy the source files of your project to a fresh location (without the eclipse configuration files) and import it as a new project into eclipse.
if you still have all of your other source (.java files, AndroidManifest.xml, resources), you might be able to get your project back by simply going to the folder containing the project, removing the .project file that you say is now empty, and then using the new project wizard to recreate the project (and .project file) for you from your existing tree of source.
from the menus, select File -> New... -> Project , and then, in the first dialog, choose Android Project from Existing Code .
if you had done anything special to the .project (reliance on specific .jar files or changes to classpath), you may have to re-do these steps after you re-create your project; but at least it should pick up the code you already have.
If all the files are empty, and you have no working Backup, I can't help. I would recommend to use proper version control in the future.
Use git or mercurial, they have nice UI integrations (see tortoisegit/tortoisehg).
To decouple the build process and library management from eclipse, take a look at maven or gradle, this might help you in future projects.
If you use git, complete the merge e.g. del the head in your androidmanifest.
I also got the Same Issue in Eclipse but the real problem is i removed the actual Source project folder from source location (from which eclipse is trying to take the project) to some other place hence my eclipse is unable to get web.xml file since it is not available. Now i changed my source project folder location to the path where eclipse is trying to search for. Issue Resolved for me.
Just delete the 'servers' folder in your workspace and try again.
I have a project that uses servlet-api.jar. When debugging, I wanted to step
into its classes (such as HttpServlet), but I got "Source not found attach source ".
Is there a way to get the source like all the Java sources? It would be good to have so I would be able to debug it and to step into the code.
You can get apache source code from the apache tomcat website: http://tomcat.apache.org/index.html
The Servlet API JAR is just interfaces (along with a few minor utility classes); there's nothing to step into.
Depending on your app-server, you can download source for implementation classes like HttpRequest (for Tomcat, instructions are here). However, why do you feel there would be value stepping into those classes? They generally work well, and any problems are almost certainly in your own code.
In addition if you are in eclipse or netbeans, and are using maven based project right click on the dependencies and download sources for your particular dependency.
You can get the source from java2s.com
(version 3.0 of the servlet API): http://www.java2s.com/Code/Jar/s/Downloadservletapi3020100224sourcesjar.htm
(or the older version 2)
http://www.java2s.com/Code/Jar/s/Downloadservletapi256114sourcesjar.htm
In fact java2s.com is a huge java source, program & jars resource.
Intellij IDEA
Download source codes from Apache, put somewhere at some stable place in your computer.
Try to go into some .jar function until "decompiled" result shows.
Click "Choose sources".
Select downloaded source codes and IDEA will do the rest :)
To checkout the Javadoc on the classes or methods of "servlet-api.jar",
visit
http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.27/src/
(for other versions of tomcat visit -
http://archive.apache.org/dist/tomcat/tomcat-8/
and navigate to their "src" directory,
and download zip file for Windows(tar for Linux.) and finally
attach it within the IDE(Netbeans, Eclipse, etc.)
When you download the binary distribution of the apache tomcat, you can also download the corresponding source code distribution(on the same page).
Simply download the source code distribution zip.
move it to somewhere inside tomcat apache folder
Point to source code distribution zip when Eclipse asks you for the source code attachment.