• This repository has been archived on 10/Mar/2021
  • Stars
    star
    378
  • Rank 109,184 (Top 3 %)
  • Language
    Java
  • License
    GNU General Publi...
  • Created about 13 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sharpen is an Eclipse plugin created by db4o that allows you to convert your Java project into c#

Sharpen - Automated Java->C# coversion

imazen/sharpen masterimazen master - AppVeyor develop imazen develop - AppVeyor

mono/sharpen mastermono master - AppVeyor (permissions issue) develop mono develop - AppVeyor (permissions issue)

Sharpen is a library and command-line tool for automating Java to C# code conversion. You can provide configuration classes to control a wide range of class and functionality mapping.

Sharpen doesn’t provide a compatibility runtime (i.e, an implementation of all java functionality on top of .NET), but it does provide some utility classes to meet the most common needs.

It’s likely that you will need to create a configuration class to customize and perfect your conversion, and you may need to apply patches to the result as well.

Sharpen was originally created by db40 svn source here in the format of an Eclipse plugin, but it has since been refactored to work from the command line and on build servers.

Building and testing sharpen itself

  1. Clone this repository
  2. Install Java 7 and maven. Java 6 and 8 and later aren’t supported.
  3. Run ‘mvn clean test’ to test
  4. Run ‘mvn install ’ to generate .jar files in /sharpen.core/target

Running sharpen

  1. mvn install should have created a file named sharpencore-0.0.1-SNAPSHOT-jar-with-dependencies.jar. This is a self-contained copy of sharpen that can be run anywhere.
  2. Run java -jar sharpencore-0.0.1-SNAPSHOT-jar-with-dependencies.jar SOURCEPATH -cp JAR_DEPENDENCY_A JAR_DEPENDENCY_B
    Each dependecy needed by the java source should be specified as a full path to the jar file. SOURCEPATH should also be a full path.
  3. Run -help for syntax

Sharpen allows for configuration through code

Sharpen’s command-line options don’t let you fully override all conversion options and behaviour. For example if you need to change mapping of primitive types or allow/deny mapping between iterators and enumerators, ...

Creating external config class

Your external configuration class must:

  • inherit Configuration class;
  • must be publicly visible;
  • must have a public constructor;

An example configuration project can be found here https://github.com/ydanila/sharpen_imazen_config.

Using your custom config class

Name your jar file <configuration class name>.sharpenconfig.jar in the sharpen directory. Then specify the full configuration name via the command line parameter -configurationClass (or via the options file).

For example, for the XMP core port with this prebuilt Sharpen configuration could be used as follows.

java -jar sharpen-jar-with-dependencies.jar C:/java_src/ -configurationClass sharpen.config.MEConfiguration @sharpen-all-options-without-configuration

Configuration also could be specified in an options file. In this case, for the XMP core port with this prebuilt Sharpen configuration it could be used like this:

java -jar sharpen-jar-with-dependencies.jar C:/java_src/ @sharpen-all-options

More Repositories

1

mono

Mono open source ECMA CLI, C# and .NET implementation.
C#
10,755
star
2

SkiaSharp

SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
C#
4,046
star
3

CppSharp

Tools and libraries to glue C/C++ APIs to high-level languages
C#
2,919
star
4

monodevelop

MonoDevelop is a cross platform .NET IDE
C#
2,797
star
5

xwt

A cross-platform UI toolkit for creating desktop applications with .NET and Mono
C#
1,357
star
6

taglib-sharp

Library for reading and writing metadata in media files
C#
1,225
star
7

Embeddinator-4000

Tools to turn .NET libraries into native libraries that can be consumed on Android, iOS, Mac, Linux and other platforms.
C#
759
star
8

VulkanSharp

Open source .NET binding for the Vulkan API
C#
532
star
9

CocosSharp

CocosSharp is a C# implementation of the Cocos2D and Cocos3D APIs that runs on any platform where MonoGame runs.
C#
492
star
10

monotouch-bindings

A collection of third party bindings for MonoTouch
C#
451
star
11

