Facing issue after importing project into eclipse - eclipse

I am downloading the source code, which is in zip form. When I unzip the folder using Peazip and import it into eclipse, I don't find any contents in the project. Please provide solution for this

You have to map the source folder to your project.
Right click on your project and click project. Add link to source folder.
Now you can see the source code of your project.

Related

STM32Cube IDE: Unable to open and build a folder as a project

I want to ask how to open a project in stm32cube IDE.
To be specific, I was given a project organized as the picture below. The name of the containing folder is Project_Comm.
While the main code is in Core folder, the linker file and the project file of STM32CubeIDE is in STM32CubeIDE folder. In this case, how can I open the project with the main code and the Linker file in the Project Explorer?
What I did so far were:
I tried to open the project by the .project and .cproject file from the folder STM32CubeIDE. It only opened the main code in Core folder (the linker file was not there) and I could not build the project.
I imported the project by File>Import>Import ac6 System Workbench for STM32 Project. Then I chose the directory containing all of the Folder in the picture above and there were 2 folders: Project_Comm, and Project_Comm./STM32CubeIDE. I chose both of them and , in other tries, each of them but nothing worked. When I chose only the Project_Comm, nothing was imported.
Thank you, Huy Nguyen.
The example is in set of examples which can be downloaded from Example Selector of STM32CubeMX.
At first, it was in Visual Code(during which I did not know I could download example).

Download ZIP file from GitHub and import in eclipse

Why every project that I download as a zip file from Github i can't import in Eclipse?
This is how I try it...
Of course, firtst I download it as a ZIP. (download it to desctop, for example)
Then, import existing project...
But then even if there is a project for sure, and special this project, it shows me warning "No projects are found for import" like this:
This is problem for every project that I try to import like this. Is there any other way to import projects or...?
(I repet this project work 100% on my friends laptop, but I can't even import it)
Make sure you have uncompress the zip archived first.
Then check the content of the folder where you uncompressed the zip file.
If there is no .project file, do create a new project in Eclipse, and point the sources to that folder, instead of trying to import it.
See "How to import a java project missing .project .settings .classpath files into eclipse".
maybe you can see the following:
you have to select the folder where the project is created.
you are sure that is a project, maybe are only the files
Pls attach the link of git to check this.
Regards.
I was trying to do the same for GitHub download project. I figured out that if this is a maven project then you will not find these .project files. So instead of using import -> Existing project to Workspace use Existing Maven Project.
I imported zip file in my STS , first of all i click on import project then click on General import some menu showed up enter image description here , then click on Projects from Folder or Archive , then choose from Archive file click finish enter image description here

Not finding libgdx projects to import them

I bought a new computer and installed Eclipse on it. After the ADT plugin finished downloading I tried to import my projects (composed of 4 sub-projects), but Eclipse doesn't see them!
I just click "import/general/import existing projects into workspace", select the folder containing the sub projects, hit the open button but Eclipse says "No projects found to import".
I'm using Eclipse Kepler and the projects files are directly taken from Eclipse Juno.
Eclipse need .project file to import the projects into workspace. what you can do is create a new project and copy the source and libraries into that project
Alternative method can be that create a new project and copy the .project file from that project to your project but make sure you edit the .project file and change the name of that project according to your project. read this for more information on .project file
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fproject_description_file.html
I will suggest you to use the First method .
Make sure that you've tried to:
Refresh everything
Searched for Nested Items
Go to (In the libg-gdx setup) Advanced >> Check Eclipse
And if that doesn't work, add a .project file into the folder manually

jar file not working for imports in Eclipse

I am following a tutorial from AndroidHive on how to login to Twitter from my app.
The tutorial uses the twitter4j library, so I download it from here and save the zip file to my desktop. In my project I drag the twitter4j zip file into my projects libs folder. Then I Refactor -> Rename the file from a zip to a jar (only changing the extension)
However, when I want to import the classes into my project, it does not seem to be working. I try to do
import twitter4j.Twitter;
But this option is not available. See screen grab.
Can anyone please tell me where I am going wrong with this?
Also, as per the tutorial I have also just added the twitter4j-core file to the project but still imports wont seem to work.
The tutorial clearly says "Download and Extract" That does not mean "Download and Rename". It means download the file and then Use a file compress/uncompress utility to extract the zipped files format. Search in the extracted files to find the relevant jar file and import that file.
1. Download & extract twitter4j library from twitter4j-android-2.2.6.zip (slimmed version for Android platform). Here is the direct link
If you uncompressed correctly then do the following
Right sure that the folder where you copied the twitter library shows up in the Lib path for the project. Right click on the project --> Select 'Properties' ---> Select 'Java Build Path' From the Left hand Menu ---> Select Libraries Tab. Review List of Libraries(expand if needed ) to see if the twitter jar files show up here.
If not Select 'Add Jar' browse to the Jar file. Add it. Refresh your project. Clean it and build. You should now be able to import twitter components.

Eclipse : How to remove the attached Source which was added to a Jar

I am using Eclipse IDE (Helios Version).
As part of the build path, I have a jar file for this Application, I have attached the source code for this jar file using Attach Source Option.
Please tell me how can I remove this attached source for the jar file?
Open the .classpath file and delete the source attachment part.
Or in the Build Path control panel, find the jar file and remove the source attachment (it is one of the detailed options there).
If you have two different projects in eclipse that are linked, the best way is to open both of them in eclipse workspace. If you do that, you don't need to "Attach Source..."
If you added the second project as a Source Attachment by mistake, you could try to remove the projects from eclipse workspace and adding them again. That worked for me.