Mouse cursor disappearing - java

For some reason, the mouse cursor in Eclipse is disappearing.
I can see that I am able to move on the next line and it shows me via the usual color changes, but the cursor itself is not visible. When I start eclipse, I can see the cursor but once the initialization is complete, the cursor is hidden again.
The same thing happened when I switched from Eclipse Indigo to Juno and other versions. I do not know what to do.
Any pointers on what might be wrong ?

Anuj, try whether one of the following usual suspects fixes the problem :
Change to a new workspace and check whether the problem re-appears there.
If it does not re-appear, then you are dealing with a corrupt workspace. Would a whole lot be lost if you began with a new workspace ?
If it does, then it's probably a rowdy Eclipse plugin. The next logical step would be a fresh Eclipse install (I would recommend Eclipse Indigo for Java Devs downloadable from here)
If the problem persists with a brand new Eclipse + new workspace, then we'll need to widen our hunt and include OS / JDK problems. And while we are on that, which OS , JDK and Eclipse version are you using ?
Backing up a 'working' Eclipse setup
Once the problem has been fixed (for example by doing a Fresh Eclipse install) I would highly recommend backing up the following :
The Eclipse Installation directory (so that you get all the plugins you installed)
Workspace directory.
That ways you can restore a working version of your setup with minimal effort.

Related

IntelliJ IDEA 14.1.0 becomes non editable and requires restart

IntelliJ IDEA 14.1.0 (Ultimate edition)
Java 1.8, 1.6
Scala 2.11
We are working on a project which has several modules most of them are Java and one of the modules is in scala.
For some odd reason IDE becomes non editable (i.e) I can't modify any files, though I can click and navigate between files.
Its so annoying that we've to restart the whole IDE or mutilple IDEs in case we have multiple projects opened on different IDE windows.
I have seen this, I think its due to accidentally changing the edit mode,
at the bottom right corner there is a small lock icon, if you click that it will toggle readonly and editable.
For me, it was the accidentally turned on Vim emulator (found the answer here). Untick Tools -> Vim Emulator.
Here's the image from the original thread:

PhoneGap Android "Could not find *.apk" [duplicate]

