Error in running a plugin in imageJ - plugins

I am using imageJ (Fiji) version: 2.0.0-rc-43/1.50e
I installed a IHC_Profiler (https://sourceforge.net/projects/ihcprofiler/)
And when I run it, it shows a console with this:
Compiling 1 file in
/var/folders/k2/kdrnsbws5gz8vrt83yjmlbdm0000gn/T/java744586229414007803
/var/folders/k2/kdrnsbws5gz8vrt83yjmlbdm0000gn/T/java744586229414007803/src/main/java/IHC_Profiler.java:10: cannot access java.lang.Object
bad class file:
ZipFileIndexFileObject[/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/lib/ct.sym(META-INF/sym/rt.jar/java/lang/Object.class)]
class file has wrong version 52.0, should be 50.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
public class IHC_Profiler implements PlugIn {
When I use imageJ 1.48 version, it is okay. I wonder if this problem can be solved?

You are running Fiji with Java 8, but without the Java-8 update site enabled.
The easiest solution is to download a fresh Fiji, which comes with the Java-8 update site enabled out of the box.
See this guide for details:
http://imagej.net/2016-05-10_-_ImageJ_HOWTO_-_Java_8,_Java_6,_Java_3D

Related

The plugin `webview_flutter_android` doesn't have a main class defined

I'm installing the plugin but I'm getting this error, I couldn't find a solution on the internet
I tried other plugins and got the same error with them.
The plugin `webview_flutter_android` doesn't have a main class defined in
C:\Users\ykyaz\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\flutter\.pub-
cache\hosted\pub.dartlang.org\webview_flutter_android-
2.8.2\android\src\main\java\io\flutter\plugins\webviewflutter\WebViewFlutterPlugin.java or
C:\Users\ykyaz\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\flutter\.pub-
cache\hosted\pub.dartlang.org\webview_flutter_android-
2.8.2\android\src\main\kotlin\io\flutter\plugins\webviewflutter\WebViewFlutterPlugin.kt. This
is likely to due to an incorrect `androidPackage: io.flutter.plugins.webviewflutter` or
`mainClass` entry in the plugin's pubspec.yaml.
If you are the author of this plugin, fix the `androidPackage` entry or move the main class to
any of locations used above. Otherwise, please contact the author of this plugin and consider
using a different plugin in the meanwhile.
exit code 1

PHPUnit is Working With Command Line, but not with Eclipse

Whenever I run a test file from eclipse it works and display result as:
. 1/1 (100%)
Time: 371 ms, Memory: 8.00MB
OK (1 test, 1 assertion)
But If I run the same test from the Eclipse Oxygen, I get the error:
PHP Fatal error: Declaration of PHPUnitLogger::addFailure(Test $test, AssertionFailedError $e, $time): void must be compatible with PHPUnit\Framework\TestListener::addFailure(PHPUnit\Framework\Test $test, PHPUnit\Framework\AssertionFailedError $e, float $time): void in /tmp/phpunit_printer/PHPUnitLogger.php(415) : eval()'d code on line 1
I downloaded phpunit-7.1.phar, and installed it globally by making it executable and moving it to /usr/local/bin and for Eclipse, I have downloaed in the Download directory and without making it executable I added it into my Eclipse Project as an External Phar but it is not working and giving the above error.
Can someone help me fixing the issue?
By the way, I am a NetBeanse User, but NetBeans is not supporting PHP7.1 that's why moving to Eclipse.
UPDATE
Here is my test file:
<?php
namespace tests\Unit\;
use PHPUnit\Framework\TestCase;
class MyTest extends TestCase
{
public function testSimple() {
$this->assertEquals(1, 1);
}
}
I had exactly the same problem with PHPUnit 7.5.14 and didn't find a solution.
Since I wanted to test my application running with PHP 7.1, I decided to try PHPUnit 6 and it worked at once. So PHPUnit 6.5.14 did the trick for me.
It seems Eclipse is not compatible with PHPUnit 7. My Eclipse Version is 2018-12 (4.10.0) with PDT 6.2. After switching to PHPUnit 6 other problems (that I managed to find workarounds for) were gone too. For example the generated class code overrides TestCase::__construct without calling the parent constructor. It seems to be a problem with PHPUnit 7, not so with 6.
I didn't find a compatibility chart of Eclipse PDT to support my thesis.

Eclipse/Java9: how to access internal javafx packages?

My context:
Eclipse IDE for Java Developers, Version: Oxygen.1a Release (4.7.1a), Build id: 20171005-1200oxygen
jdk9.0.1
win10
Something simple like:
import com.sun.javafx.scene.control.LambdaMultiplePropertyChangeListenerHandler;
import javafx.application.Application;
import javafx.stage.Stage;
public class ImportCom extends Application {
#Override
public void start(Stage arg0) throws Exception {
new LambdaMultiplePropertyChangeListenerHandler();
}
}
won't compile due to
The type com.sun.javafx.scene.control.LambdaMultiplePropertyChangeListenerHandler is not accessible
What to do?
looks similar but now for internal classes ;) Had been compiling until patch 530 of the beta9 support but not after - so keeping that oldish oxygen as a gold treasure ...
Note: cross-posted to eclipse forum
Edit:
Just checked that the behavior of javac on the commandline:
C:\Users\kleopatra\ox-1a-64\dummy\src>\java\jdk\190-64\bin\javac first\ImportCom.java
first\ImportCom.java:3: error: package com.sun.javafx.scene.control is not visible
import com.sun.javafx.scene.control.LambdaMultiplePropertyChangeListenerHandler;
^
(package com.sun.javafx.scene.control is declared in module javafx.controls, which does not export it to the unnamed module)
1 error
The error is similar to the one in Eclipse. Works fine with --add-exports:
C:\Users\kleopatra\ox-1a-64\dummy\src>\java\jdk\190-64\bin\javac --add-exports=javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED first\ImportCom.java
So the question boils down to: where/how to configure Eclipse such that it compiles access to internal classes just the same way as javac?
In Project > Properties: Java Build Path, Libraries tab, select the node Modulepath/JRE System Library[JavaSE-9]/Is modular and click Edit...
In the Module Properties dialog, in the Details tab, in the Added exports section click Add... and enter the following:
Source module: javafx.controls
Package: com.sun.javafx.scene.control
Click OK twice to close the Add-exports configuration and the Module Properties dialogs and Apply and Close to close the Properties dialog
Well, it's a bit hidden:
open Java Build Path dialog of the project
select Libraries tab
select isModular entry
use the Edit... button to open the module properties dialog
select Details tab
create all required entries with the Add.. button
If you have installed the Beta plugin for Java 9 support - uninstall. Make sure the latest Java 9 support plugin is installed.
In order to solve this issue you have to add the compiler argument
--add-exports=javafx.controls/com.sun.javafx.scene.control=A‌​LL-UNNAMED.
This can be done in Eclipse too but I have to admit at a very hidden place.
Go to the properties of your project and then to the Java Build Path.
Select Modulepath and then the JRE System library (should be java 9).
Inside that you find an item "is modular". Select that. Then open "Edit"
on the right and a menu will open. At the top select "Details". There you will see a table where you can add your exports. Believe it or not but it works :-) I had to clean and re-build the project though in order to really get this compiled.

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script7.groovy: 1: unable to resolve class

