Issue when import java project - java

I got a problem when i try to import an java project to Eclipse.
The Eclipse don' build my packages, he construct a directory structure like
com
Test
Test2
Test3
-- and then my .java files
How can I do to import this project with my package ?

I think you need to add a source folder to your project.

Related

Java how to import package project into my project with IntelliJ

I have in the same folder two others folders :
aaa-ui
bbb-features
I'm using IntelliJ how can I add the package (by import) into my ui project ?

Packages imported as normal folders in Eclipse

I am trying to import a project in Eclipse. The other person working on this project uses IntelliJ.
The project is a Maven one, but when I import it using the File > Import > Existing Maven Project menu, the packages in src are displayed as normal folders, and I get errors saying that the package definition in the java files are wrong.
I tried to import the project as a normal Java project (by creating a new Java project and changing the default location), but I get the same result.
I tried to look for other .project files that might conflict with my version of Eclipse, but there is none.
I tried to delete every file related to IntelliJ, but it did not change anything.
I also tried to remove the .metadata directory of my Eclipse workspace and then import the project again, but still got the same result.
Finally, I tried to run the commands mvn eclipse:clean and mvn eclipse:eclipse but nothing changed.
There is a .classpath file in the project, so I don't see why the packages are not recognized as pasckages.
I am now out of option and completely stuck until I figure this out.

package com.mongodb.client does not exist

I am getting error in eclipse console while building application
package com.mongodb.client does not exist.
I am importing two packages :
import com.mongodb.client.AggregateIterable;
import org.bson.Document;
Download the jar files of the packages and add it to the build path of your project.
If you are using maven, add the dependency in pom.xml

Trying to import existing Perforce Project in Eclipse

I have imported Perforce Project to my local Drive and then i create workspace in Eclipse Luna, but when i try to import project using File->Import->General->Existing Projects into Workspace then i select root directory of my project. Import wizard scans whole project and then gives me the warning
No projects are found to import. I know the project that i am importing does not have any .classpath and project file. Is there any straight forward way to import the project from Local directory ?
Any help is greatly appreciated.
Import Existing Projects will only import Eclipse projects - which always have a .project file.
To import something else you will first have to create an appropriate project in Eclipse with 'File > New > Project....'. Once you have the project you can use 'File > Import > File System' to import the project files in to your new project.
If it doesn't have .classpath and project files it's not an eclipse project. Import from filesystem.

eclipse import project from tomcat webapp

i have a project in tomcat,and use startup to set up it.
i want to import it into eclipse in order to debug it,and then i try to import project like this:
it displays no project found, maybe it does not have .project file
how could i import it correctly and conviently? there are only class in web-inf,so how could copy it?
Do the following:
Create new Dymanic Web Project in Eclipse
Right click -> Import -> General -> File system, on this project.
Choose source directory.
And check Java Build Path in your project to be sure your Libraries correctly loaded.
There is no direct way to do this, however...
Perhaps, the simplest way to do this is the following:
Download Eclipse Java EE
Create a Dynamic Web project
Copy the contents of your webapp (or war) to the WebContent folder
If the project contains Java sources andyou have access to them add them (including the package structure) to the src folder.

Categories