I have checked the above option in Windows > Preferences > Compiler.
Earlier it was working fine(I was trying to get the method's formal parameter name ) but now it is not working.
I am using eclipse Mars and JDK 1.8.0_60
Related
I am using the following code to list the clients connected to my ESP8266 access point.
cfg={}
cfg.ssid="ESP8266_";
cfg.pwd="12345678"
wifi.ap.config(cfg)
cfg={}
cfg.ip="192.168.1.1";
cfg.netmask="255.255.255.0";
cfg.gateway="192.168.1.1";
wifi.ap.setip(cfg);
wifi.setmode(wifi.SOFTAP)
table={}
table=wifi.ap.getclient()
for mac,ip in pairs(table) do
print(mac,ip)
end
But it's returning me an error:
attempt to call field 'getclient' (a nil value)
Based on your latest comment the solution is simple: you need an up-to-date firmware.
All the pre-built binaries you can download from GitHub are hopelessly outdated and no longer maintained or supported. Do NOT use them.
The current master branch is based on Espressif SDK 1.4 and the dev branch uses 1.5.1. However, the NodeMCU team does no longer provide recent pre-built binaries. You need to build the firmware yourself. Fortunately that is simple and well documented: http://nodemcu.readthedocs.org/en/dev/en/build/.
The easiest option is to use my NodeMCU custom build service in the cloud.
I downloaded and installed the Delphi 10 trial. However, every time I try to build anything at all, I get this: MSBuildToolsPath is not specified for the ToolsVersion "12.0" defined at "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\12.0", or the value specified evaluated to the empty string
The 12.0 key does not exist within "ToolsVersions" on my pc. I do however have 2.0, 3.5, 4.0 and 14.0. I also have a full, perfectly-working installation of Visual Studio 2015 Community, if that knowledge helps. I am running Windows 10 Pro, 64-Bit. What can I do to correct this issue? It's the first time I've ever had a problem with any version of Delphi/RAD Studio... was actually not aware the Rad Studio IDE cared about or used or had anything to do with MSBuild until now.
It is a known issue, documented here:
https://community.embarcadero.com/article/technical-articles/16202-msbuildtoolspath-is-not-specified-for-the-toolsversion
This error is caused by incorrect values in the registry. On a 32 OS, run regedit and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild. On a 64 bit OS, run regedit and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild. First, backup this registry key by selecting File | Export. Next, look at the numbers below the ToolsVersions key. Delete any number not found at the MSBuild level.
...
There is anecdotal evidence to suggest this registry key imbalance is caused by uninstalling some versions of Visual Studio, but it has not been confirmed at this time.
Since I've been installing/uninstalling various Visual Studio versions (including previews), guess it has indeed been caused by that
Error "A default tools version "2.0" was specified, but its definition could not be found." may appear then if you deleted the 2.0 key following the 1st article's advice. Solution for that one is to edit each value under MSBuild key in the registry locations mentioned for x32 and x64 and change DefaultToolsVersion to 14.0 or other highest MSBuild tools version that is installed
Note that on x64 machine you need to fix these two issues for both x32 and x64 registry locations, since the IDE is 32-bit process and if you fix x64 location only it will fail internally, underlining all Standard units at uses clause in your source code and showing “Cannot resolve unit name xx”
Also it may be useful to install this:
https://www.microsoft.com/en-us/download/confirmation.aspx?id=48159
This may also be useful to know (copying from https://msdn.microsoft.com/en-us/library/bb383985.aspx):
Order of Precedence
The order of precedence, from highest to lowest, used to determine the ToolsVersion is:
The ToolsVersion attribute on the MSBuild task used to build the project, if any.
The /toolsversion (or /tv) switch that's used in the msbuild.exe command, if any.
If the environment variable MSBUILDTREATALLTOOLSVERSIONSASCURRENT is set, then use the current ToolsVersion.
If the environment variable MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT is set and the ToolsVersion defined in the project file is greater than the current ToolsVersion, use the current ToolsVersion.
If the environment variable MSBUILDLEGACYDEFAULTTOOLSVERSION is set, or if ToolsVersion is not set, then the following steps are used:
The ToolsVersion attribute of the Project element of the project file. If this attribute doesn’t exist, it is assumed to be the current version.
The default tools version in the MSBuild.exe.config file.
The default tools version in the registry. For more information, see Standard and Custom Toolset Configurations.
If the environment variable MSBUILDLEGACYDEFAULTTOOLSVERSION is not set, then the following steps are used:
If the environment variable MSBUILDDEFAULTTOOLSVERSION is set to a ToolsVersion that exists, use it.
If DefaultOverrideToolsVersion is set in MSBuild.exe.config, use it.
If DefaultOverrideToolsVersion is set in the registry, use it.
Otherwise, use the current ToolsVersion.
I resolve my problem in delphi that need the Msbuild 14, i just download and install the msbuild that match my error message, in my case:
https://www.microsoft.com/en-us/download/details.aspx?id=48159
i think that you could download the msbuild from microsoft site to see if it works.
Is it possible to parse Java files that are external to the eclipse environment? I have only realised operations related to obtaining an AST(s) from Eclipse file (or projects).
Does the current version of Rascal support Java 8?
Yes to the first question:
you could use lang::java::m3::Core::createM3FromDirectory, or read its definition and make your own version.
this code uses setEnvironmentOptions to the JDT's Java compiler for controlling the classpath and the sourcepath of the compiler.
there is no dependency on Eclipse as a whole
To the second question:
No: the current stable release is pre Java 8
Yes: the current unstable release should work for Java 8. There are no specific tests for this yet, so you may be in for some early adopter surprises.
I had an Ant build file working fine on Worklight v5.0.6. On porting to Worklight v6.0 I found out that there's a new mandatory attribute, worklightserverhost, for the app-builder task.
<app-builder
applicationFolder="path/to/proj"
environments="mobilewebapp,android,iphone"
nativeProjectPrefix="myproj"
worklightserverhost="?Here?"
outputFolder="where/to/put/it"/>
I can find no documentation of the value to put here or its significance; my guess is that it is supposed to be the value that was formerly in application-descriptor.xml and is now taken from worklight.properties when building in Worklight Studio, and hence it's not just the host but also the port and context root. Is that right?
This attribute is now required due to, as you mentioned, the removal of worklightServerRootURL from application-descriptor.xml. So if you're using the app-builder Ant task you need to specify the host, port and context-root.
For example: worklightserverhost="http://9.148.22.4:10080/testProject"
Does this work for you?
I will open a documentation defect about the missing information; it seems more like the article(s) about the Ant task in 6.0 have not been updated in the IBM Worklight Information Center (adapters, apps).
When i compiled my application in blackberry it shows the following error.
generics are not supported in -source 1.3
(use -source 5 or higher to enable generics)
how to solve this
Java 1.3 is barbaric and no one should ever have to suffer its indignities. Fortunately, there is a solution!
Generics, enums, changing return signature in overrides, and pretty much everything that makes java usable was introduced in java 1.5. (see http://en.wikipedia.org/wiki/Java_version_history). Fortunately, most of java 1.5 was designed to be backwards compatible and not require JVM / bytecode changes. (or maybe this was unfortunate, as it lead Java's implementation of generics to be much weaker than C#. just try creating a generic class with static methods / fields that use the generic parameter)
This IBM article does a good job of explaining the background:
http://www.ibm.com/developerworks/java/library/j-jtp02277.html
But this JVM similarity allowed for creation of tools such as:
http://retrotranslator.sourceforge.net/
This is the section from my Ant buildfile that calls retrotranslator:
< java jar="${transformer.jar.exe}"
fork="true"
classpath="${epic-framework.dir}/tools/retrotranslator-runtime13-1.2.9.jar:${epic-framework.dir}/tools/retrotranslator-runtime-1.2.9.jar"
args="-srcjar ${build.dir}/classes5.jar -target 1.3 -destjar ${build.dir}/classes5to3.jar"
/>
Run the converted jar through preverify.exe and then give it to rapc.exe and you will have a working Blackberry app written with Java 1.5.
Edit: I missed a key detail in my original post. In addition to being Java 1.3, the Blackberry class hierarchy is missing many classes that would normally be a part of a Java SE 1.3 JDK. The one you will hit first is StringBuilder -- javac transforms ("string" + "otherstr" + "blah blah") into StringBuilder.append("string").append("otherstr").append("blah blah"). That class doesn't exist on BB, so you break. However, BB has StringBuffer, so writing an adapter between the two is pretty easy. The one catch is that BB disallows apps from adding classes into java.*. This can be very effectively fixed in the build process: 1) build your app against Java 1.5 w/ java.lang.StringBuilder on the classpath, 2) string transform java.lang.Stringbuilder (and everything else in your compat shim) to live in com.mycorp.java.lang.StringBuilder and build it into a JAR file. 3) Use that JAR file w/ retrotranslator and retrotranslator will update all bytecode references to java.lang.StringBuilder so that they now point to com.mycorp.java.lang.StringBuilder. Now you have a java 1.3 compatible bytecode that can be run on a Blackberry.
If anyone is interested in this stuff, contact me. I could look into open sourcing the compat library I have.
This is a limitation of J2ME, which uses a subset of the J2SE (no collections, reflection, etc.) and a Java language level of 1.3. Any code written for J2SE will most likely need to be manually ported.
It seems the JDK5 is not yet supported.
Same question was asked on the blackberrry forum but about enum support:
Sadly, the BlackBerry api is very behind in terms of Java versioning. There's no Generics, no Maps, no Enums - it's based around JDK 1.3.
I believe there is no way of enabling this feature within your BlackBerry app. If you find one, I'd be very interested to hear about it.