When you install Eclipse he always ask me where to put the workspace and here I noticed that Eclipse do not understand normal unix stuff like ~ or $HOME.

What does Eclipse/Java call your homedir?

The reason for this question is that I was writing a small installation guide, And it seems silly to put my own users home dir in a general guide With a confusing text about use your own username.

It would be much nicer (and less confusing) to simply write. Use: ~/workspace

Is there an Eclipse version of ~ or $HOME?

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

Java developers might know the user.home system property. I'm not sure how you'd but that into a screenshot though, but the terminology alone might be enough.

As an abstract example, /home/johndoe or something along these lines would probably work. But you need to consider that the path to the home directory is very different among the popular OSes: /home/username, /Users/username, C:\Users\username and C:\Documents and Settings\username are all common and possibly used by your audience.

But right now it does not apply to Eclipse, since they have not implemented this feature.

link|improve this answer
A good idea but eclipse creates user.home as a dir where eclipse was started. – Johan Nov 26 '11 at 11:52
For this guide I don't need to think about the windows users since windows is not allowed in this project. If someone has windows they must install the correct stuff in a virtual machine. So it is good enough if if works on the unix/linux based systems. – Johan Nov 26 '11 at 11:55
@johan it's a system property, not a magically translated value. You can use it like I did, in your accompanying explanation. And not all unixes store their user profile data in /home. You can't do better than an example. – Daniel Beck Nov 26 '11 at 12:06
You are right and that is why I usually use ~ since then you can have your "home" in whatever dir you like, and from documentation point of view we don't care. It is just a dir where the user are allowed to save files. – Johan Nov 26 '11 at 12:48
1  
Eclipse uses @user.home internally to refer to the user home directory, but that doesn't work either when entered. – Daniel Beck Nov 26 '11 at 13:13
show 3 more comments
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.