Intellij Not Using Correct Jdk

0 views
Skip to first unread message

Kum Verna

unread,
Aug 3, 2024, 5:29:12 PM8/3/24
to deichrisinte

However, I am having problems building the plugin jar using IntelliJ. When I build the jar, it does not contain the JSON folder holding the org.scijava.plugin.Plugin class. This prevents the plugin from being loaded into ImageJ/Micromanager; i.e., I start up ImageJ.exe and it will not show up in the Micromanager plugins list. I can circumvent this by starting Micromanager from IntelliJ using the correct run configuration, but the jar itself is still in the wrong format.

I'm struggling to get IntelliJ to authenticate with GitHub using the correct user. Previously, I authenticated with a different user but had to change it. Now, IntelliJ always logs in with the first user and I cannot get it to change to my new user.

In the browser, sign in with your account and then go back to IntelliJ. In the Select Subscriptions dialog box, select the subscriptions that you want to use, then select Select.

Select Http Trigger, then select Next and follow the wizard to go through all the configurations in the following pages. Confirm your project location, then select Finish. Intellj IDEA then opens your new project.

You must have the JAVA_HOME environment variable set correctly to the JDK directory that is used during code compiling using Maven. Make sure that the version of the JDK is at least as high as the Java.version setting.

Navigate to src/main/java/org/example/functions/HttpTriggerFunction.java to see the code generated. Beside line 24, you should see a green Run button. Select it and then select Run 'Functions-azur...'. You should see your function app running locally with a few logs.

You can select the function app from the previous section. To create a new one, select + on the Function line. Type in the function app name and choose the proper platform. Here, you can accept the default value. Select OK and the new function app you created is automatically selected. Select Run to deploy your functions.

Fill in the class name HttpTest and select HttpTrigger in the create function class wizard, then select OK to create. In this way, you can create new functions as you want.

Select one of your function apps using Azure Explorer in your IDEA, then right-click and select Delete. This command might take several minutes to run. When it's done, the status refreshes in Azure Explorer.

Connecting SonarLint to SonarQube or SonarCloud is the first step in setting up the Sonar Solution, to take advantage of having consistent issues reported on both sides. Setting up Connected Mode will permit the transmission of information SonarLint needs, such as URLs and user credentials or file exclusions and marked issues, to communicate with SonarQube or SonarCloud. When binding your local workspace folder to your SonarQube or SonarCloud project(s), SonarLint will try to match, as much as possible, the same rules and settings as found on the server.

While in Connected Mode, SonarLint receives notifications from SonarQube/SonarCloud about your Quality Gate changes and new issues. Smart notifications can be enabled or disabled from the UI while creating or editing the connection settings.

Having a SonarQube project (in an Active version) or a SonarCloud project is required to run SonarLint for IntelliJ in Connected Mode. In addition to the published languages on the Rules and languages page, you can unlock Scala, Swift, and PL/SQL rules when using Connected Mode.

In Connected Mode, SonarLint synchronizes some data from the issues that were found on the server, such as the issue's status and resolution. It is important that SonarLint knows on which branch the user is at that moment in order to sync the local analysis with the correct branch analyzed by the server.

SonarLint will consider all local branches that also exist on the server. For each branch, SonarLint will compute the distance between the current HEAD and the branch by the count of commits. The closest branch will be kept. In case the number of commits is the same for two or more branches and the main branch is among them, it will be preferred; else the tie will be broken with a random choice (from the list of equidistance branches).

All other cases will default to the branch marked as "main" on the server. For example, if there is an error in reading the branch, or if there is no Git repo, SonarLint will default to the main branch.

When using Connected Mode with SonarCloud, issues on short-lived branches are not synchronized. When an issue is marked in SonarCloud accepted or false positive on a short-lived branch, SonarLint will still show that issue in the IDE.

SonarLint for IntelliJ provides a connection wizard to help you set up Connected Mode with SonarQube or SonarCloud. Please see the Connected Mode setup page for detailed instructions to set up Connected Mode and bind your project.

SonarLint enables users to establish a connection to the latest SonarQube version and to the latest LTA (Long-Term Active) version. When a new LTA version is released (approximately every 18 months), we still enable connecting SonarLint to the previous LTS version for a certain period of time (currently 12 months after the latest LTS release) to allow enough time for organizations to upgrade their SonarQube version.

For more information about long-term support of SonarQube, check out our page describing "what an LTA is" and, to review IDE-specific requirements, please check the respective pages of the documentation as listed in the next paragraph.

Connected Mode allows SonarQube to send smart alerts to individuals or teams as soon as something appears on the server that something failed, when new issues are discovered or when the Sonar Quality Profile is updated, for example. With everyone in the loop, issues can be addressed promptly, improving the overall software quality and delivery. The notification will include a link to call back to SonarQube or SonarCloud where you can learn more about the issues that were introduced.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages