e(fx)clipse code completion isn't working - java

could you give me any advice how to fix that, please?
Recently I installed e(fx)clipse, but code completion when you type a dot, isn't working. Google didn't help.
Edit: Ctrl+Space works well, But dot with dropdown list of options is not working. (when you type a dot and see which methods can work with some instance)
Edit2: Also, when I type imports like:
import org.openqa.selenium.*; -----> autocompletion is not working here, even if I type that exactly under the line like that (in my old projects) - so it's not the issue of a project settings.
Installation details
Edit3: Content assist looks fine... but the issue still present.
Edit4: After doing this:
To clarify Alex's answer.
I had the same issue of being unable to get auto-complete with my JavaFX CSS. My fix was add the JavaFX SDK to the library list. To do that:
Go to Project | Properties
Select Java Build Path in the tree
Click on the Libraries tab
Click the Add Library... button
Choose JavaFX SDK
Click Next then Finish
Click Apply
Click OK
e(fx)clipse failed to start at all. (only splash screen appears for a milisecond)
Edit5: Java version is:
$ java -version
java version "1.8.0_71"
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
Java HotSpot(TM) Client VM (build 25.71-b15, mixed mode, sharing)
Edit6: Funny, but after I reinstalled e(fx)clipse, it still fails to start. The same issue with 1-millisecond splash screen and nothing more..
Edit7: Reinstalled JDK + several times reinstalled e(fx)clipse: 2 times version 4.5.2 and one time the version 4.6RC4a - - - in all the cases just 1-millisecond splash screen appears and nothing more... yep, and before these reinstallations I cleaned Windows registry.
Edit8: I just used Java Mission Control and recorded timeframe during which I tried to open e(fx)clipse, and I noticed this thing:
From Java Mission Control
Thanks in advance.

Related

Android studio can't find ArrayList class

First of all I've been using Android studio for quite years but this has never happened before.
It seems like android studio's inner ArrayList class has vanished out of a sudden. I can't use ArrayList. It always says Can't find symbol ArrayList
I've cleaned rebuild and even invalidated caches and restarted several times but all in vain.
package dev.moutamid.testapp;
import java.util.ArrayList; //<--- this gives error
public class FragmentDashboard extends Fragment {
private ArrayList<refUser> refUsersList = new ArrayList<>(); //<--- and this line
}
My android studio is up to date. I then opened a new project and tried to use ArrayList but it was still not showing. Feels like there's nothing related to ArrayList in studio.
Yesterday I got BSOD (Blue screen of death of Windows) and today it's happening. I'm using git repository to backup my project.
What could be the solution?
I think Git has deleted ArrayList class because it already had corrupted several files before. I got luck due to the backups.
Well this is really weird. Would suggest you to try the following:
Check the jdk in android studio and check the path. If you still facing this problem then install a fresh jdk which you download online and put in the new path and try.
If this is also not working, back up all files and reinstall Android studio. Uninstall the current copy and install a fresh one.
Well since you have had a Blue screen issue, would highly recommend to do a fresh install of windows. You haven't specified which Windows version you using so I am assuming you are using Windows 10.
This link should help you out for Windows 10 : https://support.microsoft.com/en-in/help/4000735/windows-10-reinstall
And please keep taking a backup of whatever you need regularly.
I am guessing whether this is possible:
On macOS, enter java -version in the console to check the currently installed Java version. For example, I output the following:
➜ ~ java -version java version "1.8.0_212" Java(TM) SE Runtime
Environment (build 1.8.0_212-b10) Java HotSpot(TM) 64-Bit Server VM
(build 25.212-b10, mixed mode)
Check whether the JDK location in the SDK Location in Project Struture in Android Studio is correct. For example, my address is as follows:
/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home
Or select app in Modules and set the Source/Target Compatibility of Properties to try?
I hope it helps you~

Ecilpse Oxygen.3a Java IDE cannot add window GUI via window builder error opening wizard

I try to use the Eclipse Oxygen v4.7.3a (Oxygen) Java IDE.
I try to use window builder to build a GUI application with Java, but when I try to add the window I have an error message.
I tried to google it, but I cannot even know what that message needs from me.
It says:
problem opening wizard
The selected wizard could not be started.
Plug-in org.eclipse.wb.swing was unable to load class org.eclipse.wb.internal.swing.wizards.application.NewSwingApplicationWizard.
An error occurred while automatically activating bundle org.eclipse.wb.core.java (528).
My java -version output:
OpenJDK version "10" 2018-03-20
OpenJDK Runtime Environment (build 10+46-Ubuntu-5ubuntu1)
OpenJDK 64-Bit Server VM (build 10+46-Ubuntu-5ubuntu1, mixed mode)
I had exactly the same error occur in Eclipse Oxygen.3a on my Mac with Java JDK 10 installed. There is code in WindowBuilder 1.9 that uses a Java feature that was either altered or dropped in Java 10. I was able to resolve the problem by making two changes (they assume that a Java 9 JDK is available on your system; if not, you must install it):
change the Java VM for Eclipse to one in a Java 9 JDK (using the -vm setting in eclipse.ini; see this link for a good post on how to do that)
change the JRE for the project to a Java 9 JRE
The first change is the more important one since Window Builder is a development aid running as part of Eclipse.
I made the project JRE change for my own sanity so I didn't have a mix of Java versions. You may be able to skip that change (I didn't try it).
I still have Java 10 as the default for the system, so you don't have to completely fall back to Java 9 if you install both JDKs. It may take some tweaking to get both Java 9 and 10 installed and have the one you prefer working as the system default.