I know this question has been asked before and I have seen a plethora of solutions out there, yet none seem to work for me. I was able to build my apk without issues until this error started cropping up. I have tried cleaning my project, removing it from the workspace and reimporting it, removing "Java Builder" from my Builders for the project, building the project manually, reordering my java build path. I have no visible compiler issues and no problems exist in my workspace.
I did experience this issue before and solved it once by removing the project form my workspace and re-importing it and another time I solved it by removing "Java Builder" from my java build path. None seem to work this time. I currently have most of the settings set back to default (i.e. java build is checked again).
I am running windows 7 (64 bit) and using jdk1.6.0_21 via Eclipse 3.6.
Any suggestions would be greatly appreciated as I have lost loads of development time troubleshooting this already.
[Update] My locale is English & I have tried removing the debug.keystore, United States as related to issue 834
Please follow these steps; this might help you out:
Right-click your app project and go to Properties
Select Android from left-hand side list
Uncheck the "Is Library" checkbox
If your app project relies on library projects which are in your workspace, those of course need to have the "Is Library" box checked.
deleting the R.Java file in /Gen folder did the trick for me
I tried all the above solutions. but it didn't work.
The solution was to restart eclipse !!!!!!!
hope this will help someone :)
In my case this problem started after eclipse updated the plugin with the v4.0 API release. I fixed it by going to the main preferences for Eclipse and under Android->Build uncheck 'Skip packaging and dexing until export or launch'
Note: if you eclipse gives you the Unknown Command 'crunch' error then follow this post
I've tried to gather the best of other peoples answers into a step by step list of things to try in order:
Check the project is not set as a library:
Go to Project->Properties
Select Android from left-hand side list
Uncheck the "Is Library" checkbox
Clean and rebuild the project - this should delete and recreate the entire gen folder, including the R.java file mentioned in some peoples answers
Check eclipse and all the Android plugins are up to date
Close the project, exit Eclipse, reopen eclipse, reopen the project.
Go to Java Build Path > Projects and check for any incorrect project dependencies
Go to the main preferences for Eclipse and under Android->Build uncheck 'Skip packaging and dexing until export or launch'
Check JAVA_HOME is set correctly. Follow the steps in this article
If you complete the above list, and still haven't solved the issue, please leave a comment, or if you find something else that works, feel free to edit the answer and add your thing in.
Delete the project from your workspace & import again.
This worked for me.
Can't believe similar issue has been there since 2008.
http://code.google.com/p/android/issues/detail?id=834.
i'm no expert, but eclipse on Windows, doing android apps, refuses to create the default.properties file (in the app root directory). I've just copied one from another app and it works fine. Simple contents, for Android 2.2 project it just says (ignoring comments):
target=android-8
fwiw
I was having the same issue as the OP except that all these suggestions did not work. I found a solution for me.
Make sure that "Skip packaging and dexing until export or launch." is selected.
Go to Window -> Preferences -> Android -> Build. Just make sure that option is selected and apply.
I know this does not make a lot of sense, but having it unselected was giving me this error and with it selected it goes away and the apk is installed.
I am using the auto generated ant build script from android and ONLY using it as my build process in eclipse. I am not using any other build methods.
I figured it out. I was referencing JavaSE-1.5 and using JDK 1.6. I changed it to use 1.6 and that appears to fix it.
Seems like through my research that is an overloaded error message that covers a lot of error cases.
I just fixed this by reselecting a default JRE for the execution environment (JRE6 for JavaSE-1.6 in my case). It got unchecked for some reason.
This fixed my problem. I kept getting the console error in eclipse "Could not find com_android_vending_licensing.apk" and even though it didnt seem to effect the way my app ran, it was annoying. So going into the com_android_vending_licensing project properties and unchecking the "is library" option, building the project to produce the needed apk and then going back into the com_android_vending_licensing project properties and re checking the "is library" check box fixed the problem.
Run Eclipse as "Administrator" and then import the project.
None of these things worked for me. I'm trying to access native code through the jni, first with NDK samples. What I found was the build won't run if jarlist.cache is not present in the project bin directory. If I copy one from another project to that location (may need to refresh to see the folder in Eclipse), build works every time.
Clean the project and it will do. Sometimes it happens unknowingly but keep trying to solve using diff methods.
I had somehow done a Run configuration as a Java application instead of a Android.
the problem for me was I was trying to use IBM RAD which appears to not work properly for this, I installed Eclipse and now have a different error but I should be able to get past it
On my machine (Windows7, 64bit) I could fix this by setting my execution environment to a 32bit variant of the jdk (I used 1.6.0_23). And I tried a lot of things before...
SHA1's answer did it for me: after updating to the latest sdk/adt, my project refused to build an apk; unchecking the option resolved the issue.
I don't know if the update checked this, or if it was checked before but the new adt screwed things up, but things work again now :)
In my case this worked :
Delete R.Java file in /Gen folder
+
Delete all "R.Android" imports that Eclipse added to some of my java classes !!!
and rebuild the project.
remove -- R.java -- Clean the project and run again.. this worked for me ..
Find the project's folder in your system, enter it's Properties via context menu and deselect "Read only" option. Worked in my case.
This seems to be the source of the problem in many cases, moreover some solutions up there base on copying/rewriting the files in the project what makes them non-read-only.
This is caused by JAVA_HOME not being set correctly. It can be easily resolved by following the steps in this article.
Mine was caused by this problem (incompatibility between ADT and SDK), and was fixed thus:
Eclipse > Help
Install New Software
Add 'https://dl-ssl.google.com/android/eclipse/' to 'Work With'
section and press enter
After developer tools appears on the list, check it and click Next
Restart eclipse once download is finished
I my case, I had to switch from API 21 to API 19, clean and build and everything was fine again. I am using a Mac and apparently API 21 is not fully supported on Yosemite.

Unable to run Java program in Eclipse Juno 4.2