gtk-sharp

Gtk# is a Mono/.NET binding to the cross platform Gtk+ GUI toolkit and the foundation of most GUI apps built with Mono
C#
418
star
12

t4

T4 text templating engine
C#
351
star
13

website

Mono's web site.
HTML
344
star
14

libgdiplus

C-based implementation of the GDI+ API
C
311
star
15

monomac

Bindings to create MacOS X applications with Mono.
C#
260
star
16

ngit

Automated jgit port to c#
C#
260
star
17

LineEditor

LineEditor is an interactive line editor for Command Line applications in .NET
C#
234
star
18

SkiaSharp.Extended

SkiaSharp is a cross-platform, comprehensive 2D graphics API for all .NET platforms. And, here is where you will find all sorts of extras that you can use with it.
C#
205
star
19

cxxi

C++ interop framework
C#
199
star
20

xsp

Mono's ASP.NET hosting server. This module includes an Apache Module, a FastCGI module that can be hooked to other web servers as well as a standalone server used for testing (similar to Microsoft's Cassini)
C#
192
star
21

roslyn

Roslyn Compiler - Tracks Mono Patches
C#
185
star
22

mono-tools

The mono-tools package contains a series of extra tools for Mono users.
C#
163
star
23

mono-addins

Mono.Addins is a generic framework for creating extensible applications, and for creating add-ins which extend those applications.
C#
163
star
24

docker

Docker images, for the Docker container system
Dockerfile
161
star
25

moon

Moonlight, an open source implementation of Silverlight for Unix systems
C#
156
star
26

mono-curses

Mono/.NET bindings to the Unix Curses as well as GUI framework for creating text applications with Curses
C#
137
star
27

winforms

Winforms samples for use with Mono's implementation of System.Windows.Forms
C#
130
star
28

aspnetwebstack

Mono branch of Microsoft's ASP.NET WebStack
C#
119
star
29

sdb

A command line client for the Mono soft debugger.
C#
117
star
30

opentk

OpenTK is a set of bindings to OpenGL, OpenCL and OpenAL. This is not the main repository, just a temporary import to allow Mono developers to make changes to this module. Please do not contribute changes here, contribute them to the upstream maintainers at http://www.opentk.com
C#
113
star
31

cocos-sharp-samples

CocosSharp samples
C#
112
star
32

ikvm-fork

A fork of the original cvs based IKVM repository
C#
102
star
33

mono-basic

Visual Basic Compiler and Runtime
Visual Basic .NET
101
star
34

TsToCSharp

Emit C# strongly typed interface code from TypeScript definition files.
TypeScript
92
star
35

mono-upnp

UPNP binding for Mono/.NET
C#
85
star
36

dbus-sharp

DBus Sharp
C#
75
star
37

md-website

MonoDevelop WebSite
HTML
74
star
38

debugger-libs

Debugger libraries
C#
74
star
39

webkit-sharp

C#/CLI bindings to WebKit/Gtk+
C#
68
star
40

sysdrawing-coregraphics

System.Drawing implementation using CoreGraphics.
C#
66
star
41

api-doc-tools

.NET Reference API Toolchain
C#
65
star
42

maccore

MacCore contains the shared code between MonoTouch and MonoMac
C#
63
star
43

Mono.Zeroconf

Cross platform ZeroConf client that works with the underlying ZeroConf stack on the platform for Mono and .NET
C#
60
star
44

mwf-designer

Windows.Forms designer for Mono. Work in progress
C#
45
star
45

heap-shot

C#
42
star
46

cecil-old

ECMA CIL Manipulation Library
C#
41
star
47

tao

The Tao OpenGL, OpenAL, GLU, FreeGlut bindings for .NET and Mono
C#
38
star
48

monodroid-bindings

Mono for Android Jar Bindings
C#
36
star
49

entityframework

C#
33
star
50

monkeywrench

Continuous build system used by Mono and Moonlight.
C#
33
star
51

reference-assemblies

Binary reference assemblies
C#
32
star
52