Android Studio failed to load JVM on Mac OSX (Mavericks)

I am trying to setup Android Studio on my Mac. It is running OSX 10.9.1 Mavericks. I have installed the latest JDK (at the time of writing 1.7 update 45), and I installed Android Studio. I use Java 7 because I have some Java applications I have to run and they require 1.7. I have not installed Java 1.6, because it is ancient and old. Launching Android Studio from any launcher does literally nothing. Activity Manager never shows it running. I do not want to install Java 1.6.
I did some work and tried to run the executable via command line through the package contents, and for both executables, I get these messages:
I am unsure what I am supposed to do to fix this error. I'm not very adept on a Mac (still somewhat new to it, and its confusing to do power user stuff on this) so if anyone can help me figure it out that'd be great. I'm on the 2013 Macbook Air with plenty of resources for this to run.
Update: This also applies to Yosemite, El Capitan, and all the other versions of OSX that can run Android Studio.
Update 12/11/2014
As of Android Studio 1.0 RC3 you can follow this set of directions to make it work.
I figured it out. You have to edit the android studio's Info.plist file in the package so it uses 1.7. I don't get why Android Studio insists we install and use an outdated, vulnerable version of Java.
Full resolution: http://i.stack.imgur.com/yyYaG.png
To open the package you need to find the Android Studio.app file in the Applications folder and right click it > Show Package Contents.
Edit the plist (I think you might need to be root) and change JVMVersion from 1.6* to 1.7* (or 1.8*, or whatever JDK major version you have). I don't get why that made a difference since my original output said it was using 1.7 anyways.
This fix seems to apply to all of IntelliJ's IDEs (I've seen it on PyCharm as well), though other ones seem to support newer versions of java natively.
As answered by hasternet # Android Studio was unable to find a valid Jvm (Related to MAC OS)
For quick and dirty solution, Follow the answer by Mgamerz; open Android Studio in Finder (CTRL+Click > Show Package Contests > Contents > info.plist) and edit Key JVMOptions>JVMVersion from "1.6*" to "1.6+"
Recommended method as discovered by Antonio Jose is to edit environment variables in MacOS (messing with info.plist is not recommended)
either at program launch (opening the Studio through terminal rather than the icon)
$ export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk
$ open /Applications/Android\ Studio.app
or setting up the environment through AppleScript at every MacOS startup:
do shell script "launchctl setenv STUDIO_JDK /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk"
do shell script "launchctl setenv STUDIO_PROPERTIES /Users/username/Library/Preferences/AndroidStudio/idea.properties"
do shell script "launchctl setenv STUDIO_VM_OPTIONS /Users/username/Library/Preferences/AndroidStudio/studio.vmoptions"
(Remember to save the script as Application. Antonio Jose managed with just the first line - AFAIK you can use .properties and .vmoptions to set up additional settings.)
Official instructions: http://tools.android.com/tech-docs/configuration/osx-jdk
(The reason why Android Studio want's to run off of JRE 1.6 is because it apparently makes the fonts look better - feel free to go through that "official" route and install JRE 1.6 # http://support.apple.com/kb/DL1572 - you can then set the JDK to 1.8 in the SDK Location settings - local.properties)
mgamerz is right - The release notes give a much better solution for rc3 and onwards - theres a idea.properties file
(or environment variable)
~/Library/Preferences/AndroidStudio/idea.properties
it also shows what environment variables you can use to set things like the jdk
export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk
ref : http://tools.android.com/recent/androidstudio1rc3_releasecandidate3released
I did below command on Mac Terminal to fix this problem, please make sure java version and path.
$java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
$ export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk
$ open /Applications/Android\ Studio.app
Hey Friends I just Figured it out a simple way to fix this for Mac users.
Open Terminal and type this -> java -version and hit enter.
Output will be something like this:
Now check your Java Version. My Java version is 1.8
So now we need to Open Contents of our Android App.
For that right click the Android.app and then select Show Contents
Like this
Now there will be Content folder, Open that Folder and there you will find Info.plist
Open this info.plist
And you will see this.
In this expand the JVM
Here you will see the JVM version showing 1.6* but our jvm version is 1.8 (for example my jvm version is 1.8)
So we need to change this number according to our jvm version, so i changed it to version 1.8*
Then click save. And you are done.
Now you will see setup wizard running
And you are ready to start your first android programming app.
Here is the Whole Docx file for Android Studio Setup in Mac X
LINK: https://www.dropbox.com/s/9jwjebn5hgydyll/Android%20Studio%20Setup%20on%20Mac.docx?dl=0
I found that downloading an extra Java bundle from Apple fixed the issue.
If you search for this problem then I found the second link was to a blog having exactly this problem, all credit goes to him here
I know that posting links isn't an answer but as you can see from the resolution you need to make sure you have an up to date version of Java and also the Java bundle from Apple, for this reason I have also included the searches needed to get to these websites.
Here is where to download the latest version of Java
If this link is broken then searching "java latest version" return it at the top of the Google list
Here is where to download the Apple Bundle
If this link is broken then searching "Java for OS X 2014-001" returns it at the top of the Google list
For me trying to solve this problem it appears that initially it was an issue that required a work around and then Apple released an official work around download meaning that fiddling in plists is not necessary any more.

Intellij IDEA 12 slow response

I've upgraded to IDEA 12 and become frustrated with the slow response. Class navigation takes several seconds to populate the search list (previously it was instantly), any dialog relevant to file list operation hangs for minutes. Move a class to another package just hang up and I have to kill the process. Does anyone have the same experience with me?
Additional information:
I am on windows 7
I tried both 64 and 32 versions and both have the same issue
My 64bit vmoption file has the following configuration:
I have the log dir zipped and put on http://ge.tt/1JwgAnU/v/0. When I start to generating the log dir, I clean it first and then start IDEA 64 bits, open a project (automatically), then invoke File > import module command. I observed there are around a minutes delay before the dialog popped up. And inside the log dir I see a threadDumps-20130106-091041-IU-123.100 folder. However there is no exception found in the idea.log file.
Updates
A screenr showing IDEA hang up when trying to move one class to another package by drag and drop: http://www.screenr.com/zlA7
I found the problem is caused by JDK 8 ea installed in my windows 7. IDEA use exe4j to load JDK, which automatically picked up JDK 8 (See this question).
After I defined IDEA_JDK_64 environment variable and point that to my JDK 6, a high performance IDEA comes back!
I had the exact same, but solved it by changing a setting the idea64exe.vmoptions:
from...
-XX:ReservedCodeCacheSize=64m
...to...
-XX:ReservedCodeCacheSize=256m
I had this problem with RubyMine (uses the same codebase) and it was because my system had swiched to OpenJDK instead of Sun/Oracle JDK.
I see that someone had similar problems in this thread: OpenJDK or Sun Java for IntelliJ IDEA
Specifically, do you see something like the following when you start your IDE from the terminal?
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b24~pre2-1)
OpenJDK Server VM (build 20.0-b12, mixed mode)
WARNING: You are launching IDE using OpenJDK Java runtime.
THIS IS STRICTLY UNSUPPORTED DUE TO KNOWN PERFORMANCE AND GRAPHICS PROBLEMS!
NOTE: If you have both Oracle (Sun) JDK and OpenJDK installed
please validate either IDEA_JDK, JDK_HOME, or JAVA_HOME environment variable points to valid Oracle (Sun) JDK installation.
See http://ow.ly/6TuKQ for more info on switching default JDK
Press Enter to continue.
Perhaps you should check if the upgrade caused the IDE to revert to a non-Oracle JDK.
In my case it was a Findbugs plugin that caused frequent lags. You can see this if you run IDEA from the terminal and look at the log output, e.g.
No classfiles specified; output will have no warnings
After disabling the real-time Findbugs scans (Settings -> Inspections -> Findbugs IDEA) everything ran smoothly again.

Android SDK installer stuck on "Detecting whether Java SDK is installed" [duplicate]

This question already has answers here:
Android SDK installation doesn't find JDK
(46 answers)
Closed 9 years ago.
Like the title suggests - the Android SDK r20.0.1 installer won't get past the "Detecting whether Java SDK is installed" (picture below).
I'm running Windows 7 64 bit.
My steps:
installed both 32 bit and 64 bit Java SDK;
I've set my Path (from My Computer>Properties) to "C:\Program Files (x86)\Java\jdk1.7.0_05\bin", the 64 bit version of that and without the \bin at the end AND \jdk1.7.0_05\jre\bin;
I've added the Java Development Kit key to Wow6432Node;
ran the installer as admin but still, it won't detect the darn thing.
Also, I can't click back OR next OR cancel. Nothing happens when I do, just like nothing happens when I click the X. It won't even shut if I right click and close it so I have to bring out the Task Manager every time to close it.
Note - I'm not extremely tech-savvy so a step-by-step guide to whatever you want me to do (if anything) would be appreciated.
Do detect whether JDK is installed and its path is properly configured or not do the following
First see whether a java folder has been created or not in the place where installed it.
If you want to check that whether its path has been configured properly, then do this..
Go to command prompt and type the following:
java -version
If you get the output something like the below, then you are good to go, else think you have not properly configured its path. And in the output the version number will be different than its here, depending up on your JDK version.
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode, sharing)
Try to click Back button and re-clicking the install button.
This worked for me.
I actually solved this problem recently by changing the slashes to backslashes.
So instead of C:\MyJavaInstall\Java use C:/MyJavaInstall/Java
I was surprised, but this was the only thing that worked for me.
The reccomended version for Windows is the JDK 1.6 32 bit, make sure that you have installed only this one as JDK and all the environmental path are set, especially JAVA_HOME.
Developing for Android on Windows is always discouraged.

Categories