Package Explorer in Eclipse stuck in resources - java

At work we are using Eclipse Java EE Indigo Service Release 2 (build id: 20120216-1857) and I'm having some difficulty with my package explorer. It seems like it's drilled into a mysterious "resources" directory and I cannot do anything to get out of it and see my packages. I've had to switch to using Project Explorer for some time but I just prefer Package Explorer. Can anyone assist with this? I've included an image:
I've attempted to link with Editor, reset perspectives, close and re-open perspectives, but nothing changes. I haven't tried re-installing but I'd really like to avoid having to do this.
Any suggestions?

Related

sublime set up, to run a maven project with a tomcat 7 local host

Im a frontend developer & love working with sublime (MAC). I have started working with other developers that work with java on Eclipse/IDEA on a project using Maven GIT & a Tomcat local host. The problem is im having to use Eclipse/IDEA in conjunction to work with these guys. Does anyone know of the best way I can use Sublime to access and edit the HTML CSS & JS in the best way. Any help would be well apreciated
The best solution I found was:
Integrate Sublime Text with Tomcat
But I had to activate "build automatically" too in order to make it work.
Good luck
If you are looking for a more stylized syntax, I would recommend using package control to get JS, HTML, and CSS specific packages. If you are looking to use sublime to build Maven, then use package control to get Maven.
Assuming you already have package control installed, here are the steps to get the Maven package in sublime on a Windows or Linux machine.
ctrl+shift+p
click install package
type in Maven
hit enter

Eclipse doesn't import java libraries on cold start, plus other compiling errors

Eclipse is giving me a few problems.
After a cold start and the loading of android libs, Eclipse underline the import statements or says that java.lang.Object couldn't be found.
Closing it and reopening often fix the problem. If it doesn't, another close-open fix it definitely. But it shows at each cold-start.
It also gives
"The type java.lang.Enum cannot be resolved. It is indirectly referenced from required .class files"
"The project cannot be build until build path errors are resolved"
But if i restart the build path errors and the enum problem are not show any more(sometimes the enum proble got fixed some time after eclipse's loading finished)
"Project 'xxx' is missing required source folder: 'gen' "
that should be generated automatically generated while building, and still restarting will fix them
In addition, in many projects, while building or cleaning, eclipse says that it couldn't delete the bin/. directory. I noticed that that directory is read-only, and if i try to remove the attribute(even from dos), it immediately return to read-only.
This problems aren't show-stoppers, i still can code and i still can get my apps exported, but it is quite annoying to have to restart eclipse a few times before being able to use it(and eclipse isn't that fast at opening), and i would really know how to fix it.
I searched in the net a bit, but i dind't found nothing useful or that worked.
Is there a way to fix them?
I didn't "unistalled"(it is just stored in a directory) Eclipse, since i should then reinstall android sdk, mercurial plugin, and re download and set up a few libraries i use in quite all my project, and i really hope there is another way.
final notes:
everything works when this problems doesn't show: the app works, logcat too, the right device is used to install the app, so i think java and android sdks are installed just right
I had that problem before so I just saved my projects to a different file and uninstalled everything ( java, android sdk, eclipse ). When I reinstalled it all I put the android sdk on the root of my c drive as I have a windows machine and then instead of picking where java was installed I let it do its own thing. I dont use a mercurial plug in but your "read only" problem could be related to that. Its possible your downloading files that are "read only" and there for you have no way to alter them. Im guessing since you said youve been programing you already know how to set the build paths and stuff. It might just be where everything is installed or something silly like privilege settings on your machine.
What were you using the mercurial plug in for anyway? just curious :)
Have you included the java lib in your project or? For a couple of weeks ago I sat with an project where i absolutly needed some of the methods, so because android just have some of the java lib I imported the need libs and used that.

Google Eclipse plugin recompile problem

I have installed Eclipse Helios(3.6) and Google plugin to develope app in GAE/J.Then created project and runned it sucessufull. Later made some changes in source code but it doesnt recompiled. Previous compiled version is in use. It doesnt compile until I make changes in appengine-web.xml. Could you suggest how to solve the problem please?
PS : I had the same problem in Eclipse 3.5. Also I added javac to SYSTEMPATH.
You could try the following:
the folder where your java files are in is a "source folder" (check it via project properties, "build path")
turn on "build automatically"? Can be found in Menu "Project"
Maybe refreshing your workspace automatically will help (Window->Preferences, and search for workspace)
The Project is automatically not builded or recompiled, when there are problems marked by eclipse. Take a look into the marker panel of eclipse and solve the problems.

Package <blah> does not exist error - NetBeans 6.8 & Windows 7

