IBM vs Oracle/Sun JDK, java.util.Timzone behaving differently ,
IBM JDK 1.5 vs Sun/Oracle JDK 1.6
import java.util.*;
class TimeTest {
public static void main(String args[]){
long now = System.currentTimeMillis();
System.out.println("EST : " + TimeZone.getTimeZone("EST").getOffset(now));
System.out.println("US/Eastern : " + TimeZone.getTimeZone("US/Eastern").getOffset(now));
}
}
***IBM JVM ouput
EST : -14400000
US/Eastern : -14400000
Oracle JVM
EST : -18000000
US/Eastern : -14400000
IBM JDK
java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pxi32devifx-20090811 (SR10 +IZ56666+IZ56751))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20090707 (JIT enabled)
J9VM - 20090706_38445_lHdSMr
JIT - 20090623_1334_r8
GC - 200906_09)
JCL - 20090811
Oracle JDK
java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)
update , tested with IBM JDK 6 , it matches the ouput of oracle/sun
java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pxi3260sr6ifix-20091015_01(SR6+152211+155930+156106))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260sr6-20091001_43491 (JIT enabled, AOT enabled)
J9VM - 20091001_043491
JIT - r9_20090902_1330ifx1
GC - 20090817_AA)
JCL - 20091006_01
java TimeTest
EST : -18000000
US/Eastern : -14400000***
IBM tells us the answer:
In 2006, the meaning of the EST time zone identifier changed in the Olson database. Historically, EST referred to the American Eastern Standard Time and made adjustments for daylight saving time. Following the change, EST refers to Eastern Standard Time with no adjustment for daylight saving time. A new identifier EST5EDT was also introduced that had the same meaning as the original EST identifier.
I think it's safe to say your IBM JDK install has a much older timezone database that the other JDK installs. JDK 1.5 was released in 2004.
Related
Recently upgraded to VS for Mac 8.10.21, when building apps, I'm getting:
/Xamarin.Shared.targets(3,3): Error: dsymutil exited with code 72
This is with Xcode 13.3.
Full version details below:
Visual Studio Community 2019 for Mac
Version 8.10.21 (build 4)
Installation UUID: b7d9f3e8-a2eb-4a6a-a2fa-6a53e9637a56
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)
Package version: 612000162
Mono Framework MDK
Runtime:
Mono 6.12.0.162 (2020-02/2ca650f1f62) (64-bit)
Package version: 612000162
Roslyn (Language Service)
3.10.0-4.21269.26+029847714208ebe49668667c60ea5b0a294e0fcb
NuGet
Version: 5.9.0.7134
.NET SDK (x64)
SDK: Not installed
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks
.NET Core Runtime
Runtime: Not installed
Xamarin.Profiler
Version: 1.6.15.68
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Updater
Version: 11
Apple Developer Tools
Xcode 13.3 (20102)
Build 13E113
Xamarin.Mac
Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.
Xamarin.iOS
Version: 15.8.0.0 (Visual Studio Community)
Hash: f10d9e023
Branch: xcode13.3
Build date: 2022-03-15 11:47:35-0400
Xamarin Designer
Version: 16.11.0.60
Hash: 56f9b80b0
Branch: remotes/origin/d16-11
Build date: 2021-12-15 01:44:16 UTC
Xamarin.Android
Version: 12.0.0.3 (Visual Studio Community)
Commit: xamarin-android/d16-11/f0e3c2d
Android SDK: /Users/jon/Library/Android/sdk
Supported Android versions:
4.4 (API level 19)
5.0 (API level 21)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 32.0.0
SDK Build Tools Version: 31.0.0
Build Information:
Mono: c633fe9
Java.Interop: xamarin/java.interop/d16-11#476bb5b
ProGuard: Guardsquare/proguard/v7.0.1#912d149
SQLite: xamarin/sqlite/3.35.4#85460d3
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-11#87af37b
Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
Android SDK Manager
Version: 16.10.0.13
Hash: 1b81df5
Branch: remotes/origin/d16-10
Build date: 2021-11-12 00:17:32 UTC
Android Device Manager
Version: 16.10.0.15
Hash: 89dcc0b
Branch: remotes/origin/d16-10
Build date: 2021-11-12 00:17:52 UTC
Build Information
Release ID: 810210004
Git revision: eb0b2f7259d35b7d767c79d91d356881227e0985
Build date: 2022-03-17 17:18:28-04
Build branch: release-8.10
Operating System
Mac OS X 12.1.0
Darwin 21.2.0 Darwin Kernel Version 21.2.0
Sun Nov 28 20:29:10 PST 2021
root:xnu-8019.61.5~1/RELEASE_ARM64_T8101 x86_64
Any ideas? Can't find any reference to "code 72" anywhere else.
I had this exact error.
I went inside Xcode.
Preferences>Locations> Command Line Tools. Mine was on 13.2, needed to upgrade to 13.3 (Thought I already had but it must not have done it automatically)
Thanks bro!! I actually had to downgrade my xcode version from 13.3.1 to 13.3 and it fixed my issue! I was getting this error when trying to run my ios app on a physical device in release mode. /Xamarin.Shared.targets(3,3): Error: dsymutil exited with code 72
I have no idea why am getting this error. someone may have at least a clue please.
\[1/7\] Initializing... (0.0s # 0.30GB)
Fatal error: java.lang.NullPointerException: Cannot invoke "String.hashCode()" because "\<local2\>" is null
at com.oracle.svm.core.option.OptionOrigin.from(OptionOrigin.java:81)
at com.oracle.svm.core.option.LocatableMultiOptionValue.lambda$getValuesWithOrigins$1(LocatableMultiOptionValue.java:87)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.processClassInitializationOptions(ClassInitializationFeature.java:82)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:812)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:554)
at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:514)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:413)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:591)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:129)
at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:621)
it fails where running gradle nativeCompile
MacBook Pro M1 chip.
openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment GraalVM CE 22.1.0-dev (build 17.0.3+4-jvmci-22.1-b03)
OpenJDK 64-Bit Server VM GraalVM CE 22.1.0-dev (build 17.0.3+4-jvmci-22.1-b03, mixed mode, sharing)
tried to change the GraalVM versions but no success.
I am currently trying to animate a ViewCell inside a ListView so it expands and collapses once it gets Tapped. The logic behind this works fine, but there seem to be issues with the iOS ListView that I am unable to figure out. The implementation is currently done in the shared code and not platform specific.
The ViewCell itself contains two subviews:
<?xml version="1.0" encoding="UTF-8"?>
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="com.example.CollapsableCell"
Appearing="OnAppearing">
<Frame x:Name="CollapsableFrame" CornerRadius="5" HasShadow="true" Margin="5" BorderColor="Gray" OutlineColor="Gray">
<Grid>
<Grid x:Name="CollapsableContent" />
</Grid>
<Frame.GestureRecognizers>
<TapGestureRecognizer Tapped="OnTapped" />
</Frame.GestureRecognizers>
</Frame>
</ViewCell>
The method for switching between the collapsed and expanded views looks like this:
protected void OnTapped(object sender, EventArgs args)
{
Debug.WriteLine("OnTapped");
if (_isExpanded) // collapse the ViewCell
{
CollapsableFrame.LayoutTo(_collapsedBounds, 500, Easing.CubicIn);
ForceUpdateSize();
CollapsableFrame.BackgroundColor = _collapsedView.BackgroundColor;
_collapsedView.RotationY = -270.0;
_expandedView.RotateYTo(-90.0, 250, Easing.SinIn);
_expandedView.IsVisible = false;
_collapsedView.IsVisible = true;
_collapsedView.RotateYTo(-360.0, 250, Easing.SinOut);
_collapsedView.RotationY = 0.0;
_isExpanded = false;
}
else // Expand the ViewCell
{
CollapsableFrame.LayoutTo(_expandedBounds, 500, Easing.CubicOut);
ForceUpdateSize();
CollapsableFrame.BackgroundColor = _expandedView.BackgroundColor;
_expandedView.RotationY = -270.0;
_collapsedView.RotateYTo(-90.0, 250, Easing.SinIn);
_collapsedView.IsVisible = false;
_expandedView.IsVisible = true;
_expandedView.RotateYTo(-360.0, 250, Easing.SinOut);
_expandedView.RotationY = 0.0;
_isExpanded = true;
}
}
The _collapsedView and _expandedView are private members that are set via properties and are child objects to CollapsableContent,
On Android this works perfect, on iOS the scaling of the CollapsableFrame never works properly (the content extends over the Frames bounds) and in addition after executing the animation a few times the animation gets stuck and freezes the whole application. I already tried to strip the animation down to only the scaling of the CollapsableFrame, but the issue stays the same.
Here are the information of my development environment:
Visual Studio Community 2017 for Mac
Version 7.6 (build 2190)
Installation UUID: 42ba26db-6c15-44b2-a48a-811339d08d89
Runtime:
Mono 5.12.0.301 (2018-02/4fe3280bba1) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)
Package version: 512000301
NuGet
Version: 4.3.1.4445
.NET Core
Laufzeit: /usr/local/share/dotnet/dotnet
Laufzeitversionen:
2.1.2
2.1.1
SDK: /usr/local/share/dotnet/sdk/2.1.302/Sdks
SDK-Versionen:
2.1.302
2.1.301
MSBuild-SDKs: /Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/msbuild/15.0/bin/Sdks
Xamarin.Profiler
Version: 1.6.3
Speicherort: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Apple Developer Tools
Xcode 9.4.1 (14161)
Build 9F2000
Xamarin.Mac
Version: 4.6.0.13 (Visual Studio Community)
Hash: 373c313a
Branch:
Build date: 2018-07-24 23:47:12-0400
Xamarin.iOS
Version: 11.14.0.13 (Visual Studio Community)
Hash: 373c313a
Branch: HEAD
Build date: 2018-07-24 23:47:12-0400
Xamarin.Android
Version: 9.0.0.18 (Visual Studio Community)
Android SDK: /Users/ban/Library/Developer/Xamarin/android-sdk-macosx
Unterstützte Android-Versionen:
8.1 (API-Ebene 27)
Version von SDK Tools: 26.1.1
Version der SDK-Plattformtools: 28.0.0
Version der SDK-Buildtools: 27.0.3
Java SDK: /usr
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Android Designer EPL-Code ist hier verfügbar:
https://github.com/xamarin/AndroidDesigner.EPL
Xamarin Inspector
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
Build Information
Release ID: 706002190
Git revision: 329690594b336b0b810b0399136d55eb54d292ec
Build date: 2018-08-20 12:03:11+00
Build branch: release-7.6
Xamarin extensions: 23b59d33e3e5e6b7efa0f6d2d699867ab5082527
Operating System
Mac OS X 10.13.6
Darwin 17.7.0 Darwin Kernel Version 17.7.0
Thu Jun 21 22:53:14 PDT 2018
root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
I presume that I have to use a custom renderer on iOS to fix this, but at the moment I have no idea where to start. I Hope someone in the community can give me a hint.
This is now an official issue pending investigation by the Xamarin.Forms team:
https://github.com/xamarin/Xamarin.Forms/issues/4012
I have a Xamarin Forms Project that I'm trying to integrate with HockeyApps using Continuous Integration with VSTS.
My app compiles using Java 1.8 and it uses ProGuard to shrink the android apk file.
But when java try to compile the application, it finds that the Installed version of proguard is not compatible with Java 1.8
The error is the following:
... Can't process class [android/app/ActivityTracker.class] Unsupported class version number [52.0] maximum 51.0, Java 1.7...
In my local visual studio installation, I fixed it replacing the default proguard version that Xamarin Installs for the lastest one 5.x...
Anybody knows how to do it with VSTS?
DETAILED ERROR:
_CompileToDalvikWithDx:
C:\Program Files\Java\jdk1.8.0_102\\bin\java.exe -jar C:\java\androidsdk\android-sdk\tools\proguard\lib\proguard.jar -include C:\java\androidsdk\android-sdk\tools\proguard\proguard-android.txt -include obj\Release\proguard\proguard_xamarin.cfg -include obj\Release\proguard\proguard_project_references.cfg -include obj\Release\proguard\proguard_project_primary.cfg -include proguard.cfg "-injars 'obj\Release\proguard\__proguard_input__.jar';'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v7.0\mono.android.jar';'obj\Release\__library_projects__\FormsViewGroup\library_project_imports\formsviewgroup.jar';'obj\Release\__library_projects__\HockeySDK.AndroidBindings\library_project_imports\bin\classes.jar';'C:\Users\buildguest\AppData\Local\Xamarin\Xamarin.Android.Support.Animated.Vector.Drawable\23.3.0.0\embedded\classes.jar';'C:\Users\buildguest\AppData\Local\Xamarin\Xamarin.Android.Support.Design\23.3.0.0\embedded\classes.jar';'C:\Users\buildguest\AppData\Local\Xamarin\Xamarin.Android...
java.io.IOException: Can't read [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v7.0\mono.android.jar] (Can't process class [android/app/ActivityTracker.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7)))
at proguard.InputReader.readInput(InputReader.java:230)
at proguard.InputReader.readInput(InputReader.java:200)
at proguard.InputReader.readInput(InputReader.java:178)
at proguard.InputReader.execute(InputReader.java:78)
at proguard.ProGuard.readInput(ProGuard.java:196)
at proguard.ProGuard.execute(ProGuard.java:78)
at proguard.ProGuard.main(ProGuard.java:492)
Caused by: java.io.IOException: Can't process class [android/app/ActivityTracker.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7))
at proguard.io.ClassReader.read(ClassReader.java:112)
at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
at proguard.io.JarReader.read(JarReader.java:65)
at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:65)
at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:53)
at proguard.InputReader.readInput(InputReader.java:226)
... 6 more
Caused by: java.lang.UnsupportedOperationException: Unsupported class version number [52.0] (maximum 51.0, Java 1.7)
at proguard.classfile.util.ClassUtil.checkVersionNumbers(ClassUtil.java:140)
at proguard.classfile.io.ProgramClassReader.visitProgramClass(ProgramClassReader.java:88)
at proguard.classfile.ProgramClass.accept(ProgramClass.java:346)
at proguard.io.ClassReader.read(ClassReader.java:91)
... 11 more
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2025,3): Error MSB6006: "java.exe" exited with code 1.
I'm afraid that there isn't any workaround for your issue with Hosted Build Agent since the user has no permission to update the installed software on Hosted Machine.
You need to deploy your own build agent and then replace the files manually.
The reason is that it uses JDK 1.7 that is incompatible. You can specify JDK version of Xamarin build step:
I am new to linux device driver development. I am trying to write a simple hello world module that would display the version of kernel running on the system where I try to insert hello_world module into kernel.
I used LINUX_VERSION_CODE in version.h to get linux version and built the module.
When I try to insert the ko file on a different system other than where it was built, it still shows the version of kernel where it was built
I believe issue lies with using C macro.
Can someone help me how to find linux version of local machine where the ko is to be inserted instead of finding version of kernel where my module gets built
You're right - LINUX_VERSION_CODE is a macro that provides compile-time info about the version of the Linux headers that you're using to compile the module. The macro cannot have any knowledge about the version of the kernel that the module will actually be loaded into.
The utsname() function in <linux/utsname.h> provides a pointer to a new_utsname struct, which has sysname, release and version members that contain what you're looking for.
The information from these members is used in /proc/version, as shown in fs/proc/version.c :
static int version_proc_show(struct seq_file *m, void *v)
{
seq_printf(m, linux_proc_banner,
utsname()->sysname,
utsname()->release,
utsname()->version);
return 0;
}
linux_proc_banner is a string that is currently defined as follows :
const char linux_proc_banner[] =
"%s version %s"
" (" LINUX_COMPILE_BY "#" LINUX_COMPILE_HOST ")"
" (" LINUX_COMPILER ") %s\n";
On my system, reading /proc/version - and thus reading these members - results in obtaining the following string :
Linux version 4.1.6-1-ARCH (builduser#tobias) (gcc version 5.2.0 (GCC) ) #1 SMP PREEMPT Mon Aug 17 08:52:28 CEST 2015
Thus, sysname is Linux, release is 4.1.6-1-ARCH, and version is #1 SMP PREEMPT Mon Aug 17 08:52:28 CEST 2015.