1

I have switched my web-application to run on another installtion of Liferay. Consequently, I was able to changle classpath libraries in my project to new server location. This includes JRE System Library and Liferay v6.0 CE. I.e, both these libraries can be added for new server location from Java Build Path dialog.

But the library "Liferay Portlet Plugin API" still refers old Liferay installation path and I see no way to change it.

How is it possible?

UPDATE 1 Here: http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+IDE+Getting+Started+Tutorial On the very most low picture you can see all three libraries listed in Package Explorer. Two of them I was able to change and the question is about third one.

Dims
  • 47,675
  • 117
  • 331
  • 600

3 Answers3

2

You can manually change file .metadata\.plugins\org.eclipse.jdt.core\variablesAndContainers.dat.

So open your filesystem browswer (My computer) navigate to your liferay IDE workspace location and go to .metadata\.plugins\org.eclipse.jdt.core. Open file variablesAndContainers.dat and find and edit your jars locations.

After that restart Liferay IDE or simply close and open your project.

UPDATE:

1) Take note of jars that are needed
2) Go to configure build path dialogue than go to libraries and select "Liferay Portlet Plugin API" then click Remove
3) Create folder "lib" directly in your project (not WEB-INF/lib)
4) Add jars to lib folder (from 1.)
5) Select jars and add them to build path (right click - Build path - add to build path)

Or you can crete you User libarary with those jars and than add it to build path

Martin Gamulin
  • 3,855
  • 21
  • 25
  • Hmm. Firstly this file is somehow binary for me. Although it has some paths visible in text. But secondly, these paths do not contain my wrong paths. Probably your idea is good but need to find where exactly the paths of my specific container stored... – Dims Nov 17 '11 at 12:10
  • That file should/must contain entries for your jars. Silly question but are you looking at correct workspace? – Martin Gamulin Nov 17 '11 at 13:11
  • :shame: Ah, yes, wasn't looking at correct place. So, I have found some jars which I may want to change. By how can I distingiush incorrect ones from correct ones? I have projects which refer both "new" and "old" Liferay, I don't want to change all ones? May I just delete this file and hope Eclipse recreate it? – Dims Nov 17 '11 at 14:30
1

Additionally to chosing correct libraries in classpath dialog, one should also change "target runtime" appropriatedly by right click project and going to properties > Targeted Runtimes.

P.S. And plus one should close project and then open it again.

Dims
  • 47,675
  • 117
  • 331
  • 600
  • Sorry, for me is reverse. Those computers are inpredictable! :) Thank you hinting me about .dat file! – Dims Nov 18 '11 at 10:00
0

in my case, following instructions in this question about clearing eclipse cache (-clear option) helped, as changing liferay plugins SDK path wouldn't change the libraries' locations when adding this library to project build path...

hello_earth
  • 1,442
  • 1
  • 25
  • 39