#Can't share Java - libGDX project on Github
141 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @modern meteor! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
@urban pendant Now, after a lot of trying, I can get the project up on github, and the git repository looks fine, but the -core and -desktop files are messed up, i can only see an empty package in each of them and the git repository one looks fine but sais that it's unable to find an ant to run it.
Can you show what exactly it looks like?
yes
maybe try reimporting the projects?
I can do that, but I have to say that I also did this over 20 times today
I will send photos with the steps here
maybe select the src.gdx.game and refresh it
I already removed it
here, I am sending a photo
in which you can see a new imported Gradle Project with libGDX that is running and working and down you can see an empty new git repository
Empty cause I did not share the Project to the new git repository
Should I go to my project -> Team -> Share to my git repository ?
the path you censored here - is it the actual path to your project?
you mean Team>Share project?
no, it's a different path, I keep projects and git stuff in different folders
Yes, I am asking it this is the next step once I have my project and my new git rep
First delete the repository from the Git Repositories view (and make a backup of your files before that, just to be sure)
Done
then add it again using Team>Share Project
from the package explorer
and tell me what happens next
Now check the Git Staging view again
Yeah, you can commit from that view
although you probably don't have a remote set up so pushing would likely not work (yet)
You can create a remote from the Git Repositories tab
Oh, ok, I did it
Should I check it it's up on github ?
I do not know why but there is nothing on git
and there is nothing on git Staging either and the git rep is still intact
Before I get it up on github
I want to say that
I can't run the java file in my git rep
Since I Shared the project to git rep, the file can't run anymore
When I run it, I get this error:
Error: Could not find or load main class gdx.game.DesktopLauncher
Caused by: java.lang.ClassNotFoundException: gdx.game.DesktopLauncher
?
it should be there once you pushed it
How are you running it?
It is, i am tired, i clicked on another git rep link
well.... on DesktopLauncher I click on green icon that sais " Run DesktopLaucnher"
Can you try right-clicking on your Java file and selecting Run As>Java application?
not showing that option
and in package explorer there is nothing in src anymore
Which OS are you using?
windows 10
seems like Windows as I saw a \ in the paths you censored
yeah
so try clicking on the gdx package in src
and then pressing Ctrl+Alt+T
this should open your terminal
in git rep or package
it did
If you enter the command dir, it should display files in that package
What does it show you?
unfortunately... same
I have git bash on my pc if that helps
and I can open it in the scr folder or where you want it
You don't have to use Eclipse for opening your terminal
you just need to get a terminal (or explorer works as well) in the project directory
oh, ok,ok
yes, i do have one file there
oh, no
I went with system explorer
and this is what it shows me
Are these different desktop directories?
yes, the first one is in git rep and the second one is where the project was originally located
Which of them is where you have your Eclipse project?
my eclipse project is in the last photo
in that dialog, did you select the checkbox?
Oh, yes, and it did not let me push to git, give me 1 minute and I can do it again
if you want
like, all of them or just src
the Java files, maybe images and other important files that are missing
I do not have the copy option, I can import it
yes, i did it
If you add a file in the source folder, does it appear in the Git Staging view?
no, no changes there
ok, now I have a full project in package explorer and a full project in Git rep
the funny part is that I can run it in package explorer and I can't run it from git
one is from package expl. and one is from git rep.
Why do you want to run it from git?
what's the difference?
Normally, these shouldn't be different repositories
well, there's also another option
you could create the repository outside of Eclipse using git init
from your terminal
and then add it using Team>Share Project
because I need my project to work from git... now the problem is that after I make changes in package explorer, there are actually zero changes done in git rep
They act like 2 different folders that have nothing in common
I found the problem....
I had to share the core and the desktop to my git rep
I will make a few tests to be sure it works fine