I am supporting a Java 1.8 project (I know, I can see the eyes rolling)
The code base compiles using Maven with no error. Using VS Code there is an error. In order to resolved the error an import is required to access an inner class of a parent class in the current type hierarchy.
The version of Java is enforced by using the Maven Enforcer plugin. And VS Code is correctly configured also.
I think this has started to happened in the last 2 weeks, so I suspect an update to VS Code or an extension is likely to be the cause of the problem.
It was a bug in a VS Extension. (Which extension or the exact nature of the bug I am unsure. A colleague directed me to this fix.)
To get around this I added the following to the settings.json:
"java.compile.nullAnalysis.nonnull": [],
"java.compile.nullAnalysis.nullable": [],
Related
Having trouble getting a android compile of a libgdx project to see classes in a .jar file of mine.
From reading around it seems(?) all I should have to do is put them in the /libs directory and ensure the gradle build file has been set to pick them up.
This doesn't seem to be working for me.
See screenshot of mysetup:
Notes;
SSS.jar is file containing my classes
I have configured everything to use Java 1.7 (this needs to be done each gradle refresh, as gradle insists on setting it to 1.8 for some reason)
Android 4.4 for export, the device testing uses 6.0
I have refreshed/cleaned/built more times then I can count ;)
Desktop compile of the project works fine
The error I get when running as android application is as follows;
04-29 19:58:10.462: E/AndroidRuntime(9306): java.lang.NoClassDefFoundError: com.darkflame.client.semantic.SSSIndex$1
04-29 19:58:10.462: E/AndroidRuntime(9306): at com.darkflame.client.semantic.SSSIndex.<clinit>(SSSIndex.java:504)
....(can post more if needed, but I think thats the relevant bit)
(I also tried exporting a .apk and looking inside with 7zip to try to see if the SSS.jar was exported, but to be honest I don't know what I am looking at. How would I tell ?)
Any pointers on how this setup should work would be appreciated.
I have been trying to get Lucene-Appengine working for quite some time now. My latest error is
com.google.api.server.spi.SystemService invokeServiceMethod:
org.apache.lucene.store.BaseDirectory: method ()V not found
java.lang.NoSuchMethodError: org.apache.lucene.store.BaseDirectory:
method ()V not found at
com.googlecode.luceneappengine.GaeDirectory.(GaeDirectory.java:81)
Since this is likely due to library mismatch, I need some help deciding what to do.
I am using Android Studio and so I am getting the project as
compile 'com.googlecode.luceneappengine:luceneappengine:2.0.0'
However, there seems to be no such project in the compatibility matrix(bottom of page).
Will somebody please guide me? Here is my complete list of import presently. If you mean to help, please be exact in your response as to which import I should replace.
compile 'com.googlecode.luceneappengine:luceneappengine:2.0.0'
compile 'org.apache.lucene:lucene-core:5.0.0'
compile 'org.apache.lucene:lucene-analyzers-common:5.0.0'
compile 'org.apache.lucene:lucene-queries:5.0.0'
compile 'org.apache.lucene:lucene-queryparser:5.0.0'
compile 'org.slf4j:slf4j-simple:1.7.12'
You are watching the older project page, the new one is here, and now the project has been completely migrated under github, with the wiki too.
Lucene 5.0.0 is supported by luceneappengine 3.0.0. You can checkout a full lucene project example here.
I'm developing a plugin for Eclipse Juno under Mountain Lion.
I can test my plugin without problem by doing run as > Eclipse application.
However when I try to export the plugin by doing the following action it fails.
Open plugin.xml
Go to the tab Overview
Select Export Wizard
It returns the following error:
/Users/luca/Documents/University/PhD/FODA/.metadata/.plugins/org.eclipse.pde.core/temp/org.eclipse.pde.container.feature/compile.org.eclipse.pde.container.feature.xml:4: The following error occurred while executing this line:
/Users/luca/Documents/University/PhD/FODA/it.unibg.robotics.featuremodels.model/build.xml:31: /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/Classes does not exist.
The following error occurred while executing this line:
/Users/luca/Documents/University/PhD/FODA/it.unibg.robotics.featuremodels.model/build.xml:31: /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/Classes does not exist.
What's the problem?
Just ran into this problem myself today. As far as I understood, it comes from the fact that recently Apple stopped maintaining their version of Java in favor of an official version for the MacOS X from Oracle. The Oracle version, however, doesn't have the same directory structure as before, and the build script generated by Eclipse assumes the old structure.
You can see many bug reports related to this. E.g.,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=371215
https://bugs.eclipse.org/bugs/show_bug.cgi?id=378596
https://bugs.eclipse.org/bugs/show_bug.cgi?id=385077
I heard that switching to using Java 6 would solve the issue, as MacOS X still has the Apple Java 6 installation with the old directory structure. I didn't want to go back to Java 6, so I didn't try this.
Instead, I tried creating the directory that is reported missing (i.e., /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/Classes), with nothing in it. Oddly, it seems to have worked.
Let me know if it works out for you as well... Future updates of Eclipse might also fix this (I updated mine today, but the problem was still there).
This is fixed in Eclipse 3.8.2 and 4.3.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=392434
I've been using Scala 2.8RC1 and Scala Eclipse plugin for 2.8 RC1 happily for a few days. However, last night after adding a couple jar files to my environment (apache http client jars) the debugger just stopped stopping at breakpoints in scala code.
Java code stops fine at breakpoints. I tried creating a new mimimal scala app breakpoints don't stop. I've tried switching to sun-jre-1.6.0.20 from the openjdk-1.6.18 I had been using. I've switched to the scala 2.8 nightly and also eclipse plugin for scala nightly builds. No luck.
I would greatly appreciate ideas for fixes. Rather frustrating as the initial experience with 2.8 was really great.
https://www.assembla.com/spaces/scala-ide/tickets/2731-breakpoints-against-objects-in-default-package-are-not-honoured
Says that scala eclipse plugin doesn't stop at breakpoints if you're class is in the default package (no package)
Adding a package and moving my class to it - make the debugger start working again.
It's possible that you've discovered a bug in the Scala tooling for Eclipse. The best place to take the issue is the scala-ide-user list here,
http://groups.google.com/group/scala-ide-user
If you're already sure that you've found a bug you can find instructions for opening a ticket here,
http://scala-ide.assembla.com/wiki/show/scala-ide/Bug_Reporting
I've just encountered this problem. Code is not in default package. I'm getting a warning about missing line numbers, but apparently that bug has been fixed and I can ignore the warning, per https://scala-ide-portfolio.assembla.com/spaces/scala-ide/tickets/1000155-its-impossible-to-add-line-numbers-debug-info-to-compiled-project#/activity/ticket:
It did seem to stop at breakpoints in the main file, though.
Today I had a problem with my old Eclipse 3.4 installation and I had to re-download the entire package. However, I don't think that I got the exact package as before, and I'm having some problems.
The problem can be summarized as follows: when developing a plug-in, I cannot resolve dependencies towards 'org.eclipse.jdt.ui'. When trying to add the missing plugin, in the dialog the closest match is 'org.eclipse.jdt.ui**.source**'. A similar thing happens with other core plugins.
In order to test, I created a new plug-in using the wizard and I obtained a non-compiling plugin: one of the classes uses the class org.eclipse.jdt.ui.JavaUI and it cannot be resolved. Similarly, the MANIFEST.MF includes a dependency towards 'org.eclipse.jdt.ui', but the 'Bundle 'org.eclipse.jdt.ui' cannot be resolved'.
Now a summary of my platform:
I'm running Mac OS X 10.4 Tiger and Java 1.5.0_19-138
I'm running Eclipse Version: 3.4.1 Build id: M20080911-1700
I downloaded the modeling package, which comes in a file called 'eclipse-modeling-ganymede-SR1-incubation-macosx-carbon.tar.gz'
I've performed a fresh installation, in a new folder and using a new workspace.
If I look at the Plug-in Registry view, I can find the 'org.eclipse.jdt.ui' plugin in there, and it appears to be running. By the way, if it is disabled, then the workbench breaks and stops working.
I cannot understand what is happening. Is my installation broken? I wonder if the Eclipse package that I downloaded has an error and they included the sources instead of the compiled files. But in that case, the plug-in shouldn't be working in the workbench, isn't it?
In any case, why I cannot find the plug-in when I'm adding the dependencies, even if I see it in the Plug-in Registry?
Thanks for your help!
Problem solved: just restart the computer.
I don't restart my computer very frequently, so it took me a lot of time to find out that this was the solution. After I restarted it, everything started to work perfectly again. It seems that either Eclipse leaves something in the memory after running, or that some of my initial failures had left something nasty behind. In any case, I had checked and there were no Eclipse related processes running .... weird, but at least now it's fixed!