#Can't share Java - libGDX project on Github

141 messages · Page 1 of 1 (latest)

sweet geyserBOT
#

This post has been reserved for your question.

Hey @modern meteor! Please use /close or the Close Post button 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
#

which files are missing?

#

and which errors do you get?

modern meteor
#

@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.

urban pendant
modern meteor
#

that's how my project looks after I went to Team and Shared it to my git

urban pendant
#

check core in the bottom list

#

Are there any files in it?

modern meteor
urban pendant
#

maybe try reimporting the projects?

modern meteor
#

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

urban pendant
#

maybe select the src.gdx.game and refresh it

modern meteor
#

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

urban pendant
#

don't care about the working tree

#

Can you show the Git Staging view?

#

that thing

modern meteor
#

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 ?

urban pendant
#

the path you censored here - is it the actual path to your project?

urban pendant
modern meteor
#

no, it's a different path, I keep projects and git stuff in different folders

modern meteor
urban pendant
modern meteor
#

Done

urban pendant
#

then add it again using Team>Share Project

#

from the package explorer

#

and tell me what happens next

modern meteor
#

on this one ?

#

@urban pendant

#

I chose the one marked with green

urban pendant
#

yes

#

this one

modern meteor
#

Do I create a new git rep ?

urban pendant
#

select that checkbox

#

then the view should change

modern meteor
#

Ok

#

Yes

#

I did that

#

and now it created a rep in that folder, ok

urban pendant
#

Now check the Git Staging view again

modern meteor
#

Do I select them all and than "Commit and push " ?

urban pendant
#

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

modern meteor
#

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

urban pendant
modern meteor
modern meteor
urban pendant
#

Can you try right-clicking on your Java file and selecting Run As>Java application?

modern meteor
#

not showing that option

#

and in package explorer there is nothing in src anymore

urban pendant
#

Which OS are you using?

modern meteor
#

windows 10

urban pendant
#

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

modern meteor
#

in git rep or package

urban pendant
#

package explorer

#

the gdx package here

modern meteor
urban pendant
#

If you enter the command dir, it should display files in that package

#

What does it show you?

modern meteor
#

oh, it did not get me into the src folder

urban pendant
#

seems like it

#

maybe try clicking on src and then pressing Ctrl+Alt+T?

modern meteor
#

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

urban pendant
#

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

modern meteor
#

oh, ok,ok

#

yes, i do have one file there

#

oh, no

#

I went with system explorer

#

and this is what it shows me

urban pendant
#

Are these different desktop directories?

modern meteor
#

yes, the first one is in git rep and the second one is where the project was originally located

urban pendant
#

Which of them is where you have your Eclipse project?

modern meteor
#

my eclipse project is in the last photo

urban pendant
#

in that dialog, did you select the checkbox?

modern meteor
#

Oh, yes, and it did not let me push to git, give me 1 minute and I can do it again

#

if you want

urban pendant
#

?

#

Can you copy the files over from the git repository to the Eclipse project?

modern meteor
#

like, all of them or just src

urban pendant
#

the Java files, maybe images and other important files that are missing

modern meteor
#

I do not have the copy option, I can import it

urban pendant
#

?

#

I meant copying the files to the actual source folder

modern meteor
#

oh, using windows, not eclipse

#

?

urban pendant
#

for example

#

you could also drag them into Eclipse if you prefer that

modern meteor
#

yes, i did it

urban pendant
#

If you add a file in the source folder, does it appear in the Git Staging view?

modern meteor
modern meteor
#

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.

urban pendant
urban pendant
#

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

modern meteor
#

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