简体   繁体   中英

Sharing an Eclipse Java Project

Hi I've been programming a game for class and I now need to share my game and all the .java files, the classpath etc. with my teacher. I previously just assumed that it was as simple as to upload the folder with all files but I was wrong. I've tried uploading the folder and downloading it to make sure that it worked but I didn't manage. Obviously one could open all the .java files in word pad or something similar, copy-paste the code and reconstruct the entire project but this would be too cumbersome. So how would I best send my teacher my code?

I also thought of something that most likely will be a problem for my teacher. In my game I have made use of several sprites as to animate certain features in it. I just realised that these will not be in the same location in his computer as they are in mine. How do I make sure that my game finds the correct sprites on all devices?

To summarise: How do I send my teacher my code and how do I make sure that my game will locate the sprites used on all devices?

Thank you very much!

Put your sprites in the project. If you have them in the top level project folder, you can access them directly. This will eliminate the issue of him trying to access assets on your machine from his, as they will be transported inside the project.

As @Matt Brzezinski commented, GitHub is the awesomeness. But that is a thing. Just find the project in your workspace, zip it up, and email it to your teacher. He/she can then unzip it, and run it the same way you can.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM