how does Eclipse's JRE selector work? - eclipse-neon

I would like to know the effect of this Eclipse (Neon) Preferences dialog. I assume the purpose is to determine the JRE employed when bytecode is invoked from Eclipse and that this selection has no effect at all on compilation which is performed by the Eclipse Compiler for Java (ECJ) built-in. In other words, the selection has no effect on the bytecode produced.
I happen to have Oracle's JDK 1.8.0 112 installed and Eclipse is showing it in the dialog. If I do not select it (via the checkbox) will Eclipse use it anyway because Eclipse lacks its own JRE, despite having its own compiler, and because Oracle's is the only one listed in the dialog?
Is this interpretation correct?
Note: I've been using this somewhat fresh installation of Oracle JDK and Eclipse Neon without incident for a few weeks (invoking Java programs both inside and outside of Eclipse) and only now have I considered this preferences dialog.

Related

Gradle compatibility between Android Studio 4.0.1 and IntelliJ 2020.2 IDE

Just an observation that AS4.0.1 no longer clobbers IntelliJ (2020.2) initiated project settings any more, and merely complains of 'unsupported Modules' being detected(Note *).
Is this the beginning of Détente with peaceful co-existence (I wouldn't want to be unhappily surprised in future)?
Just to give specific context, here is what I refer to: (both reject the last configuration - a failed hack) and utilise their preferred first or second one respectively: This is a GOOD thing)
From IDEA 2020.2:
Unsupported Modules Detected: Compilation is not supported for following modules: CalibSense.app.
Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project.
The IDE modules below were removed by the Gradle project reload:
app
You can open DIALOG to select the ones you need to restore.
DIALOG LIST:
Android App:
[x]app
[v]Badroid.CalibSense.app (level: WORKSPACE)
[x]CalibSense.app (level: WORKSPACE)
From AndroidStudio 4.0.1(somewhere between IDEA 2019.2 and 2019.3):
Unsupported Modules Detected: Compilation is not supported for following modules: CalibSense.app.
Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project.
DIALOG LIST:
Android App:
[v]app
[x]Badroid.CalibSense.app (level: WORKSPACE)
[x]CalibSense.app (level: WORKSPACE)
Suggested Update AS 4.1 (including - All improvements from IntelliJ IDEA 2020.1.4)
Note *: It turns out they both complain of an illegal configuration, not of each others working configuration.
Nope.
The problem is in a different version of the IntelliJ Platform. Android Studio and IntelliJ Idea is developing separately because it's different products of different companies.
Google adopts the IntelliJ Platform in Android Studio - so we can think about it as about hacked IDEA.
So usually backward compatibility exists - it means that I can open in a new version of IntelliJ IDEA my older projects, but not vice versa.
So if look at AS 4.0 release notes we can mention that it is based on IntelliJ IDEA 2019.3.3 (https://developer.android.com/studio/releases#4.0-idea-2019-3-3). But your try to open a project of newer version IntelliJ Platform (2020.2). So it fails because your try to open a newer project version (2020.2) by old IDEA (2019.3.3)
But you can without issues open a project of AS 4.0 with IDEA 2020.2 - it will simply convert older project layout to new.

Netbeans 11 Gradle Project does not run gradle on save

I have just installed Netbeans 11.1 and when I save one of my Java files, Netbeans does not start a gradle build automatically. This used to work in Netbeans 8.2.
I have installed nb-javac and have also tried the newest Beta version to no avail.
Is this a known bug or do I need to reconfigure something when going from NB 8.2 to 11.1?
(This is only an explanation rather than a solution to your problem.)
First, Compile on Save is an option which is set or unset at the individual project level, rather than at the global level. So for a NetBeans Gradle project, select Properties > Build > Compile to view the setting for the Compile on Save checkbox. For that checkbox, note that:
It is unchecked by default, so there will not be an automatic Gradle build when you save a project file.
It is disabled, so you cannot trigger a build whenever you save a project file.
The problem persists in the latest beta of NetBeans 11.2.
I don't see a bug report for this issue, so perhaps you can raise one? Click the Log In button to sign up first if necessary.
That said, there is a related issue which may explain why the check box cannot be enabled. See closed bug NETBEANS-680 Erroneous Gradle Compile-on-Save activity which relates to Gradle projects using version 9.0 of NetBeans. Apparently there were spurious and unwanted compile-on-save runs being triggered even though Compile on Save was unchecked. Perhaps the feature has been deliberately disabled for Gradle projects because of that issue, though that is just speculation on my part.
Also see the GitHub page for the Gradle plugin. Comments from the NetBeans team for NETBEANS-680 suggest that the problem was with the plugin rather than NetBeans. That said, if NetBeans is offering functionality that cannot be enabled (i.e Compile on Save), it is definitely a NetBeans issue regardless of the underlying cause.
Finally, note that you can configure the Gradle plugin using Tools > Options > Java > Gradle, but I dodn't see any options there that would help with this issue.

OSGI plugin development with Domino Designer 10

Up to date I was using IBM Domino Designer V9.0.1 FP8 to develop an OSGI plugin. With this version everything was working as intended. I've created a plugin project, a feature project and an update site project. Selecting "Build all" in the update site project created all the the corresponding jar files.
Today I've installed IBM (HCL) Domino Desinger V10 FP2 (fresh install i.e. I've deinstalled V9.0.1 and deleted the old "workspace" directory in NotesData, but I kept the NotesData itself).
Now if I open my plugin projects, I can edit the plugin, save the Java classes without any errors. Up to this point everything is working as usual. But now, if I use "Build all" in the update site project I see a screen with "generating ant script" and then the build process is finished, but no jar files are generated.
Any ideas why this is happening? Am I missing some files? Am I missing some configurations?
BTW: if I use standard eclipse to build the plugin all jar files are generated.
Domino Designer is a customised version of Eclipse. 9.0.1 FP9 and lower is a very old version of Eclipse, 9.0.1 FP10+ is a much newer version, so not comparable to what was happening before. It's possible there are differences in the customisation of Eclipse that are affecting it. But every Domino OSGi plugin developer I'm aware of uses standard Eclipse.
Follow the steps for setting up your environment here https://github.com/OpenNTF/XPagesExtensionLibrary/wiki/Development-Environment. In the documentation there I've tried to document why steps are done and what they achieve, as well as just the steps themselves. The intention is to pass on understanding to a broader set of developers, for future proofing.

