Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » SWTResourceManager: Error from Wrong Build File(Project compiles SWTResourceManager incorrectly and causes errors everywhere)
SWTResourceManager: Error from Wrong Build File [message #712031] Sun, 07 August 2011 00:05 Go to next message
Jonah Bron is currently offline Jonah BronFriend
Messages: 32
Registered: October 2010
Location: California
Member
I deleted my build directory recently just to start it fresh. It re-built, but then it wouldn't work. Errors came up in my code for no reason, all for using classes that supposedly "couldn't be resolved to a type" that are right there in my code, and in the build output. So, I restored the build folder from the trash folder, and narrowed the problem down to org.eclipse.wb.swt.SWTResourceManager. If I let it build a fresh .class file for it, Eclipse shows errors in my code. If I restore the old .class file, everything's just peachy. According to Windows Explorer, the bad (new) file is 8,097 bytes. The good (old) one is 11,094 bytes; they are clearly different files.

What could cause this? The source file (for SWTResourceManager) looks fine. I tried commenting out all references to it (SWTResourceManager), but it didn't help.

Thanks
Re: SWTResourceManager: Error from Wrong Build File [message #712081 is a reply to message #712031] Sun, 07 August 2011 01:37 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
You haven't provided much information here about the "Errors" that "came up", but I would suspect a JDK mismatch problem. You didn't mention which JDK versions were used to compile the old vs. the new .class files or which JDK is used to run Eclipse.

In any case, this does not sound like a WindowBuilder related problem.
Re: SWTResourceManager: Error from Wrong Build File [message #712111 is a reply to message #712081] Sun, 07 August 2011 02:39 Go to previous messageGo to next message
Jonah Bron is currently offline Jonah BronFriend
Messages: 32
Registered: October 2010
Location: California
Member
@Eric thanks for the reply. I looked closely, and it seems that the only two files with errors were the only two files in the application with public static void main() methods. Any classes in my application I was referencing from those showed up as "could not resolve to a type".

Long story short, after further assessment, it seems to have something to do with the project being in sync with the filesystem. Apparently it tries to find the referenced classes before building. Refreshing after compiling seems to fix the problem.

So you're right, it wasn't a WindowBuilder problem after all. Thanks a lot Smile.

[Updated on: Sun, 07 August 2011 02:41]

Report message to a moderator

Re: SWTResourceManager: Error from Wrong Build File [message #712669 is a reply to message #712111] Sun, 07 August 2011 15:28 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
When faced with a weird compilation problem in Eclipse, doing a refresh and/or rebuild is always a good idea.
Re: SWTResourceManager: Error from Wrong Build File [message #712808 is a reply to message #712669] Sun, 07 August 2011 19:29 Go to previous message
Jonah Bron is currently offline Jonah BronFriend
Messages: 32
Registered: October 2010
Location: California
Member
Okay, thanks for the advice Smile

Edit: seems that emoticons are busted.

[Updated on: Sun, 07 August 2011 19:30]

Report message to a moderator

Previous Topic:Getting Developers involved with WindowBuilder
Next Topic:e4 example
Goto Forum:
  


Current Time: Thu Apr 25 19:57:35 GMT 2024

Powered by FUDForum. Page generated in 0.03099 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top