DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page Import location for User Libraries
Notices
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2008
Question Import location for User Libraries - 05-16-2011, 10:13 AM

Having imported a user library file into Helios, the location of the jar files was based on Windows (C:\...) and the user is on MAC. Unfortunately, they forgot to edit the userlibraries file before importing it. Now, the User Libraries dialog in Window / Preferences / Java / BuildPath / User Libaries fails to started ("An error has occurred when creating this preference page.") and shows the problem "Path for IClasspathEntry must be absolute: C:/..."

If anyone knows the file that is updated when a user imports user libraries so we can edit it and remove these errant references, or fix them that would be very helpful.

Thanks in advance for your help.
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2008
Default 05-17-2011, 07:29 AM

It turns out this is a bug which I have reported here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=346002

The constructor that loads the UserLibraryManager fails because an assertion tests the path while building the list of UserLibraries. Unfortunately, the data is stored in a serialized binary file so it is difficult to edit.
Reply With Quote
  (#3 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2008
Default 05-18-2011, 08:12 AM

It turns out the User Libraries are maintained in a text file, not a binary file. If you get into this situation where the User Library dialog is unable to display its content, shut down Eclipse, and then start in the workspace directory and navigate to edit the file:

.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs

and remove the offending "org.eclipse.jdt.core.userLibrary.MyLibTest=.. ." entry (or whatever your User Library name is).

Because the file begins with a period, Linux or MAC users will need to ensure they can find hidden files.

Thanks to the Eclipse team for providing the work around. The issue should be repaired in an upcoming version of Eclipse.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=346002
Reply With Quote
Reply

Tags
error, helios, iclasspathentry, preference page, user libraries

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create an import for my model? SteffenHH Eclipse 0 09-22-2010 09:46 AM
CMP entity bean in eclipse - import attributes from table doesn' t work dschinnistan Eclipse 0 07-18-2009 03:22 PM
Referenced Libraries gone! t_mcgee09 Eclipse 0 07-16-2009 11:54 AM
scripting preferences import 5dark Eclipse 1 07-18-2008 08:18 AM
eclipse CDT import problem. ruony Eclipse 0 07-04-2008 12:29 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com