How can I debug a GWT project in Netbeans

I am developing a GWT project with Netbeans. When I debug it I always get the screen saying "Development Mode requires the GWT Developer Plugin". The problem is that my version of firefox is too recent to run that plugin. So what can I do?
Update to GWT 2.7, DevMode no longer requires a browser plugin (uses so-called "super dev mode" instead; where you debug in the browser rather than the IDE)
There's documentation for using the GWT Hosted Mode debugging in Netbeans, but you should be better able to use the newer GWT Super Dev Mode. To be able to set breakpoints in Netbeans though, you'd need to properly configure the source map support in Netbeans to map between the compiled JavaScript and the source Java files. I wasn't able to find an obvious reference for doing that with Netbeans.
The fun thing was that gwtproject.org made the sourcemaps part of the released site, and there was a tutorial to using them against their site to step you through how to setup your IDE... But again I didn't find that for Netbeans... Here's an example java source that's linked from gwtproject.org's JavaScript sourcemaps:
http://www.gwtproject.org/src/com/google/gwt/site/webapp/client/GWTProjectEntryPoint.java

Intellij Doesn't Honor maven-compiler-plugin

I have 3 JDK's installed on my computer and Intellij knows about all 3 (6, 7, & 8)
Most projects I work on need 6 but a few need 7 or 8 (we are slowly moving everything to 8)
Maven supports this just fine with the maven-compiler-plugin configured just like here:
http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html
This works fine from the command line. However Intellij doesn't listen to that plug in and seems to use what it thinks is right. (by default it always goes with Java 8 because it's the last in the list I think)
Is there a way to force Intellijs compiler to use the plug-in? Or a way for everyone to share that configuration across machines and developers?
A few things might be happening, but IDEA should honor the maven-compiler-plugin settings. Have you re-imported your Maven project?
1.) Check to see if the language level settings are in sync, if you open up the Project Structure window (Ctrl+Alt+Shift+S) do the project AND module's language level mirror the Maven compiler's version?
2.) Now check your Run Configuration, hit Ctrl+Alt+A and type "Edit Configurations".
3.) Add a new Maven Configuration with the desired lifecycle phase, then open up the runner tab and deselect "Use project settings". Select your JDK from the dropdown.
4.) Click OK and hit Shift+F10 to run that new Maven Configuration. Does it work as expected?

Resources