Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Git Import = General Project & Can't run as java
Git Import = General Project & Can't run as java [message #1731357] Wed, 04 May 2016 15:18 Go to next message
kyle frischman is currently offline kyle frischmanFriend
Messages: 4
Registered: May 2016
Junior Member
Hello,

I am new to java & trying to learn with my friend. We created a sample on github and used egit to clone & then import.

It worked fine for him & he's able to run it as java with no configuration changes from a brand new install.

For me, it does not work because it just imports it as a general project no matter what. I have googled & searched for hours & hours but I can't figure out what is wrong.

Here is our sample on github: https://github.com/hayyyyyyyyyyy/cuddly-chainsaw

and I've attached a screenshot of my general project that will not run as java.

Also, I have re-created the project as a non-git offline java project and it works fine. Any help would be greatly appreciated.


Re: Git Import = General Project & Can't run as java [message #1731363 is a reply to message #1731357] Wed, 04 May 2016 16:10 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1063
Registered: July 2009
Senior Member
You have the Eclipse project (.project file) in the repository so
just import existing project instead of import as general project

nice github account name Wink
Re: Git Import = General Project & Can't run as java [message #1731368 is a reply to message #1731363] Wed, 04 May 2016 16:15 Go to previous messageGo to next message
kyle frischman is currently offline kyle frischmanFriend
Messages: 4
Registered: May 2016
Junior Member
Thank you! I added those files yesterday but it still does not help.

I actually have nearly no idea what I am doing. I just want this setup correctly so that we can learn github & java together. Do you know any online services that can remote into my PC and set everything up correctly?

Embarrassed
Re: Git Import = General Project & Can't run as java [message #1731372 is a reply to message #1731368] Wed, 04 May 2016 16:27 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1063
Registered: July 2009
Senior Member
The .project file you added has a strange name "org.eclipse.jdt.core.javabuilder" (it should be naming your project, which doesn't look like the JDT java builder)
and it's not a Java project, e.g. there is no javabuilder specified and you also lack the .classpath file needed to define the classpath for your project.

Best you create a fresh new Java project using the project wizard: click "New > Java Project" give it a name and then copy the resulting .project
and .classpath into your project. Note you can't open two projects with the same name in Eclipse so you have to delete the one you
used to generate a proper Java project before you can open the other one in the same workbench.
Re: Git Import = General Project & Can't run as java [message #1731373 is a reply to message #1731372] Wed, 04 May 2016 16:28 Go to previous messageGo to next message
kyle frischman is currently offline kyle frischmanFriend
Messages: 4
Registered: May 2016
Junior Member
Thanks! I'll give it a try.
Re: Git Import = General Project & Can't run as java [message #1731407 is a reply to message #1731373] Thu, 05 May 2016 02:07 Go to previous message
kyle frischman is currently offline kyle frischmanFriend
Messages: 4
Registered: May 2016
Junior Member
I created a new java project in eclipse & uploaded via the git shell, deleted it locally, then cloned/imported and it runs as java now ^_^

thanks again
Previous Topic:EGit is showing 401: Unauthorized error when pushing to TFS Git repository
Next Topic:disable 'Information Message' from egit
Goto Forum:
  


Current Time: Mon May 27 06:59:25 GMT 2019

Powered by FUDForum. Page generated in 0.02047 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top