Delete "Project SDK" configuration in IntelliJ - java

Here is a screenshot of IntelliJ 2017.3.3 "New Project" dialog box.
Note how the Project SDK popup shows in red text an older release of Java 9 that I physically deleted from my Mac (from the /Library/Java/JavaVirtualMachines folder).
⇒ How do I delete that particular "Project SDK" setting within IntelliJ?
Clicking the "New" button in the upper-right of that dialog lets me add another JVM but does not allow me to delete.

Select Project Structure from the File menu.
Click SDKs in the left column and select the SDK you want to remove.
Click the Delete icon (the minus sign).
Click Apply (essential!) then OK to close the Project Structure window.
I just tried this in 2017.3.3 and it worked fine. The JetBrains documentation states that you can also click Alt+DELETE instead of clicking the Delete icon, but that didn't work for me.
Here's the screen:
To be clear, this action means that the SDK you just removed will no longer be available when you try to create a new project; that SDK will have to be added again on an individual project basis if needed.

Related

I don't get importing Maven Project options

I am new to Java
I have been trying to compile my open source application
with provided steps
Import Project from Maven
1. Start IntelliJ IDEa.
2. In the "Quick Start" menu, select "Import Project".
This will open a "Select File or Directory to Import" dialog.
3. Browse to your local cTakes repository root directory and select the pom.xml file.
4. Click "Ok".
This will open an "Import Project from Maven" dialog.
5. Make sure the "Search for projects recursively" box is selected, just in case any cTakes modules are not in the pom.
6. Make sure that "Create IntelliJ IDEa modules for aggregator projects" is not selected.
If you plan to add new module, 'disable' a present cTakes module or make other changes to the main pom.xml, check the "Import Maven projects automatically" box.
See also: http://www.jetbrains.com/idea/webhelp/maven-importing.html
7. Make sure that "Create module rgoups for multi-module Maven projects" is not selected.
8. Make sure that "Keep source and test folders on reimport is selected.
9. Make sure that "Exclude build directory (%PROJECT_ROOT%/target)" is selected.
10. Make sure that "Use Maven output directories" is selected.
11. Make sure that the "Generated sources folders" option "Detect automatically" is selected.
12. For the "Phase to be used for folders update" the default option "process-resources" should be fine.
13. For the "Automatically download" options, you may select what you like, but be wary that if broken code has been checked in you may need to revert manually.
14. The default "Dependency types" are fine.
15. Click "Environment settings...".
This will open a dialog that can be used to set options about the Maven environment.
16. The default maven environment settings should be fine. If $M2_HOME is not set in your environment you may select a "Maven home directory", but it is better to set $M2_HOME in your environment.
17. Click "Next".
This will inspect the cTakes Maven settings and search for profiles. It should display a dialog with the possible cTakes profiles.
If you plan to run the UIMA CVD or CPE then select the appropriate profile. Neither is necessary
18. Click "Next".
This will open an "Import" dialog with the current version of cTakes displayed.
19. Click "Next".
This will open a dialog allowing you to select a Java SDK version.
20. Click the "+" button in the top left.
This will display a drop-down box with options for an SDK.
21. Select "JDK".
This will open a dialog to select a Java JDK directory.
22. Navigate to a directory with a JDK version 1.8 or later and click "Ok".
This will display a listing of the file paths associated with the selected JDK.
23. Click "Next".
24. Click "Ok/Next"
The project will load. This may take a while.
25. Important: If you are asked about adding any .iml files to svn, click "No".
26. You should now see the full cTakes project structure in IntelliJ.
I get everything up to step 4
but step 5 does not exist in my case
I mean in step 5
5. Make sure the "Search for projects recursively" box is selected, just in case any cTakes modules are not in the pom.
There are no options I get, it immediately takes me to the IntelliJ project
I get this screen
after I ckick finish , it takes me to this
Am I using older version? or doing something wrong?
How to get the Maven options as the instructions suggested?
It appears that you're in a unique position where the import and the recursive scanning of projects has Just Worked™ for your use case.
Given that IntelliJ IDEA 2019.3 came out at the end of November 2019 and I'm not reasonably convinced that those instructions were written or revised between the end of November and now, it could easily be the case that the instructions you've seen are out of date.
The big thing to be sure of is that your subprojects also build. On the right-hand side there, you have a list of Maven projects. Any one of those should be subprojects. Be sure that any Maven build command (e.g. mvn clean install) executes in the context of that subproject.

