I am migrating to IDEA from Eclipse and have a few Eclipse UserLibraries that I want to easily reference.
I tried adding Libraries bt Attaching Classes and Jar Directories, but it seems IDEA doesn't pick up the class files? Even after I re-compile etc.
Am I doing something wrong?
What is the best and correct way of going about this?
Libraries that you configure in this dialog should be then added to the module dependencies.
Related
I need to add an external library named ControlFX in my project. Here is the official link to download it: https://github.com/controlsfx/controlsfx
The issue is that this file is .zip type. So, I'm really confused about how can I add it as a library to my project (it doesn't include.jar files inside).
Any idea, please?
Check out How to add external library properly in Eclipse? if you want to add it manually, but it's very much not advised if you don't know what you're doing.
If you want to learn the proper way to use external resources look into how to use Maven or Gradle to incorporate libraries into your projects.
I just inherited a project I did not write so I'm trying to really learn how it works. It includes a lot of jars in the libs folder and I would like to investigate why many of them are there, or if they are necessary.
I am new to IntelliJ IDEA (although I am very familiar with Android Studio if that draws any parallels or is worth mentioning). Is there a way to check and see if a jar is used in the project, or see where its usages are? Thanks!
You can remove the jar from the classpath and see what breaks. You will very quickly find where that jar is used, and if it is necessary!
Using Android Studio, for some reason, I can no longer debug my program.
I tried a bunch of stuff and I made it worse.
To make a long story short I'd rather start from scratch and just copy the .java files and folder structure from the old project to a new project.
Is this practical?
I'm am familiar with modifying the manifest to add the various activities, which I can copy and paste from the old project.
Will this work?
I guess what I'm asking is: if I just have the .java files, what's the best way to make a project with them?
If you are using any IDE like Eclipse, just create a new java project, add the java files in the src folder. Put all the dependencies in the classpath. The project will run fine.
Simply ... Use maven. It provides you a good layout, community support, and support in a choice of IDE.
You can also use netbeans . it gives easy way to create desktop applications
Sorry if it is a stupid question, but I can't figure out how to do this...
I downloaded commons-net-3.1 from commons.apache.org and I don't know how to have it in my Java System Library or anywhere else I can use it from. I need to use org.apache.commons.io.FileUtils.
This might be overkill for what you're trying to do, but please use a dependency management system instead of managing your dependencies manually. It's a bit more setup now, but you'll reap the rewards later (and anyone else working on your project will thank you).
Take a look at maven, for example.
You need to import/add jar file to your project by browsing to downloaded/extracted binaries folder.
For example in Eclipse, right click on project -> build path -> libraries -> add external jar
Developing with IntelliJ 9.0.2 Community Edition, on the Mac.
This is a follow-up to this post about including jar files in an artifact, which has not received any replies. I'm hoping that the reason is that somehow, in creating my artifact (or setting my project settings), I unwittingly did something which people don't tend to do, and which is causing my problem, and that by asking people here to share how they create jar artifacts and set up projects, I will discover what it is.
To recap: I have a Java project which depends on two library files. I need to package up the entire thing, with the jars inlined (such that on doing jar -tfv <filename> I see ALL the classes listed, including the ones in the two libraries), into a single jar file. I can make an artifact, I can add the library files to the Output Layout pane, but I CANNOT, no matter what I do, I cannot get the "Inline Artifact" item in the context menu to be selectable (i.e. non-grey) when I right-click on one or other library file.
The thing is, making a jar which contains library files as well as the project code is NOT an unusual situation in the Java world! So I figure there are lots of IntelliJ folks out there who have done what I need to do. And I would really like to hear from you folks.
What project settings do you use? (be specific, please :-)
And exactly how do you set up your jar artifacts? (again, as many specific details as possible, please :-)
Clearly, I'd be particularly interested to hear from folks with similar setups to mine (above) who are successfully doing what I need to do.
Grateful thanks in advance, folks.
I don't think there is much you can do from inside IntelliJ, but there are several ways to do it from outside by merging the JARs.
See here: Selective jar packaging