J2N 2.0.0

.NET 5.0 .NET Core 3.0 .NET Standard 2.0 .NET Framework 4.0
Install-Package J2N -Version 2.0.0
dotnet add package J2N --version 2.0.0
<PackageReference Include="J2N" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add J2N --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: J2N, 2.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install J2N as a Cake Addin
#addin nuget:?package=J2N&version=2.0.0

// Install J2N as a Cake Tool
#tool nuget:?package=J2N&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

J2N - Java-like Components for .NET

Nuget Azure DevOps builds (branch) GitHub GitHub Sponsors

J2N is a library that helps bridge the gap between .NET and Java.

Our Goals

  • Java-like behaviors
  • .NET-like APIs
  • Be the defacto library to use when porting from Java to .NET
  • Provide high quality, high performance components that can be used in a wide range of .NET applications

Basically, if you are looking for a "JDK.NET", this is about as close as you can get. While we recommend using purely .NET components where possible when porting from Java, there are some Java features that have no .NET counterpart or the .NET counterpart is lacking behaviors that are not easy to reproduce without reinventing the wheel. Even if you prefer to reinvent the wheel by designing your own ".NETified" component, you may still need a Java-like component to compare your component against in tests.

That is why we created J2N. If you like this idea, please be sure to star our repository on GitHub.

Our Focus

  1. Text analysis: code points, normalizing behaviors between different "character sequence" types, tokenizing, etc.
  2. I/O: Reading and writing types in both big-endian and little-endian byte order and providing specialized behaviors for interop with Java-centric file formats.
  3. Collections: .NET's cupboard is a little bare when it comes to specialized collections, so we fill in some gaps.
  4. Equality: Compare collections for structural equality with behaviors that are specific to each collection family, and provide .NET equality comparers for other types that differ in behavior.
  5. Localization: Bridge the gap between .NET's culture-aware and Java's culture-neutral defaults.

NuGet

Install-Package J2N

Contributing

We love getting contributions! If you need something from the JDK that we don't have, this is the right place to submit it. Basically, the following are things that would be a good fit for this library:

  1. Components in the JDK that have no direct counterpart in .NET, or the counterpart is lacking features
  2. Features that make J2N easier to work with in .NET such as extension methods and adapters
  3. Features that make .NET interoperate with Java better

Building and Testing

To build the project from source, see the Building and Testing documentation.

Saying Thanks

If you find this library to be useful, please star us on GitHub and consider a sponsorship so we can continue bringing you great free tools like this one.

GitHub Sponsors

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (12)

Showing the top 5 NuGet packages that depend on J2N:

Package Downloads
Lucene.Net

Lucene.Net is a full-text search engine library capable of advanced text analysis, indexing, and searching. It can be used to easily add search capabilities to applications. Lucene.Net is a C# port of the popular Java Lucene search engine framework from The Apache Software Foundation, targeted at .NET Framework and .NET Core users.

Lucene.Net.Replicator

Replicator that allows replication of files between a server and client(s) for the Lucene.NET full-text search engine library from The Apache Software Foundation. Documentation: https://lucenenet.apache.org/docs/4.8.0-beta00016/api/replicator/Lucene.Net.Replicator.html This package is part of the Lucene.NET project: https://www.nuget.org/packages/Lucene.Net/4.8.0-beta00016

ICU4N

ICU (International Components for Unicode) is a set of libraries providing Unicode and Globalization support for software applications. It provides Text-boundary analysis (RuleBasedBreakIterator) as well as easy access to all of the many Unicode character properties, Unicode Normalization, Case Folding and other fundamental operations as specified by the Unicode Standard. ICU4N is a .NET port of ICU4J.

Lucene.Net.Analysis.Kuromoji

Japanese Morphological Analyzer for the Lucene.NET full-text search engine library from The Apache Software Foundation. Documentation: https://lucenenet.apache.org/docs/4.8.0-beta00016/api/analysis-kuromoji/Lucene.Net.Analysis.Ja.html This package is part of the Lucene.NET project: https://www.nuget.org/packages/Lucene.Net/4.8.0-beta00016

Lucene.Net.Analysis.SmartCn

Analyzer for indexing Chinese for the Lucene.NET full-text search engine library from The Apache Software Foundation. Documentation: https://lucenenet.apache.org/docs/4.8.0-beta00016/api/analysis-smartcn/Lucene.Net.Analysis.Cn.Smart.html This package is part of the Lucene.NET project: https://www.nuget.org/packages/Lucene.Net/4.8.0-beta00016

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on J2N:

Repository Stars
apache/lucenenet
Apache Lucene.NET
YAFNET/YAFNET
🌐 YAF.NET - C# ASP.NET Forum
Version Downloads Last updated
2.0.0 155,381 1/15/2022
2.0.0-beta-0017 140,073 10/24/2021
2.0.0-beta-0016 7,546 7/24/2021
2.0.0-beta-0015 16,284 4/25/2021
2.0.0-beta-0014 95 4/24/2021
2.0.0-beta-0013 914 4/20/2021
2.0.0-beta-0012 789,729 3/10/2021
2.0.0-beta-0011 7,681 12/3/2020
2.0.0-beta-0010 229,999 9/21/2020
2.0.0-beta-0009 88,343 7/27/2020
2.0.0-beta-0008 46,059 7/11/2020
2.0.0-beta-0007 159,311 3/28/2020
2.0.0-beta-0002 11,298 2/7/2020
2.0.0-beta-0001 604 1/23/2020
1.0.0-beta-0002 5,894 12/28/2019
1.0.0-beta-0001 350,369 12/23/2019
1.0.0-alpha-0030 471 12/13/2019
1.0.0-alpha-0017 817 12/2/2019