I'm using NetBeans 6.8 on Windows 7. I upgraded from WinXP and NetBeans 6.7. Now my existing java web app project is no longer able to import/find the packages I've developed - I receive a 'Package ,blah. does not exist' and yet the packages do exist, worked fine in NetBeans 6.7 and the project still compiles and runs OK.
I've tried changing the Java Platform/JDK from 1.6.0_10 back to JDK 1.5.0_22 but I still receive errors package does not exist.
All other 'standard' libraries and packages are able to be imported and used OK ... eg Struts, Hibernate
I have fixed this problem many times by clearing the NetBeans cache.
1) Close NetBeans
2) Go to "C:\Users\.netbeans\6.8\var\cache
3) Delete everything that is in this directory
4) Open NetBeans and wait for it to re-scan your projects
At this time, this has fixed my problem. I do need to do this every once and a while, but if I don't change anything in the project's structure, the issue does not come back, and I can develop in peace!
Hope it helps someone in need.
Solution was to create a new empty web application, check the existing project out from SVN, regenerate the build-impl.xml & configure the library references.
All is now importing and referencing OK
I do not have an explanation as to why the problem occurred the first time this project was created
I had the same issue with Netbeans 7.0.1. Suddenly after some work I could not compile my project anymore, because a major package "does not exit" anymore. All my projects settings (build properties, project properties, dependencies ) seemed ok for me.
The only (bad) solution I could find is, to copy the relevant module to a new name, remove the old and re-create the module again by copy/paste of packages. Now it works again.
regards
I have seen the error when I had the same jar installed twice - as compile library and as a test library.
As the result, many of packages became invisible.
After removing the jar from compile libraries everything become visible.
In the project Properties, under "Libraries", "Compile" tab. Do an "Add jar/folder" of the "src" directory if it's a regular Java project. If it's JSF, use "src/java" instead.
just change s by S in System.out., is simple but i think is your problem

Android Eclipse Classpath - want to add classpath container path but eclipse won't let me

I'm using Eclipse to learn to develop Android applications in Java. I haven't used Eclipse before.
The project I'm trying to use (supplied by OReilly as part of 'Android Application Development') is MJAndroid. When attempting to run the project, the Run fails, and the Problems tab mentions com.java.Object can't be found, and Eclipse asks me to check the build path. Clicking
Properties -> Java Build Path -> Libraries, the message 'Unable to get system library for the project' is displayed.
On a working project, Properties -> Java Build Path -> Libraries has an entry for Android 1.1, which if I click Edit, has the classpath container path of com.android.ide.eclipse.adt.ANDROID_FRAMEWORK.
It seems a simple matter of adding the correct container path to my non-working project. However Eclipse seems determined to make this as difficult as possible. No matter what I chose to add - jars, externals jars, variables, libraries, class folders, external class folders, nothing seems to take the form of 'com.android.ide.eclipse.adt.ANDROID_FRAMEWORK' that the 'Android 1.1' entry on the working app has.
How can I add this namespace to my project so it resembles the working one?
I'm quite sure it's a problem with Eclipse's somewhat odd user interface. Frankly there' nothing I'd prefer more than a file to modify and set such information - my background is in Python, and the whole eclipse environment seems an unnecessary burden.
I had faced the same issue when I imported a sample code downloaded from the internet. I am using android sdk 1.5 with 0.9 ADT plugins. Here is a simpler way to fix the andoid library reference issues
Right click on the project which has
issues and select properties
Select the appropriate Android build
(1.1, 1.5 or 1.5 with google api) and
say ok
Again right click on the project and
select "Android Tools > Fix Project
Properties"
Fix the imports once (if required)
Refresh the project and you should be
ready to go without any manual
editing
I faced this same problem after importing a project through GIT. The problem was that I didn't have the same target android platform installed, and the build path somehow got corrupted.
The first obvious thing i did was changing the target sdk in the project.properties, but even after cleaning up the project and Android Tools > Fix Project Properties, it didn't help and I was still getting the build error.
My solution after wasting close to 1 hour trying to figure this out?
RESTART ECLIPSE
Everything worked fine after that. Eclipse is pretty fickle. Only through years of experience you'll then understand her well. :)
Had the same problem and it turns out the Android SDK Location was not set which was a really simple fix. Go to Window->Preferences, click on 'Android' on the left hand menu, fill in the location of the Android SDK (e.g. C:\Program Files\Android\android-sdk) and click OK. Everything worked fine for me after that.
Found the answer in this set up guide: http://developer.motorola.com/docstools/library/Installing-Android-Dev-Environment/
Sometimes Eclipse can get a bit funny (technical term) with classpath container resolution.
You have a working project in your workspace, so you can rule out plugin installation issues. You could try opening the .classpath file (hidden by default, select the triangle in the top-right of the Package Explorer view, select Filters... and uncheck .* resources) and manually adding the container declaration.
`<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>`
You may then have to close the project and open it again (right-click->Close Project) before Eclipse recognises the change.
You may also find that there is an Android builder and/or nature. If you compare the .project files for the working and non-working versions you may see entries for Android builders/natures. Copying the relevant entries may resolve the issue.
sometimes, eclipse can help you.
In Android projects, click right button on the project-> Android Tools -> Fix Project Properties.
It's usefull in class path errors!!
Luck!
I would verify you have the correct version of Java installed as well as the Android SDK. I would recommend installing/reinstalling the ADT plugin in your eclipse, makes it alot easier to create the android project.
http://developer.android.com/sdk/1.5_r2/installing.html
Also. I guess the path of the Android SDK must be setup correctly. This happened when I was overloaded with projects and I decided to create a new workspace copying some existing stuff into it.
Seems that the new workspace requires you to setup these details too once again
Is that setup properly?

Categories

Resources