I want to get project information without IProject
class, because in Indigo, not work (not exist). Thanks
Asked
Active
Viewed 52 times
0

greg-449
- 109,219
- 232
- 102
- 145

Jonatan Mayorano
- 11
- 1
-
1http://stackoverflow.com/questions/1206095/how-to-get-the-project-name-in-eclipse – Maheshbabu Jammula Mar 03 '14 at 08:26
-
2What do you mean with "not exist"? IProject exists and works in every eclipse version. Probably you should refine your question. – Arne Deutsch Mar 03 '14 at 08:26
2 Answers
1
Project Name:
String fullprojpath = System.getProperty("user.dir");
int index = fullprojpath.lastIndexOf(File.separator);
System.out.println(fullprojpath.substring(index+1));

Rahul
- 3,479
- 3
- 16
- 28
-1
System.out.println(System.getProperty("user.dir").split("(.*\\" + File.separator + ")")[1]);

uyuyuy99
- 353
- 4
- 11
-
Would the downvoter care to comment? I pretty much did the exact same thing as Rahul, but with no errors. – uyuyuy99 Mar 03 '14 at 22:46