We were using the Xalan 2.7.1 in our Java application which was deployed in Solaris with JDK 1.7, 32 bit. The XSL were also compiled in JDK 1.7, 32 bit.
We are parsing our XML and using the node() function in some conditions like below:
[descendant::node() != '']
But we recently moved our application to CentOS with JDK 1.8 64 bit. The XSL were compiled in JDK 1.8, 64 bit. After this migration/upgrade in production , we are now having issues with the above condition (yes, we missed to test this corner scenario in QA environment) . The above condition is always returning false.
And due to this, our XML is not getting properly parsed.
Do we know if this feature is OS/JDK dependent.
Any pointers will be extremely helpful.
Related
I am trying to create a JBoss Runtime in Eclipse. I have added 2 JRE entries in my Eclipse - one for JDK1.7 and another for 1.8.
Still Eclipse wont identify my 1.7 entry. See screenshots attached.
P.S: I got my JDK 1.7 by extracting the MSI/Exe setup file using 7 zip. I have done regular installation of Java 1.8 and My Java_Home is set to 1.8 in the PC. I don't want to modify it to point to lower version as it will impact other projects.
Your JRE definition won't be recognized as valid for the JBoss runtime if it is not a JDK. Your extraction of the JDK may have resulted in a JRE instead. Why not just run the JDK installer and change the installation folder to something other than your Program Files folder; it won't switch your system to Java 1.7 that way (I just tried this myself to check). Then define a new JRE to point to the newly installed JDK 1.7 and you'll be able to use that for the JBoss runtime.
I tried to find information about which level of JDK is recommended for Xtext. To my regret I did not found official requirements regarding JDK level. My question is which level of JDK shall be used for xtext ?
1.8 or 1.7 or 1.6
Thank you in advance
Alexander
In comparision to Java 8 Java 5 and Java 6 didn't bring real syntax extension. I don't know exactly which version is required for Xtext 2.7, but I recently read something about Xtend (which comes with Xtext). The document said that Xtend lambdas will compile to Java8 lambdas if one wants it. Otherwise it still compiles to Java 5.
From this information I would derive that Xtext needs at least Java 5.
There is no "recommended" level, use whatever makes sense for your project. Xtext 2.7 works with anything form Java 5 to Java 8.
Xtext 2.8 will require at least Java 6.
I have a question on upgrading the java applications from 32-Bit JDK to 64-Bit JDK.
Is it compatiable to be upgraded like this ?
Could a simple full compilation in 64-Bit JDK using the old java code (.java) achieve it ?
Awaiting your comments on this.
Thanks
As long as you are not using JNI or native code, you should be able to compile your java code with the 64-bit SDK without problems.
See https://stackoverflow.com/a/9411435/153424 for more information
strong texti have a very simple eclipse 3.8-based rcp application with an .aj file. i also have AJDT 2.2.1 installed, and have the following four entries in my build.properties:
javacSource=1.6
javacTarget=1.6
compilerAdapter=org.eclipse.ajdt.core.ant.AJDT_AjcCompilerAdapter
sourceFileExtensions=*.java, *.aj
i am using a headless build approach via Ant, and it has been working like a charm, AJDT and all, while using java 1.6. but once i upgraded from java 1.6 to 1.7, and changed the two aforementioned build.properties entries' -- javacSource and javacTarget -- values from 1.6 to 1.7, i got a boat-load of build errors, all with the following suffix:
... are only available if source level is 1.5 or greater
setting build.properties' javacSource back to 1.6, while leaving javacTarget at 1.7 works. or if i were to comment out the two AJDT-specific entries from my build.properties, while leaving javacSource and javacTarget values at 1.7. the build completes just fine as well. so my guess is that AJDT compiler is somehow the culprit. the question is why and what can be done to resolve it.
thank you for your time!!!
It sounds like one of two things:
Your AJDT installed does not have an AspectJ in it that is compatible with Java 1.7. What AspectJ version are you building with? Note that this aspectj version may be different from the one in your target platform.
You are not correctly specifying the Java source/target version in a way that AspectJ can recognize. How are you specifying the Java source/target version?
I'm a little bit confused about the two different versions of Eclipse - 32/64bit.
As far as I know, Java bytecode (= build of your code) is platform independend. If a user runs your bytecode in a 32bit JRE, the code is executed in as a 32bit process, if a user runs your bytecode in a 64bit JRE, the code is exectued as a 64bit process.
Eclipse needs the JRE to run, cause it's written in Java. But why are there 32 and 64bit versions of Eclipse on the Eclipse download page if only the user's JRE version does matter?
Does a 64bit Eclipse version need a 64bit JRE or JDK? If yes ,why?
Second confusion: I understand the need for a 32 and 64 bit version of the JRE. But why are there 32 and 64 bit versions of the JDK if the resulting bytecode is platform independet?
Thank you
Eclipse relies on SWT, which is essentially native code. There will be quite a few DLLs etc. exists (in the plugins or features directories) that will be used by the 64-bit version, that are drastically different from the 32-bit version.
It is not because of the running environment, it is because Eclipse uses some native stuff and must be run on corresponding JDK. The applications you are developing inside Eclipse can then be run on whatever JRE you have installed, just specify it in the settings.
JDK is a compiler and also a lot of other stuff. Many of them are native applications that need to be run corresponding platform.