I am currently receiving this error when trying to run a soapui file:
org.codehaus.groovy.control.MultipleCompilationErrorsException:
startup failed: Script7.groovy: 1: unable to resolve class com.company.ui.test.SoapUI_T11001_StockConsSecurityCurBusiDate # line 1, column 1.
import com.company.ui.test.SoapUI_T11001_StockConsSecurityCurBusiDate
^
org.codehaus.groovy.syntax.SyntaxException: unable to resolve class com.company.ui.test.SoapUI_T11001_StockConsSecurityCurBusiDate # line 1, column 1.
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.addError(ClassCodeVisitorSupport.java:148)
at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1206)
at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:148)
at org.codehaus.groovy.control.CompilationUnit$6.call(CompilationUnit.java:585)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:832)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:519)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:495)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:472)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:292)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:727)
at groovy.lang.GroovyShell.parse(GroovyShell.java:739)
at groovy.lang.GroovyShell.parse(GroovyShell.java:766)
at groovy.lang.GroovyShell.parse(GroovyShell.java:757)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.compile(SoapUIGroovyScriptEngine.java:141)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:90)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
1 error
soapUI code:
import com.company.ui.test.SoapUI_T11001_StockConsSecurityCurBusiDate
def env = testRunner.testCase.testSuite.project.getPropertyValue("env")
def baseUrl = testRunner.testCase.testSuite.project.getPropertyValue("baseUrl")
log.info("The baseurl is "+baseUrl)
log.info("The env under test is "+env)
SoapUI_T11001_StockConsSecurityCurBusiDate testStep = new SoapUI_T11001_StockConsSecurityCurBusiDate();
testStep.init(baseUrl);
testStep.execute(null);
eclipse code:
package com.company.ui.test;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import com.eviware.soapui.model.support.AbstractSubmitContext;
import com.eviware.soapui.model.testsuite.TestRunner;
public class SoapUI_T11001_StockConsSecurityCurBusiDate extends BaseSelenium{
public static void main(final String[] args){
final SoapUI_T11001_StockConsSecurityCurBusiDate ico = new SoapUI_T11001_StockConsSecurityCurBusiDate();
try{
ico.init("https://avncedevn1.nam.nsroot.net:17620/", false);
}catch(Exception e){
// TODO Auto-generated catch block
e.printStackTrace();
}
ico.execute(null);
}
//...code....
}
how do I solve this error ? I'm not sure what is causing the error.
This work for me:
Press Ctr+Alt+Shift+s
or:
From File menu -> Project Structure -> SDK Location -> JDK location Drop down menu choose:
Embeded JDK c:....\jre
Then ok.
If you using android studio and got this error then I solved it changing the Gradle version of the project to the newest version 6.2.1 on the project structure options.
One of the possible reasons is that the jdk version is too high. For example, using jdk 16 to build the source code of Apache Kafka throws this error. Using jdk 11 is fine.
bild.gradel file in change clashpath
dependencies {
classpath "com.android.tools.build:gradle:7.0.1"
}
gradel-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
I'm Using Android Studio - Arctic Fox and this worked for me
Go To File menu -> Project Structure -> SDK Location -> Gradle Setting
Then check the "Download external annotations for dependencies" button and select JDK location from the drop down menu and choose: Android Default Jdk Vesion.
Click on Ok.
If you wanted to make a new project on Android Studio after first install, probably you write your application name including (') sign as called apostrophe.
For Example, I tried to set a name as: "Henry's Game" but apostrophe caused Android Studio to not load because of this mistake:
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
So, just change your application's name, and simply use Latin alphabet languages such as English.
To fix: Go to your Android Project Tree and find Gradle Scripts > settings.gradle > change the name:
rootProject.name='Henry Game'
include ':app'
With Eclipse Juno (Kepler Release) Build id: 20121114-2344, I found similar problem:
org.codehaus.groovy.control.multiplecompilationerrorsexception startup failed unable to resolve class Chart
The class Chart is my container class for some utilities for charting.
I tried outside of Eclipse, with Groovy 2.0 Console the same code segment works fine. After scratching my head for about 3 hours, I resolved it by adding the following
import excel.Chart
in the invoking class with main() that has "new Chart()" thus getting the complaints, once added, the error is gone. Even more weird, after passing the error, I remove that import, there is still no more complaints! (All my scripts/classes are under the same package excel, I suppose such import statement is not needed.)
One of the symptom of the complaints is that there was not Chart.class generated in the output bin folder. Once the complaints gone, Chart.class appeared there.
I guess that it might be a bug of Eclipse/Groovy plugin (I use Groovy Plugin for Juno).
Hope my understanding is correct, and it helps.
The solution for me was change the gradle version and the Gradle JDK:
File > Project Structure > Project
enter image description here
File > Project Structure > SDK Location
enter image description here
Go to Files and click Invalidate caches/ Restart . Android studio will clear the cached and it will be restarted without any error.
Hope this answer helps you :)
For this problem, you might also encounter package naming from gsp as I did. In the build/gsptmp folder, Grails 4.x.x creates temporary gsp files to link the classes that they refer to. Due to the change of a package name it was failing to do so in my case. Try with command grails war --stacktrace during war build!
Previously, it was <%# page import="bv.BankReconciliationController" %>
but the folder bv was renamed to factoring.
So, the solve was to change the import to
<%# page import="factoring.BankReconciliationController" %> and it worked :)
I have also faced the same and tried all of the solution here and other places as well, at last i deleted my .gradle and gradle both folder and caches of android studio and open the studio again and rebuild the project, it's works after that fine and used the latest gradle version and previously it was picking up the older version and causing issues.
for me , solution is to upgrade the gradle to latest version , and remove the .idea file , and invalidate caches and restart android studio.
When starting a project make sure to select SDK version 11 or later. It will default to a minimum SDK but you have to scroll down to a later version for it to work. Then the project should load and build.
For me, I just delete the .grade file under program files(C:\Users\username\ .gradle) in windows and it will work.
This work for me:
From File menu -> Project Structure -> SDK Location -> klik Gradle Setting for show hide menu, Gradle JDK choose:
Embeded JDK c:....\jre
Then ok.
Do you have the grail and groovy plugin installed? If so try uninstalling this plugin. I had the same error message and uninstalling the plugin, restart IDE worked for me.