how to view Netbeans 8.2 java library coding

I had install netbeans 8.2 version the problem is for example imagine that we have cord like
String name = "thilina";
when I press ctrl+ mouse click on String word it will view a String class but, codes in side the functions not showing instead of code it shows enter image description here// compiled code like fallowing image
You just need to add the Sources for your JDK 8 entry in NetBeans:
Select Tools > Java Platforms to open the Java Platform Manager window, then select the entry in the Platforms panel for JDK 1.8.
Click the Sources tab, then click the Add JAR/folder... button.
Navigate to your installation directory for JDK 8, select the file named src.zip, then click the Add JAR/Folder button.
This should create an entry in the Platform Sources panel:
Click the Close button to close the Java Platform Manager window.
Now if you press ctrl + Mouse click on String in your source you should see the source code for String.java.

How to change popup in Eclipse?

I am new to using Eclipse (I just downloaded it).
I began creating a new project, wrote some code, added some packages and classes and closed the project.
Now, I opened it again and I'd like to add a class to a package. So I right-click on that package and the standard popup window appears. But when I now hover over "New ->", there are only three options: "Project", "Example" and "Other". The first time I worked on the project, there were many more options, f.ex. I was able to click on "Class" direct. Right now, I have to select "Other", type "Class" into another window and click "Ok".
Is there any switch or so in the settings that I accidentally enabled that changes the default right-click popup?
I added an image.
Thank you for help!
It seems you are not in the Java perspective: Window > Perspective > Open Perspective > Java

Note: An exception occurred while getting the Javadoc. See log for details.-eclipse

I added java doc location for the SWT (org.eclipse.swt.gtk.linux.x86_64_3.102.1.v20140206-1358.jar) as "http://help.eclipse.org/stable/nftopic/org.eclipse.platform.doc.isv/reference/api/" but after that, when I move the mouse pointer to a SWT class name or method name on the editor, it popups above message. How to solve that and get the actual java doc details.
In Eclipse do the following:
Go to Windows -> Preferences.
Click Installed JREs.
Click Add.
Select Standard VM.
Click Next.
Click Directory
Choose your Sun JDK folder.
Click Finish.
Tick your Sun JDK folder from the list.
Click OK.
Restart Eclipse.
Problem solved!

Src empty, MainActivity doesn't generate

Then i have installed all file of SDK and i have created the New Android Application Project, I saw the src is empty, so there wasn't the MainActivity and a lot of file like the apk or ActivityMain.
I cleaned a lot of time the project and "Build automatically" is flagged.
Eclipse doesn't "run" the apk because there isn't...
Anyone know what the problem could be?
You might have unchecked the "Create activity" box in the New Android Application Project wizard. To generate a new Activity, right click the project and press "New" -> "Other" -> Expand "Android" -> "Android Activity". Now a wizard for creating an Activity should appear.
Whenever you build your project after that, an .apk file should be created.
Try updating.
Click "Help" -> "Install new software" and install from https://dl-ssl.google.com/android/eclipse/
I had the same issue before. It seems that the version I downloaded was not up to date.
I was also facing this problem, but i figured out. I choosed Empty Activity in step 6 instead of Blank Activity, rest of steps are same as yours.
1. New Android Application Project
2. Selected API 19 4.4 KitKat for Minimum, target and compile with SDK.
3. Theme Holo Light
4. Uncheck create custom launcher
5. Make sure create activity IS checked, everything else left alone
6. Create activity checked on next screen and selected Empty Activity
7. Activity Name and Layout Name left as defaults.
8. Click finish..
I hope this will work for you too.

Categories

Resources