J-Sharp

from Wikipedia, the free encyclopedia
J #
Paradigms : Object-oriented programming language
Publishing year: 2002
Developer: Microsoft
Current  version : 2.0   (January 22, 2006)
Influenced by: Java
Operating system : Windows
MSDN.Microsoft.com

J # is an object-oriented programming language developed by Microsoft , which should make it easier for Java and Visual J ++ programmers to switch to or get started with the .NET environment . In the long term, Java developers should familiarize themselves with the framework in order to be able to use all functions of .NET later in C #. J # also served to make it easier for Java developers to take existing Java code with them into the environment in order to use it in new projects under a different .NET language such as C # or VB.NET .

Microsoft announced on January 10, 2007 that J # would no longer be developed and that there would be no new version in Visual Studio 2008 for it. Visual Studio 2005 was the last version that contained J #. Until 2015 there was limited product support that was limited to bug fixes.

Differences between J # and Java

Both languages ​​have the same " basic syntax ", but still rely on different runtime environments . J # is used under the CLR (Common Language Runtime) , while Java uses the JRE (Java Runtime Environment) from Oracle or a similar environment.

In Visual Studio 2005 Microsoft provides a large number of namespaces and classes adopted from the Java world , which are intended to make it easier for a Java programmer to work with .NET. Particular emphasis was placed on converting the standard and swing classes. There is also a compiler which translates J # source texts into C # code .

Programming example

The following lines give a little insight into the structure and use of J #:

import System.Console;
import System.Windows.Forms.*;

public final class Program extends Object
{
    public final static String HalloWeltAusdruck = "Hallo Welt!";

    /**
     * Einstiegspunkt
     */
    public static void main(String[] args)
    {
        (new Program()).Run(args);
    }

    /**
     * "Hallo, Welt!" Ausgabe an Standardausgabe (meistens Konsole)
     */
    private void DefOutput()
    {
        System.Console.WriteLine("Ausgabe an Konsole...\n");

        Console.get_Out().WriteLine(HalloWeltAusdruck);

        System.Console.WriteLine("ENTER betätigen, um fortzufahren...\n");
        Console.ReadLine();
    }

    /**
     * Eine Art nicht-statischer Einstiegspunkt
     */
    private void Run(System.String[] args)
    {
        // Ausgabe => Konsole
        this.DefOutput();

        // Ausgabe an Windows
        WinOutput();
    }

    /**
     * "Hallo, Welt!" Ausgabe als Windows-Fenster
     */
    private void WinOutput()
    {
        System.Console.WriteLine("Ausgabe als Windows-Fenster...");

        MessageBox.Show(Program.HalloWeltAusdruck, "Ausgabe als Windows MessageBox.");

        System.Console.WriteLine("ENTER betätigen, um fortzufahren...\n");
        Console.ReadLine();
    }
}

See also

Individual evidence

  1. Microsoft MSDN: J # has been removed from Visual Studio 2008