I have tried to create a new SpringBoot Project by using the Spring Initializr. I choose Java version (language as well), Spring Boot version and all required dependencies. Download the zip file (and unzip it), and after that I ask IDE (I use Eclipse IDE) to import this project, but my IDE does not find the project file. Below I will attach image, perhaps it will help you. If you ever met this problem, share your knowledge please)
Can you check if Maven is installed and configured correctly on the installation path in the Window -> Preferences -> Maven -> Installations tab.
Also please try if you can import the project either as a Maven project:
If not please try to import the project as a file system as below and see if it succeeds,
Related
I have a maven project in eclipse (was originally a dynamic web project, which was converted to a maven project that has the web-app arch type).
Whenever I upload the project to Github, I, of course, upload the source java and web files, pom.xml, but I also need to upload the .project, .settings, and .classpath files which are Eclipse IDE specific (right?), so that later I can import it directly using eclipse from Github. If the latter files are not uploaded, I cannot import the project later on in eclipse. After importing, I use maven with the respective pom.xml file to download the dependencies and build the war file.
Is there a way to export my project in a form independent from eclipse, i.e., something like a pure maven project? So that, later, it can be imported using e.g., say Intellij or Netbeans only using maven? Or just tell Eclipse to import a maven project from Git, rather than an Eclipse project as it is now. Is there such a thing? If so, how to create it and commit it to Github from Eclipse? Which files/directories do I (not) need?
I am very new to java.
I downloaded Netbeans 8.2 and Jdk 1.8 and installed both.
And opened one of the projects where I'm getting three import statement issue.
import org.apache.commons.fileupload;
import org.apache.commons.fileupload.disk.diskfileitrmfactory;
import org.apache.commons.fileupload.servlet.servletfileupload;
I have my got the below jar in web-inf/lib path in project
Commons-fileupload-1.2.2.jar
Commons-up-2.4.jar
Please guide me to get the project compiled. I am clueless since I have no idea about java and trying to run the project and debug .
Import your jar files the proper way.
Right click your project >
Properties >
Libraries
Then click the Add Jar/Folder button to import the jars you need.
After this, clean and build the project (Right click > Clean and Build), and try to run it.
Your setup probably has some sort of error to find out the path to those .jar files, it is common to happen when you've got the files imported in a wrong way.
I'd like to suggest to you to use Maven. Maven is a dependency manager and will be in charge to manage all your dependencies along the build of your project among all other features. It is easy to use and will make your life a lot easier.
Here you have two links, one if you'd like to understand better how it works (https://maven.apache.org/guides/getting-started/) and the another to help you to build your Maven project (https://maven.apache.org/guides/getting-started/). I don't use NetBeans IDE but it probably has support for Maven, but in case it doesn't, you could look for a plugin.
Hope it helps.
Is it possible to import a Maven JAR in a regular Java project?
If yes how to do so. I am using Eclipse Neon IDE.
Yes it is absolutely possible to import local maven repository's jar in your simple java project in eclipse.
Since maven download jars in local repository which is on your computer (in general) .So you can use those jars as you normally use downloaded jars from other location in your computer.
To know maven repository location from eclipse
Click on window->preference ->type maven in search->user setting -> you will Local Repository
as shown in below snap shot
How can I import a java web project into Eclipse IDE. in the import dialog there is only a war file upload can be selected. But I couldn't find something like import a project.
So how can I import an existing java web project. Thank You!
You can always import your project that you have made it, previously with Eclipse using the "Existing Project into Workspace" option.
It will directly load all the packages of your Dynamic web Project, related to Eclipse Folder Structure.
And if you want to import a Web Project which is may be made with using other IDE than Eclipse and if it is pure web project than use WAR import, because it is a complete way to import any web project. For this prerequisite is that when Exporting the project you have it in WAR file.
Note:- I have not worked with other IDE than Eclipse that much. So I can say that there may be others who knows how to import project created from other IDE than Eclipse.
Use New -> Java Project -> A window will open -> Uncheck Use Default Location -> Browse to the root of the project -> Finish
You can import existing projects(any type) from below location in Eclipse
File > Import > Existing Project into Workspace
Using that 'existing projects into workspace' you have already highlighted? Assuming you're talking about an existing Eclipse project, and not about a project which has only code. Otherwise you just create a new web project and you copy the source to it.
I'm new to IntelliJ. What is the best (and recommend method) for importing project into IntelliJ. Is there a maven plugin for doing this?
More specially I'm interesting in importing this project.
https://github.com/nathanmarz/storm-starter?source=c
Thanks.
UPDATE 1 - When I try to use File -> open (the m2-pom.xml file) it just opens the xml file (as shown in the screenshot below.
It looks like that project has a pom file named m2-pom.xml. You should import that as a maven project. Assuming it's using standard repositories, you'll immediately be able to compile the code with maven.
You can select Open in the menu, and then choose that file and it should load the project.
Be aware this seems to be a clojure project. You might want to research the La Clojure plugin to see how/if it can import clojure projects with it. It looks like the steps I gave will work, but the code may not run very easily for you without the La Clojure plugin.
You could either import the Maven project inside of IntelliJ (File -> Import Project...), or you could simply use the Maven IDEA plugin. All you do is execute mvn idea:idea inside of the Maven directory, and a project file will be generated. This file may be opened as a project inside of IntelliJ.
EDIT: #maba warns not to use the Maven IntelliJ plugin.