Scala project won't compile in Eclipse; "Could not find the main class."

I have installed Eclipse 3.5.2 and today's Scala plugin from /update-current (that's Scala 2.8 final.) I can compile and run Scala projects consisting of a single singleton object that implements main().
But, if a project contains more classes, I receive the "Could not find the main class" error.
I have tried searching for the solution and I discovered:
Eclipse is correctly looking for the Main$ class, not the Main class
* under Debug Configurations, my main class is correctly identified as mypackage.Main
* my plugin is up to date and recommended for my version of Eclipse
* cleaning, restarting etc. doesn't help.
The same project will compile with scalac.
Thanks for any ideas on how to solve this.
EDIT: MatthieuF suggested I should post the code.
This snippet produces an error. It's not the most idiomatic code, but I wrote it that way to test my environment. I tried it as a single file and as separate files. It DOES work with scalac.
import swing._
class HelloFrame extends Frame {
title = "First program"
contents = new Label("Hello, world!")
}
object Hello {
val frame = new HelloFrame
def main(args : Array[String]) : Unit = {
frame.visible = true
}
}
BUT, if I nest the definition of HelloFrame within Hello, it works. This snippet runs perfectly:
import swing._
object Hello {
class HelloFrame extends Frame {
title = "First program"
contents = new Label("Hello, world!")
}
val frame = new HelloFrame
def main(args : Array[String]) : Unit = {
frame.visible = true
}
}
For me, the problem was that there was a build error (see Problems tab) which was preventing compilation; oops! The reason you see the error is that the run macro proceeds despite the failed compilation step, and attempts to run class files it expects to be there; they don't exist because there was a build error preventing compilation, so it says it can't find Main (not compiled).
Problem goes away when build can complete successfully, i.e. errors are fixed.
I guess, theoretically, there may be more complicated reasons your build is not completing successfully that are not listed in Problems.
One possibility is that you are trying to launch using ctrl-F11, but from a different class.
The Scala Eclipse plugin does not obey the defaults for Java launching. In Preferences->Run/Debug->Launching, there are some options Launch Operation->Always Launch the previously selected application, etc. This currently does not work in the Scala eclipse plugin. To launch a specified main, you need to launch it from the editor for the class.
There has been a bug raised for this. http://scala-ide.assembla.com/spaces/scala-ide/tickets/1000023-scala-launch--does-not-follow-jdt-behaviour
EDIT: This is now (mostly) fixed.
For me it was Eclipse specific problem. I noticed that .class file wasn't built at all. So bin directory doesn't have compiled classes.
When I manually compiled *.scala file using *.sbt and copied it to bin directory it was working as expected.
I tried different tips and tricks and it wasn't worked until I reinstalled Scala plugin in Eclipse .
I'd solve similar problem by executig "Project->Clean.." with next automatically building.
I had the same error message with a Java application made by myself.
The problem was that I deleted (though inside Eclipse) a jar that belonged to the Java build path, without deleting it from the Java build path (project's Properties window). When I did it the class could compile and run again.
Make sure that the .class files exist, usually below the bin directory.
In particular, if you have errors in unrelated files in the same project then the compilation may fail, and no .class files will be produced.
There can be the case of projects, containing errors, added to the build path of the application which prevents the completion of successful compilation. Make sure you remove any such project from the build path before running the application.
Removing these projects solved the problem for me.
Do you have a proper build tool setup? Like sbt have you installed it?
You can check its version by $sbt --version
If it is not setup you can download from here http://www.scala-sbt.org/download.html
You might have to restart your eclipse after installation.
Just copy your XXX.scala file code. Remove the package and create a new Scala Class. Paste your XXX.scala code. (If you are using maven, do a maven clean and build.) Run configuration again. This works for me.
I have faced this issue. I have just deleted the package name, created scala class, Written the same code, Set Build to "Build Automatically". Finally, It works perfectly fine.
Check scala-ide.log
For me the issue was that there were errors on:
AppData\Local\Temp\sbt_10d322fb\xsbt\ClassName.scala:16: error: not found: value enteringPhase
enteringPhase(currentRun.flattenPhase.next) { s fullName separator }
If you are using Intellij, mark directory as source root