0

I want to get project information without IProject class, because in Indigo, not work (not exist). Thanks

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

2 Answers2

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