Sharing A Project Between 2 Computers - java

Im a college student with a laptop and a desktop but I want to have a shared eclipse workspace that automatically updates whatever changes Ive made to the shared files.

I think the better and the most general way is using git control version system for this. If you want something is like in live stream it is going to cause a lot of editing problems because of synchronization issues.

If you are a student, i suggest of using GITHUB desktop.
very easy to use for first git users.

Related

how to automatically update a .jar, I am finishing up a very small application that I want to be able to have version control on after I deploy it

I have stumbled across many things, OSGi, Install4j, JWS(Java Web Start deprecated), Jgit, etc. I want to know what the best solution is for a very small java application that will be installed on the companies computers to interface with USB Scales. If our database updates I want to be able to go and update the git repository and have the Jars already on all of the machines update to the new jar when one is available. This small application will be used probably 100 times a day, but is very small. If the jar needs to pause to update that is fine. I don't want to recreate the wheel. Is the best option a two part system where one jar is the Updater and one is the application? Please help I am a bit lost on this as most of the information is at least a few years old. I have also found this Tutorial on OSGi but not sure it is what I need.

Sharing a java project (different IDEs)

Me and my team were wondering how we could share our java project easily. I was thinking about using something like Google drive but it is quite tedious to download the files everytime any member wants to modify them. I know there exits easier ways to share a project for example using Eclipse but the problem is that we all work on either BlueJ or Eclipse. So is there a way to do it?
Thanks in advance
Are you familiar with SVN?
Developers use Subversion to maintain current and historical versions of files such as source code, web pages, and documentation. You can also add an eclipse plugin to update or checkout projects from a SVN server.
Or as of another solution, and making less effort in setting up a SVN server just use github.
here is the link where you can signup in their website
You can share the project with team using GIT or SVN.
1) It synchronize the project all the time when you(including your team) push or pull the code-changes to and from the server.
2) Easily compatible with eclipse.

A couple of questions about Eclipse

I've been learning to program in Java and the one thing I'm having difficulty locking down is an IDE that I actually like! I tried NetBeans, but did not get on with it at all. I've recently been using CodeRunner, which I found on the Mac App Store. I like CodeRunner, but I worry that it might be a bit simplistic. So I've been thinking of trying Eclipse, but there are a couple of things I'm not quite sure about that hopefully someone here can answer.
First of all, I've tried installing Eclipse on my Mac and I'm baffled by the fact that it comes with a folder packed full of program files and not as just a packaged Mac app. I'm not entirely sure what to do with it; are there any Mac Eclipse users out there who can advise me?
My other query has to do with projects. I've worked with a couple of different Java books and they all recommend using a single project to hold all of the java files for the book. Can anyone explain why this is? I would prefer to keep my own folder structure, for example having a separate folder for each chapter. Would I just have a different project for each chapter instead, is that how this works?
My apologies if these are noob questions; I really want to get my head around Java, but need to be able to get comfortable with the IDE ideally first!
Many thanks.
1- you can just put it in the Applications folder and use it as a normal application ;)
2- I think it's better to organise stuffs from the same source (in this case your book) in the same project. You can then put each chapter in different packages

Eclipse project "save as"

I'm quite new to android programming and I was wondering if there is a Save As button in Eclipse for the entire project instead of saving only 1 XML or Java at a time.
For example, when I work on Excel, sometimes I like to save different versions of Excel workbooks so that I can roll back if there is a problem. I want to do the same thing for Eclipse project files like Listv1, List v2, Listv3 etc.
I know you can use local history, but that is more for different versions of the XML and Java files.
I want to save different versions of project files onto my hard drive so that I can compare two different versions of my project.
Click on your open project in either the Project Explorer or Package Explorer windows. Then File/Copy (or Ctrl-C), then immediately File/Paste (or Ctrl-V). Your'll get a wizard to save the project under a new name.
You need a lot more than manual saves: Any software project of any significant size should be using a version-control system. The one that's become the main standard these days is git.
Providing this sort of multiple versioning is the baseline that a VCS does, and most also handle situations like branching, where you can be working on the new version of your program but still go back and fix a bug in the old one, then push out a fix to the existing users while you keep working on the new version.
Eclipse has very good integration via the eGit plugin, and you might also be interested in the git-flow branching system.
I don't think that eclipse has that feature, why not having a a version control system to track your changes? like Git or Svn, they are free and very powerful
For example, when I work on excel, sometimes I like to save different versions of excel workbooks so that I can roll back if there is a problem.
Learn to use a good source control (version control) system. That's a much cleaner solution than just keeping lots of different copies around. You should still be able to compare different versions easily - and you can experiment on different branches, etc. It'll also make it much easier to share your code with others, should you wish to.
Additionally, it's not clear whether you're currently just a hobbyist or not, but if you're intending to code professionally you'll definitely need to get used to source control systems. (Every software company worth their salt uses source control.)
You might want to look at:
Git (you might want to start at GitHub)
Mercurial
Subversion
(All of these are free, and have Eclipse plug-ins available.)

How to share Java project with other developers? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am working on a Java project together with a collaborator, and we are both using the Eclipse editor. What I want to do is to be able to share the .java files with him so that we can both edit it separately but see what has the other has written. Currently, I am doing this is an ad-hoc way by sharing a Dropbox folder that contains the project. However, this approach does not work well because he is using a different version of Java (as he runs a Mac while I am using Windows). For me to run the project, I would have to clear all the .class files that he has created which will appear on my computer since Dropbox just shares all the files.
I have heard of CVS as a way to manage file sharing among developers, but it sounds like a lot of work. I don't know for example how to get a CVS server or what to do to get it to work. Is there an easy and straightforward way to enable us to work together on the same Java project? Is GitHub the answer?
This is definitely the job of source control, as other answers have mentioned, Git or SVN are probably your best choices. Git is the newer one and is gaining a ton of popularity (probably thanks to GitHub).
GitHub is pretty easy to learn and can even take care of a lot of the more difficult tasks for you with their new GitHub for Windows client. They also have a GitHub for Mac client. Once you are more familiar with the tool you can get the EGit plugin for eclipse so you can control the source control directly from your IDE.
Additionally, GitHub created an online interactive tutorial for learning git.
As for clearing out class files (and also your .settings and .project and .classpath files from eclipse), you can instruct git to ignore these types of files using a .gitignore file. You can find templates for various languages (including Java) here.
you could spent the time to learn git at: https://help.github.com/articles/set-up-git
it's a very valuable tool and once you get used to it it will be very easy to share code.
Or better yet, Mercurial. It follows the same approach as Git, but is way simpler and works without hassle. To start a repository within the current directory, just run:
hg init
Have a look at the documentation for more information.
I recommend "Subversion"
Google it and look at the information.
You can easily check out files and check in.
I wish you luck.
Depending on what your future plans are the Git or Subversion would be fine. I finally made the switch to Git after years of using SVN.
Note that in addition to Github (which is great) there are also some other repository hosting services, some of which offer free "personal" accounts (most make your code public, but I think a few still give you a limited amount of space for free).
CVS is getting old and people are moving out of it to other source code control tools
The most famous tools are SVN and Git. There are other tools but less famous I believe
You definitly need a software revivision tool if you are going to work in a team(or even alone for that matters), as it marks the changes that have been made, when and by whom, etc...
google code for example offers an easy way to setup your svn repository in one minute. there are also alot of companies offers such a service online for free or for small money, depending on your need. So if you just need a sandbox, then setup a svn on google code and try it out
a code revision tool is almost a must for every programmer
good luck

Categories