Github Project in Eclipse is not shown as JavaProject - java

I exported my Project to Github and checked it out in eclipse. This process worked - however it seems like eclipse does not recognize my.java files as javacode. It does not try to compile anything.
I do have a .project file and a .classpath file in the repository. Why doesn't it work. //reference removed
This is how it currently looks like. I am not sure whats causing this problem, but it might be that i got the main folder as project and the actual project inside this folder (nested). How can I fix this if this is the problem?
Thank you :)

You Should not check-in .project, .classpath files and .settings folder. As eclipse will only generate these files for you.
Try deleting these files from your git repository and then again clone it , it should work.
let me know if you face any issue.

You need to commit your folder structure starting from :
/DragonsEdgeRefactored/
Since your project is already a Git repo, you can move the contents accordingly and commit the changes accordingly. I recommend using a GUI Git client like SourceTree or GitKraken.

Related

How do I build and run an existing project in Eclipse?

I would like to start the program from this repository: https://github.com/SaifurRahmanMohsin/Personal-Diary but when I dowload it and open the project in Eclipse I am not able to build/compile it. So i also can't run it.
Do I have to change run configurations or build a working set or something like that? I usually don't work with Eclipse so I am a bit overwhelmed.
screenshot eclipse1
screenshot eclipse2
Check out. Delete the files .project, .classpath, and folder .settings before you import because those hold data unrelated to your system.
File, Import, Project from existing sources
Pick the inner Personal Diary folder, not the repo folder
You will need to download two libraries to add to the classpath
JSON-Simple and Apache HTTP Client

IntelliJ - No out folder

This might be a trivial question, but i can't solve it.
I have cloned a git repository, where the "out" folder was excluded (As it's supposed to), but i can't run the code.
It gives me an error called
"Error:java: /production/nameOfProject: does not exist"
I have narrowed the problem down to something with the project structure, and i have specified my "src" folder as the source folder, but i don't know what to do about the "paths"-section. Can't i get intelliJ to create the out folders automatically?
A temporary work around is to create the project again and import the modules, and here intelliJ creates the "out" folders, and the code compiles, but that can't be the right way.
This is how my intelliJ project structure modules look, if that helps: http://imgur.com/a/uc6Fa
Thank you.
I solved this by cloning the repository, and then i choose to "create a new project from existing sources", and picked the cloned repository. intellij even discovered the src-folders itself.
you can see how to build artifacts here:
https://www.jetbrains.com/help/idea/creating-and-running-your-first-java-application.html#package
When you make some new artifacts, then go into Build -> Build Artifacts...
IntelliJ will automatically generate out files.
Maybe just create new folder called "out" in project structure and mark it as excluded.
Have you created this from intellij vcs import?

Eclipse referring old class files of Maven. Have to re-build the project everytime I make a single change

I am using Maven projects in my Eclipse workspace.
But, somehow Eclipse is referring the old .class files while running the program.
Hence, I have to re-build the complete project everytime I make any change to any java program.
I have tried executing maven commands like eclipse:clean & eclipse:eclipse.
But, they did not help.
My eclipse is also set to project - build automatically.
Is there a way I can tell Eclipse to refer to the current built .class files and not the previously built maven .class files.
Note: I am using Eclipse Mars
Thanks in advance.
I am afraid. There is no way to doing it automatically. Even if you find a way to do so. There isn't any guarantee that eclipse will build with new war.
Either you go for manual mvn clean install or use intellij idea it is very much statble. No build issue. Every time on your single save it will build new war file.
Posting answer to my question:
Sometimes the .project file of Eclipse gets corrupted. Easy solution is :
Delete the project from Eclipse.
Close Eclipse.
Go to your project's folder and delete ".settings, .project, .classpath, bin"
Open Eclipse again, and import your project once again.
This way it always works.

Automarking directories in Intellij IDEA

I have a little project that has the next structure:
I'm using Maven to build it. For some reason every time I make changes to pom.xml IntellijIDEA marks java folder as source directory and unmarks the src folder. Why it does so and how to fix or avoid it?

SVN Eclipse ignore folders for all users

I recently created new project with maven and committed on SVN server from Eclipse. Everytime i build this project SVN wants to commit also .settings, .project and some other files form target folder. I have succeeded to make SVN ignore from eclipse but it will work only for me.
How to make a "global" svn ignore that would work for all svn users? Can it be done only from svn server or it is a possibility that i can do it from my svn client?
Please suggest any working solutions :).
Best Regards.
You should use the svn:ignore property instead global configuration change. You have to edit/add the svn:ignore property to your trunk folder and should have the following content:
target
.settings
.classpath
.project
This can be done using your svn client.

Categories

Resources