I have a laptop and a desktop , I use my laptop at office for doing my Java projects, I also want to continue doing my work at home in desktop. So I need to synchronize all my work done in laptop to my desktop, is there any option that can keep my projects synchronized so that I can start my work from where I have stopped.
Thank you in advance
Git + Github (if your projects are not secretive, otherwise pinpoint each computer as the remote repositry one of another) + Egit from Eclipse.
I use four machines to work with my code and this have been by far the most convinient method of doing things for me, especially if you need someone from the outside to view and edit your coude later on.
Related
A couple of days ago, I was copying and pasting my code into a new class. While the entire code was selected, I hit the backspace key. The entire code deleted, and I did not realize. My computer then died. Today, I opened it back up, and none of the code was there. The only thing that remained was an empty file. Is there anything I can do?
The two comments cover most of it. There are only 3 places your code could possibly be. If you checked them all and none of them have it, you're out of luck.
Eclipse Local History
Right click the file in the package explorer and pick the 'Restore from local history...' option. Hurry up, eclipse auto-removes local history that's older than 7 days!
VCS
If you're using version control and you checked this in before, it's a simple restore away. For example, git checkout path/to/the/file.java would do it. You'd have to explain which VCS system you are using and how are you accessing it (via eclipse teams, via e.g. Fork.app, via the command line, etc).
Backups
You're using a computer. It should have backups. These backups need to run automatically and preferably be going 'off site' (to a place that you do not live, you don't want a fire or some serious burglary to mean you have lost both your system and your backup!). If you don't have that, you're, uh, well, I don't want to insult you, so you should find some suitable insult that describes a very silly person and then yell that at a mirror.
The only excuse to not have backups for a system is if the system does everything in the cloud. Chromebooks really don't need it for example. If you're programming, unless it's some fancy cloud-based programming layout, this does not apply to you, and therefore you should be finding a mirror right about now if you don't have a backup solution in place.
There are open source tools like arq where you fully control where the data goes. Various NAS (Network-Attached-Storage) systems have the option to sync with another NAS elsewhere over the network, so buy one for yourself and for a friend, and be each other's backup buddy. Or just toss some money at it; services like Backblaze offer fixed fee backups and offer client side encryption if that's a worry for you.
I want to work remotely on my project but my project files are on the other machine in my office. I don't want to use Desktop Sharing because it uses a lot of traffic and it is slow. I want to work with my LOCAL intellij but files would serve from my computer in office. Is there any approach?
I don't think it will work, IntelliJ is built around the idea that the files are on the local drive, and if its a descent project it still will be slow.
Depending on your security settings, internet speed, etc.
You can try the following:
At work create a network drive that stores the code and on your local computer map this drive, so intelliJ will "think" that its a regular File System but in fact the files will be stored remotely. I personally believe that it will be really slow, but you can try, this is the closest answer to your question I believe.
Use X Server and stream the graphics from the intelliJ that runs on your server at work to your local PC. In such a setup the computer at work will run the intelliJ process and all the files will be stored there too. Your Local PC will show the graphics. Usually this works when you have linux at work, I do this sometimes with programs like MobaXTerm, probably there are others
Connect to you computer with remote desktop on Windows - as you say its slow but its still a solution, probably faster internet can solve the issue :)
By far the best option I can recommend: Use git's distributed nature. Assuming your project is managed by git (and if it isn't - consider using source control anyway).
Then checkout the copy of the project from... Here are two options:
Option a: ...from the remote central repository that hosts the source files of your project in your organization
Option b: ... from your computer at work, you can define in git the "remote source" (this question is not about git, I know but you can use (git remote add <your computer at work> + chose the protocol that will work for you best: ssh, git internal protocol, http, etc)
Then you'll compile the project locally (you might have to install build tools like maven, gradle, etc. on your local computer and then by using your locally installed IDE you will be able to develop fast. Now when you're ready to "submit" your code - you can push it upstream. In the option A it will be the remote repo like you probably already do at work, with option B you will push to remote branch on your computer at work.
This will be pretty fast and I used to work like this a lot of times.
Basically when I auto complete on Eclipse (By pressing CTRL+Space) the program laggs for about 5 seconds. This is getting really annoying because I use the auto complete alot. How do I fix this?
The workspace I'm working on is located on a NAS with a 1Gbit/s connection. Could this be causing it?
Thanks.
Check if problem exists with local resources too
Create a local workspace and open it with same eclipse instance. Now create a simple java project by new project wizard at your local machine inside this workapce and try code completion there. If it's still slow go to Step 2.
(by the way - I wouldn't store workspace information on remote side, but always local)
Check proposal kinds
If it's not a network issue and the problem still exists on a simple local workplace with local sources you should inspect your proposal setup as shown in next picture.Maybe one of the proposal kinds is slowing down your IDE. You can experiment with turning off proposal kinds sequential to find the problematic one.
System requirements
If you got stil the problem after doing Step 1-2 maybe your system has not enough power/memory to provide eclipse (but normally not the reason - I am using eclipse at Linux on an old T61 notebook with 4 GB Ram + SSD and it works fine!)
I'm using eclipse to write my code in Java. I switch back and forth from home computer to work computer on a regular basis. I wanted to be able to sync the work done on one computer to the other computer automatically - how can it be done?
Further, I want to export all the files from my work computer to home computer as I do not have eclipse setup on my home computer yet. I know I can export the files but this will not export the all the Java jars I imported in my project. Basically I want to export everything so once I import it on my home computer I can continue from wherever I left off at work..
Thanks
The best bet, would be setting up a version control system like GIT (e.g : using github) and then you will have the chance to easily synch through the remote repository.
Regarding the libraries used by your project, to keep them organized and automatically managed you can take a look at Maven build tool.
If you don't want to go with the version control system, though it will be the best option, you can try with the FileSynch plugin and work through an FTP site or whatever shared location you want ...
Unfortunately there is no way to auto sync projects in eclipse, since there is no account/cloud system for projects so you will have to do the job manually. But I can offer you an alternative as long as all the computers are at home (connected to the same router) , there is something in windows called a home group, it enables sharing of documents and devices like printers, faxes, etc. you can make a home group and share the document folder of the user and place the eclipse workspace there then you can just use it whenever you want (your host computer needs to be always online though but you can just copy the folder to the computer and switch workspace via project > switch workspace in eclipse) , then it's the closest you can get to auto sync. I don't know about other OS but I think they should support some equivalents form of a homegroup, hope this helps.
I've been doing this using the dropbox for a while, Install dropbox app in both computers, then turn on sync :)
I just wonder something about java applet with awt. I quite disappointed with this problem and want to throw it away sometimes. Below are my descriptions:
I already created one application using java applet with awt controls on my own computer, let's say computerA using Window 7 32bit Operating System. To up and running this application, I update java version to the latest one.
Application is working fine with computerA. However, this application also need to run on the others as well. As my own situation, I run with another computer, let's say computerB using Window 7 64bits Operation System. I knew that the application created with 32bits java version, thus I decided to install this java version on computerB. However, when I run the application it can only display interface on browswer, but some of its function did not work.
Yet I didn't throw it away, I decided to configure in the last computer, let's say computerC. This computer use Window 8 32bits Operating System. I did configure as I did with computerA and computerB. The result is still exact as computerB.
I also checked up this solution on here, but it is not fit my problem.
Here are my questions:
What is the exact problem on here?
Where does the problem come from?
Is it solvable?
How can I solve this kind of problem? Any helps?
Update:
PostgreSQL Database also install in other local computers as well.
I noticed that If I convert my code into eclipse project, it worked fine. No problem at all.
Thanks in Advance.