linux-packaging-mono

Packaging metadata for mono-project.com packages
30
star
53

mod_mono

Apache module to host the XSP ASP.NET host
C
30
star
54

mono.posix

POSIX/Unix interface for Mono, .NET and .NET Core. Provides functionality for managed code to access POSIX/Unix features not accessible via the BCL. This repository supersedes the older code in https://github.com/mono/mono
C#
29
star
55

jurassic

Mono port of the Jurassic JS Engine (http://jurassic.codeplex.com/).
C#
27
star
56

mono-tls

New TLS implementation for Mono.
C#
27
star
57

bockbuild

Build & packaging system, responsible for the Mono project distribution for Mac
Python
26
star
58

xamarin-gtk-theme

C
25
star
59

uia2atk

Accessibility bridge between UIA and Gnome's ATK
C#
20
star
60

csvorbis

C#
20
star
61

linux-packaging-msbuild

C#
19
star
62

SkiaSharp-API-docs

SkiaSharp and HarfBuzzSharp API reference docs
PowerShell
19
star
63

mono-webbrowser

Browser backends for Mono.WebBrowser
C#
18
star
64

moma

Mono Migration Analyzer. A tool to scan compiled assemblies and determine their compatibility with Mono.
C#
18
star
65

olive

Olive is an incubation module used to host new Mono code under development based on Microsoft's APIs. Olive code eventually graduates and is moved into the Mono distribution.
C#
16
star
66

monocov

Mono Code Coverage profiler module
C#
15
star
67

monodevelop-flatpak

Makefile
14
star
68

debugger

Mono Hard Debugger
C
14
star
69

guiunit

A unit test runner which interoperates with any Gui main loop
C#
13
star
70

repo

This is the mono repo - we'll put everything here
13
star
71

gtk-sharp-ribbon

C#
13
star
72

gir-sharp

C# binding generator for GIR format
C#
12
star
73

lb

Lame Blog, the lamest blog engine in the world
C#
12
star
74

monologue

Monologue is Mono's blog aggregation software for the Mono community
C#
11
star
75

WindowsAPICodePack

WindowsAPICodePack as imported from MonoDevelop
C#
11
star
76

gluezilla

C
10
star
77

roslyn-binaries

Pre-built binaries of Roslyn
C#
10
star
78

stetic

The Gtk# GUI designer
C#
10
star
79

pty-sharp

API for managing Unix pseudo-terminals from managed code
C
9
star
80

mono-microthreads

Microthreads implementation built on top of Mono.Tasklets library
C#
9
star
81

gnome-keyring-sharp

Bindings to Gnome's KeyRing APIs
C#
8
star
82

nuget-binary

Temporary repo to hold nuget binaries for use with MonoDevelop
8
star
83

winforms-tools

Open source Windows.Forms tools.
C#
8
star
84

old-code

Old mono code that has not been developed in years
C#
8
star
85

gio-sharp

Bindings to Glib's libgio
C#
8
star
86

gnome-sharp

Bindings to the core Gnome APIs
C#
8
star
87

crimson

C#
8
star
88

mooncodecs

open source codecs that can be plugged into Moonlight or Silverlight applications
C#
7
star
89

rocks

Mono.Rocks is a library of utility functions
C#
7
star
90

release

(Deprecated, no longer used) Tools to manage Mono's releases (scripts, web pages, build files)
HTML
7
star
91

WebAssembly.JSInterop

WebAssembly JSInterop library
JavaScript
7
star
92

Mono.Simd.Math

Math library that uses Mono's accelerated Mono.Simd library
C#
6
star
93

nuget

Nuget
C#
6
star
94

monohotdraw

Vector drawing program
C#
6
star
95

dbus-sharp-glib

Managed dbus
C#
6
star
96

eglib

C
6
star
97

heap-buddy

C#
6
star
98

boringssl

Custom version of Boring SSL used by Mono
C
6
star
99

google-sharp

C#
6
star
100

linux-packaging-fsharp

Packaging metadata for mono-project.com packages
F#
6
star