I reinstall my Eclipse environment every year when the new version is released. The most recent release - Juno - however, does not work as expected.
Currently, when I try running demos from Oracle, for example, it asks me to select an Ant file to run before compiling. After creating a blank Ant file to bypass the requirement (which I thought was rather dumb, since I don't think TDD is something that should be forced on people), it still refused to run, saying the "Selection could not be launched."
I understand that Juno is an update from the 3.x track to the 4.x track, but this seems a little ridiculous to me. What can or should I do so I can get Eclipse back up and running again?
Just to clarify:
All files in question are on my Eclipse workspace path
I don't do much in the way of Java development, though I know I'll need to do so soon. Hence, my unfamiliarity with the most recent version of Eclipse.
I would like to run my files & projects without Ant files. I know it has something to do with Run configs, but I don't know how to change them.
Here's what I did to run the demo from Eclipse Juno:
Downloaded the project from http://docs.oracle.com/javase/tutorial/uiswing/examples/zipfiles/components-FrameDemoProject.zip (if this is not the correct demo, then please provide the link you're using)
Unzipped it to my projects directory (not my workspace), so that you have:
PROJECTS_DIR/components-FrameDemoProject/src
PROJECTS_DIR/components-FrameDemoProject/nbproject
PROJECTS_DIR/components-FrameDemoProject/build.xml
From Eclipse, File > New > Java Project
List item Uncheck Use default location and navigate to <PROJECTS_DIR>/components-FrameDemoProject
Hit Finish
Drill down to src/components/FrameDemo.java
Right-click on FrameDemo.java and select Run As > Java Application
Let me know if any of these steps give you trouble.
Take a look at you project properties and select the Builders entry. Do you see an Ant Builder entry? Try to select or create a Java Builder entry instead.
I just created a new Java Project in Juno and added the FrameDemo.java source. In my case, the Java Builder was selected as the default for this new project.

Eclipse is freezing itself before getting started

I've been trying to open Eclipse to start my work today, and it freezes everytime during load.
My Eclipse is Helios. Someone told me I should remove a file called .lock from .metadata folder, but still didn't work.
Does anyone have any idea of how do I "melt" this thing up?
ps: I opened it yesterday with no problems.
Have you already tried to start Eclipse with a -clean parameter? Sometimes this can resolve some issues..
I would suggest a (big) problem with a plugin in Eclipse.. because project plugins or runtimes will execute later.
Create a new workspace and repimport your projects from your old workspace. If you have a vcs, you can re-checkout them.
Start it with the -clean option.
It should take a bit longer (depends on your eclipse configuration and workspace, but if nothing is really broken, it will get it to work).
I believe something is wrong with your workspace. I typically remove current and create new one in such case. It usually takes up to 5 minutes (if I have to add 20 projects). In most cases it takes less.
I have experienced something similar when launching Eclipse after having to force close it for some reason.
If it always hangs when loading the SVN plugin — like in your screenshot — it is likely to be related to that. In this case I suggest the following:
back up your current workspace
launch Eclipse with the -data command line argument to specify a different workspace folder
if Eclipse starts up successfully, try to import your projects from the original workspace or even better from SVN

Attempting to export/deploy an Eclipse plugin I created, Eclipse complains of bad ANT classpath

I've developed an Eclipse (3.5) plugin for my employer (a university) using Graphical Editing Framework (GEF).
Deploying the app should be as simple as pressing the "Export Wizard" link and entering an archive name and hitting "Finish" (shown in the images below).
But then I encounter the an error dialog protesting "Could not find one or more classes: "org.apache.tools.ant.launch.AntMain". Please check the Ant classpath."
But I've looked inside the Eclipse>Preferences>Ant>Runtime>ClassPath and found everything to be in order.
What's wrong? How do I set the class path so I can deploy my plugin.
UPDATE:
I'm using Mac OSX Leopard for development.
I also correct the ANT_HOME settings in preferences>Ant>Runtime>ClassPath to /Applications/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145 as others have suggested
The Export Wizard Link http://img199.imageshack.us/img199/5766/picture4ro.png
The Export Wizard http://img134.imageshack.us/img134/9534/picture5gf.png
It does not seem to be related to eclipse 3.5 (it has been reported with eclipse3.2 or 3.1.2).
In one case, it was because the build was using:
-Djava.endorsed.dirs
which happened to point on an old Ant version.
Another said its Ant->Runtime / "Ant Home" was erroneously set to the current project dir.
setting it to /usr/share/ant makes ant work properly. (But you said that "eveything was in order" there).
A third had to manually add
/usr/lib/eclipse/plugins/org.apache.ant_1.6.5/lib/ant-launcher.jar
to the Ant classpath in the preferences to make it work.
It all boils dow to an older version of Ant being somehow referenced.
I tried for far too long to solve this problem, so I resorted to the good ol` truism, "Java hates OSX" and decided to try the whole process on Vista... and BAM! worked first time, no issues.
So, the answer to my question is "Don't use OSX, use Windows or Linux".
I'm not a jerk so I posted this platform bug in Eclipse bugzilla.
VonC was indeed awesome enough to give me really good advise and point to other bugs I couldn't find.. he deserves more votes..

Categories