Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse loosing class imports

 
Jeremy James Brown
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been working with the google appengine api with Eclipse 3.6.2 Enterprise Edition to create some servlets and jsp. I keep getting spontaneous import errors with Java EE imports. Before all EE imports would become errors. Now I have a "missing type error" on EntityManagerService.get() I'm new to servlet and EE and I'm hoping for an answer.



EntityManger is clearly listed in the imports



The .get() method is highlighted red. Hovering over it shows...



But adding the import for



Doesn't help and Eclipse lists it an an unused import

My servlet was compiling and working just fine before. Thanks!


 
Jeremy James Brown
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Downloading a new appengine SDK solved the issue but I don't get it. Isn't javax an EE package?
 
Jeremy James Brown
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More of the same type of BS errors. Now the project won't compile because of a missing servlet jar. I've copied a servlet-api-2.3.jar to the WEB-INF folder but I still get errors.

I'm sorry to say it but Eclipse is really a PITA.
 
Jeremy James Brown
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've realized what the issue is here. I'm running my workspace from Dropbox which always worked on netbeans, and worked on eclipse until I started using plugins. I put the appegine SDK in the /dropbox/workspace and hopefully this is over and I've learned something. Eclipse doesn't use environment variables the same way netbeans does.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic