2019-01-25

JDK 8u201 vs 8u202




Critical Patch Update (CPU)
XUXX[odd number] releases more stable, default option for production, unless production require patch in Patch Set Update (PSU).

eg: 8u201




Patch Set Update (PSU)
XUXX[even number] releases has more patches, but less stable than XUXX[odd number]

eg: 8u202







Reference URL: https://www.oracle.com/technetwork/java/javase/cpu-psu-explained-2331472.html

Which Java version should I choose: the CPU or the PSU?

Oracle strongly recommends that all Java SE users upgrade to the latest CPU release available for a release family. Most users should choose the CPU release.
Users should only use the corresponding PSU release if they are being impacted by one of the additional bugs fixed in that version as noted in the release notes.
The subsequent CPU release will contain all of the fixes from the current PSU. For this reason, organizations should test the current PSU in their environment in anticipation of these fixes being included in the next CPU.

What is the difference between a Java CPU and PSU release?

Java SE Critical Patch Updates (CPU) contain fixes to security vulnerabilities and critical bug fixes. Oracle strongly recommends that all Java SE users upgrade to the latest CPU releases as they are made available. Java SE CPU releases are odd numbered versions (i.e. 7u71, 7u65 – see more on Java SE version numbering schemes here).
Java SE Patch Set Updates (PSU) contain all of fixes in the corresponding CPU, as well as additional non-critical fixes. Java PSU releases should only be used if you are being impacted by one of the additional bugs fixed in that version. The release notes call out the additional fixes available in Java SE PSU releases.

Is the cadence of CPU releases changing?

As before, Java SE CPU releases are scheduled for release on the Tuesday closest to the 17th day of January, April, July and October under the normal Oracle Critical Patch Update schedule.
Starting in October 2014 with the release of Java SE 7u71 (CPU) and Java SE 7u72 (PSU), Oracle plans to additionally release a corresponding PSU release along with each CPU release for Java SE 7. PSU releases provide organizations and developers with access to non-critical fixes in addition to the critical fixes contained in the corresponding CPU.





Reference URL: https://blog.csdn.net/u014653815/article/details/80435226

JAVA版本8u201与8u202的区别





Reference URL: https://www.reddit.com/r/java/comments/8d3i9e/jdk_8u171_vs_jdk_8u172/?st=jhk8n1q9&sh=49328aa6

JDK 8u171 vs JDK 8u172





level 2
For those who are too lazy to read the article:
  • Odd-numbered releases have critical fixes only.
  • Even-numbered releases include non-critical fixes.
Oracle recommends only using the even-numbered releases "if you are being impacted by one of
the additional bugs fixed in that version." Although in my experience, it hasn't mattered much.


Theoretically, the one with critical fixes only is more stable. Upgrading from 8u151 to 8u171 has
fewer changes than 8u151 to 8u172, so there are fewer chances that things will break.
And unless you need the non-critical fixes, there's not really any benefit to upgrading, so why take the risk?
As an end user though, I haven't seen any difference. If you're not running anything super mission-critical,
it probably doesn't matter.











奇数 vs 偶数





Reference URL: https://www.shuxuele.com/numbers/even-odd.html

偶数与奇数

偶数与奇数

偶数

任何可以被 2 整除的整数就是偶数
偶数的最后一个数位是 0246 或 8
例子:−24、 0、6 和 38 都是偶数

奇数

任何不能被 2 整除的整数就是奇数
奇数的最后一个数位是 1357 或 9
例子:−3、1、7 和 35 都是奇数
每个奇数是在两个偶数中间的(当然,反之亦然。)















2019-01-24

Eclipse: java.lang.NoSuchMethodError






java.lang.NoSuchMethodError: javax.jms.Connection.createSession(ZI)Ljavax/jms/Session; at test.<packages path>.jms.QueueConnector.TestQueueConnector.testActiveMQConnectionFactory(TestQueueConnector.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)

is causing by this: http://activemq.apache.org/javalangnosuchmethoderror.html

but need to trace by using: https://billson.blogspot.com/2019/01/eclipse-check-classes-from-which-jar.html















Eclipse check classes from which jar




Reference URL:
https://dzone.com/articles/how-use-verbose-options-java


Command line, eg:
java -verbose:class -cp "abc.jar" com.test.Hello





In Eclipse, menu(in windows: File, Edit, Source, Refactor, etc...):

Run > Run Configurations.
Select correct Configuration from left panel, go to tab: (x)= Arguments
in textbox from group: VM arguments:

paste:
-verbose:class

then will get sysout in eclipse console


eg:
[Loaded org.slf4j.helpers.SubstituteLoggerFactory from file:/<maven path>/.m2/repository/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.jar]
[Loaded org.slf4j.Logger from file:/<maven path>/.m2/repository/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.jar]
[Loaded org.slf4j.helpers.NOPLoggerFactory from file:/<maven path>/.m2/repository/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.jar]
[Loaded org.slf4j.helpers.Util from file:/<maven path>/.m2/repository/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.jar]
[Loaded java.lang.SecurityException from C:\Program Files\Java\jdk1.8.0_192\jre\lib\rt.jar]
[Loaded java.util.LinkedHashSet from C:\Program Files\Java\jdk1.



Google Referrals