score:1
the first solution that really seems to work so far is a little ugly but very easy. i just created a symbolic link in the /users/
directory to make eclipse find the needed files.
cd /users/
sudo ln -s username-on-the-current-machine/ username-in-the-path-of-the-classpath-file
that way i can easily share code between my different machines.
and a note on version control: yes, we use version control. actually, we work on a github fork of a university project with a lot of pull requests, branches and several developers. so the dropbox solution is not a substitution for an scm. however, it helps me to be very flexible in changing between different computers quickly and i do not have to handle branches, commits and so on just to keep the files up-to-date. but of course, all changes are committed to github when they are ready.
score:-1
although your probably not going to do this given you have already answered the question... you really should not:
- checkin
.project
and.classpath
files - share projects files across different computers instead of using scm (particularly since your using git).
i believe ivy, gradle, sbt, and maven all have solutions for managing .classpath
and .project
. you should investigate those options. also eclipse has both a maven and ivy plugin (http://ant.apache.org/ivy/ivyde/) which will automatically manage your your classpath for you based on the ivy and maven file.
as a developer that works on many other projects is rather annoying when some one checkins .project
and .classpath
. sharing outputted files across different machines (.class
and .project
, .classpath
) is also dangerous. thats because you could have different versions of eclipse and different jdk compilers not to mention eclipse partially compiles java files. it may work for you now but its a hack.
also as i noted in a comment you'll either have to remember to refetch ivy dependencies or include those in your sync (ie your .ivy2
directory which can be absolutely massive) and since you'll have to remember to refetch ivy dependencies are you that lazy to not regenerate your .classpath
(unless sbt is completely lacking on that) ?
score:0
you can remove the binaries folders from dropbox, by doing so everytime dropbox synch it only overrides your code, and eclipse will have to build again , and the problem should be solved.
score:0
there is no way to rename the .classpath
file, it's one of the very few things that eclipse needs to be hard-coded in order to work (it, along with the .project file are the bootstraps by which java projects are managed; eclipse jdt has to inherently "know" where those files are).
i don't know anything about sbt, but in general there are several capabilities/techniques in eclipse java projects to keep .classpath
clean (free from absolute or machine-specific paths). in a typical java project, the user makes changes to the project via the build path properties which result in changes to .classpath
; does sbt re-generate that file periodically? can you post the contents of your .classpath
?
score:1
i'm not familiar with sbteclipse, but according to their wiki page, running sbt eclipse
will generate the .classpath file. the way you're running it, it's generating absolute paths for your dependent libraries, which you don't want.
there is a setting called relativizelibs
that looks like it's the problem. you should set that to true
(which is apparently the default value). you will then likely have to make sure you run sbt eclipse
from the same relative location to the project and library files on each computer, but you should be able to make that structure consistent between your development machines.
Source: stackoverflow.com
Related Query
- Change name and/or path of .classpath file in Eclipse
- How to get selected file name and its package path in eclipse plugin
- How to quickly copy the current editing file name or full file path in Eclipse (Luna)?
- Eclipse PDE, Navigator View, TreeSelection - Obtaining the file type and name
- Error: Path Must Include project and resource name:/<jar file name> in eclipse IDE
- how to change a file name in Android Eclipse development
- Where to put properties file in eclipse and how to access the path both locally and on server
- Eclipse : Add jar file and not depend on local machine path
- When I try to upload and save an image file using Struts in eclipse it shows the file name as null
- Eclipse is using wrong .gitconfig file and i can't change it?
- CheckStyle SuppressionFilter module file path for Eclipse and Maven compatibility
- What would be the host name and Repository path while Creating the CVS Inside the Eclipse
- Eclipse export uses same location and file name for different project
- eclipse / android project - file encoding issue while change package name
- Eclipse Plugin - Change Editor Tab color depending of file path
- Eclipse : change permission file and commit does not work
- Different jar file in classpath and buildpath in Eclipse
- How to change the order of entries in "order and export tab" of eclipse java build path programmatically?
- Eclipse SVN File name with Last Commit Author and Date
- How to get path to class file in eclipse and linux in java?
- Eclipse same name file include path c c++
- Change Java class name and renaming file from "classA" to "ClassA" causes java.lang.NotClassDefFoundError
- Eclipse not giving an this errors or warnings: 'Tomcat: multiple contexts path of..' and pom.xml file
- Different relative file path during execution in Eclipse and Java
- how change the WAR file name inside EAR when deploying in Eclipse with no Maven plugin
- How can I change the name of *.xml file in the eclipse IDE's project explorer with one of its element
- Eclipse RCP - Path must include project and resource name
- Importing war file into eclipse and build path problem
- robot framework output and result file path & name configuration
- Eclipse "Server Locations" section disabled and need to change to use Tomcat installation
More Query from same tag
- How do I manage console output in a long running Eclipse plug-in?
- Import Jars from a different folder into the existing project
- how to fix url path in eclipse
- Why does Andengine show errors after restarting Eclipse?
- Minecraft forge doesn't load item texture 1.10.2
- Eclipse says The constructor Email() is undefined
- How to Build Camera app Separately from AOSP?
- java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
- how to upload a web project with external jar in wildfly 11?
- Adding Xtext template proposals to the standard Templates View
- In IntelliJ is there any package/class browser like Eclipse's Java Browsing perspective?
- Eclipse indexing not working
- HTML file not opening in executable jar
- How to reference a JVM variable in eclipse.ini
- Can you have #regions in Android / eclipse
- Eclipse doesn't find my static libraries
- How to configure web project to find jars in eclipse?
- NFC plugin doesn't work in Eclipse
- Eclipse plugin to save workspace in repository
- Java Error: Could not find or load main class. (Eclipse Juno) with package
- Android application has stopped working- Eclipse
- eclipse error while click on any project
- Java code indentation mixed space and tabs
- How to get down to StringLiterals with Eclipse AST?
- Grails with GGTS (Eclipse): dbconsole not working or getting generated
- How to discard files from the Xtext indexing process?
- Authentication client-server in Eclipse Milo
- How to enable "Browse Deployment Location..." context menu item in Eclipse?
- JavaFX Eclipse suggestion to import not present
- Where are all my files on eclipse? They were on the left side of the page?