I am building a very simple IntelliJ plugin, and using IntellIJ CE (2019.1) as my target for build smoke-testing/debugging, deploying via the OOTB IntelliJ Plugin Run Configuration.
Whenever I perform a Run/Debug, it opens IntelliJ CE as expected (as Main java process), lets me select a project to open. Once a project is opened and the IntelliJ UI loads, I have about 5-10 seconds before the UI becomes unresponsive and I get the spinning beachball. I notice that the Main java process (which is for the CE instance), starts to gobble up memory jumping to 5-6GB over the next few seconds (on my 16GB machine). At this point, I can't do much except stopping the process.
Initially, I thought it was my code (perhaps creating an unintentional infinite loop), but I commented everything out of my plugin.xml except a fileType extension (which is basically a Bean), and it still does it. I continued my investigation by grabbing a few other IntelliJ plugin projects from GitHub, and running those (unmodified), to the same effect!! So I don't think its anything to do w/ my plugin in particular.
I've taken thread dumps of the CE process, but nothing jumps out (specifically looking for traces that contain my packages).
Lastly, I've built the plugin as a deployable Jar, and deployed it into both CE and Ultimate, and it doesn't freeze anything up. So it appears this has something to do with the Plugin deployment RunConfiguration (which I've left w/ default params).
I'm on macOS, running the latest (as of this post) IntelliJ 2019.1. I'm developing on IntelliJ Ultimate and deploying to IntelliJ CE (2019.1).
Resolution w/ screenshots based on the selected correct answer:
Create a New IntelliJ Plugin Development SDK pointing at IntelliJ CE install, and set as the Project's SDK
Create a New JDK that points to the RJDK downloaded from bintray
Assign the JDK created in step 2, as the JDK for the Puggin Development SDK created in Step 1 (via the SDKs tab)
Set the Plugin Run Configuration to use the IntelliJ CE SDK.
Run the Plugin run configuration, and CE will open with the plugin "hot deployed" to it!
Use JetBrains Runtime 8 or 11 version from https://bintray.com/jetbrains/intellij-jbr or from your main IntelliJ IDEA installation to run the sandbox IDE version. You can specify it in the JRE field of the plug-in Run/Debug configuration.
Related
I'm using IntelliJ IDEA 2017.3 and having trouble with a basic project in Grails in it - when Gradle starts syncing the project after starting up the IDE, all the checkmarks are green and labeled as "OK", my Messages tab is empty but still I get an alert on top of the editing pane reading "Gradle project sync failed. Basic functionality (e.g. editting, debugging) will not work properly".
I've tried removing the .gradle folder, the Restart and Invalidate option, giving IntelliJ a local path to Gradle as opposed to just telling it to use the default - all to no avail. I'm behind a corporate proxy but it is set up in IntelliJ so it shouldn't be blocking anything (especially since all the syncing seems to be working just fine).
What could be the problem? Versions of my stack:
Grails Version: 3.3.8
Groovy Version: 2.4.15
JVM Version: 1.8.0_181
Gradle Version: 3.5
I've tried ensuring that proxy's not the problem according to #dkb suggestion but it does not seem to be malfunctioning - I did Invalidate and Restart again and after running bootRun, Gradle correctly downloaded Apache Ant to run the application so it doesn't seem likely to be the culprit here.
IntelliJ also kept nagging me for Android SDK (who knows why but OK) which I could not install "normally" in the corporate setting but in the end I did provide it through IDEA's Settings -> System Settings -> Android SDK -> Edit and downloading some arbitrary API and the SDK tools through there so it shouldn't be the problem either (or at least I presume it shouldn't).
In line with #y.bedrov's suggestion, I am attaching the log after reproducing the issue (external link cause it exceeds SO's post character limits).
I'm running Eclipse Neon (tried with Mars too) and Liferay 6.2
I try to run the service builder but:
If I run with java 8 (unsupported, I know), it says it requires a 1.6 compliant JVM. Correct.
If I run with java 7, it says "Unsupported major.minor version 52.0". That's my nightmare.
Yes, I've cleaned everything before. In fact, I created a brand new project, in an Eclipse with only jre7 installed, pointing all to jre7 (compiler, facets...)
Eclipse is running over jre8, but can't run on jre7 because some of the plugins requires jre8. Anyway, some days ago it do worked in this Eclipse, so it's not the problem.
Service Builder might pull code from more than your Eclipse project setup - e.g. from the running Liferay installation that the plugin sdk points to.
I've not heard of a com.aspr.seu package in Liferay - is that your own, or unknown to you as well?
If service builder ran in the past (e.g. with Java 8), it created a yourprojectname-service.jar - that might be one that is pulled into the build process and that you might not have cleaned yet. You definitely have a class that was built with Java 8 on the classpath, you'll just need to find it. It might help to know that servicebuilder is executed through an Ant task outside of Eclipse, thus it might not be enough to search through all of the files that Eclipse has configured on its classpath, but rather on what's configured for the Plugins-SDK
I am trying to configure Grails in Netbeans.
Grails version:3.2
Netbeans: 8.2
JDK: 1.8
OS: Windows 10
I have install and configured environment path and other stuffs. I can create and run project from the Command Prompt. But I can not create project from netbeans.
Warning |
Unrecognized flag: non-interactive.
Error |
Specify an application name or use --inplace to create an application in the current directory
This error is showing, to create project from Netbeans. I can run the created project though. I have already added Groovy plugin.
How can I solve this problem?
I don't think you are doing anything incorrectly. I have an environment very similar to yours (Grails version: 3.3.2, Netbeans: 8.2, JDK: 8u151, OS: Windows 10) and I see the same error: Specify an application name or use --inplace...
This is a known issue with NetBeans 8.2 that has already been bug reported; see Bug 258407 - Error when creating a Grails 3.1.x project. The problem has been confirmed to exist in Grails releases 3.1.0 up to 3.1.4, but I see the same issue in 3.3.2, and there is no fix for NetBeans 8.2.
However, I successfully created a Groovy/Grails application using JDK 8u151 with a DEV release of NetBeans which you can download from here: http://bits.netbeans.org/download/trunk/nightly/latest/
Note the caveat that comes with using DEV releases of NetBeans:
These builds are still under development and could contain defects
that lead to data loss. They are meant for evaluation of new features.
As always, be sure to back up your changes if you use these builds on
your production code.
As long as you can you can live with that situation, using a DEV release is your (only) solution for creating Grails 3.x applications in NetBeans.
One final point: unlike NetBeans 8.2, DEV releases of NetBeans support Java 9 as well as Java 8, but don't use Java 9 when creating a Groovy/Grails applications. It won't work for a completely unrelated reason.
I'm using Windows 8 and Grails 3.3.8, but the following worked for me:
Create the project using system command line (I used instructions in this page: how to create grails project through windows command promt).
Import the project to Netbeans 8.2 by clicking on File > Open Project... and selecting the project folder.
This solution works for me (Mac OS)
1) Open de console inside Netbeans
2) Navigate to your GRAILS_HOME/bin
3) Type grails create-app [YOUR_NAME_APP] --profile=web (rest-api, etc)
4) The project must be created at GRAILS_HOME/bin/[YOUR_NAME_APP]
5) Do not try to import into Netbeans instead of it Open the project
6) Start coding!
You can move the folder GRAILS_HOME/bin/[YOUR_NAME_APP] to the Netbeans workspace before open the project.
FYI, I am using netbeans 9 and grails 3.3.8 (dont use 3.3.9, its broken), and it works like a dream. I can create domain classes etc. from the menus in netbeans, run, debug etc. THe only thing I had to do was manually install the grails plugin for netbeans, and configure my grails paths etc. The answer on how to set this up is here: how to open a grails 3.3 app in netbeans 9?
The only thing I cant get to work (and its a bit of a show stopper), is multi-module projects (i.e. a grails app which depends on a grails plugin). I can run them, but netbeans does not recognise any of the imports so there is no code completion and it shows all files are having errors. What a shame, as appart from this, netbeans has very good grails support.
Note, I always create projects on the command line, e.g. "grails create-app myapp ...", then simply use the open project menu in netbeans and it instantly recognises them as grails.
Ensure you have gradle plugin installed for netbeans. Then go to File -> Open Project.
You should see the project shown by netbeans as a gradle project.
I am using IntelliJ version 14.1.4 on Windows 7 64bit with oracle JDK 1.8.45.
When I change a method logic etc and click on "reload changed classes" from run menu, I get following error-
I've tried running IntelliJ as admin also, invalidating cache but that doesn't seem to help.
Note that I am using Jetty maven plugin to run my web application.
As suggested by #HeathMalmstrom, Jetty maven plugin doesn't play nice when trying to reload changed classes. What I did was instead of using Jetty maven plugin, I wrote a class with a main method which embeds Jetty; now I run this class under debugger and everything works fine.
I would like to install both the Google-Eclipse plugin (which I believe also install the GAE SDK) for my Eclipse instance, so that I may take advantage of a lot of the IDE tools and features it comes with, and also so that I can run my app from inside Eclipse.
I would also like to install just the pure GAE SDK so that I can run my app outside of Eclipse on my regular system.
Because the GAE SDK is a diverse and complex beast, I am worried about having two instances of the GAE SDK installed on the same machine (setting conflicting ENV VARs, trying to open the same port number, etc.).
Obviously, I would take care to never be running the 2 GAE dev servers (1 that ships with the Eclipse plugin, and the other that ships with the pure SDK) at the same time, but that might not guarantee that I have 0 conflicts.
I would also be fine with just installing the Eclipse plugin if there was a way to configure the GAE SDK that it ships with to run both from Eclipse as well as the bash shell. That would probably be the easiest but I don't believe this is possible to do.
Any thoughts as to what my options are here? Thanks in advance!
You can do that by having a single SDK installed and using it for both Eclipse and also for bash shell.You can do that by following the steps below:
Download a Suitable GAE SDK from here and install it.
Open Eclipse and Select Help->Install new software.
In work with box enter the url as http://dl.google.com/eclipse/plugin/4.2 and from the list of available softwares select only "Google Plugin for Eclipse" software and select any other required plugin but not the SDKs. Keep it unchecked!
After installing the selected plugins, in Window->Preferences->Google->AppEngine click on add and then select the installation directory as the directory from step 1 and give a suitable name. Make it as default.
Now you are good to go.If you need to run from shell, invoke dev_appserver from the installation directory. Or if you want to run from from eclipse just run it from there.