Visual J Sharp

Programming language


title: "Visual J Sharp" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: [".net-programming-languages", "2002-software", "java-development-tools", "java-programming-language-family", "microsoft-programming-languages", "microsoft-visual-studio", "discontinued-microsoft-development-tools"] description: "Programming language" topic_path: "linguistics" source: "https://en.wikipedia.org/wiki/Visual_J_Sharp" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Programming language ::

::data[format=table title="Infobox programming language"]

FieldValue
nameVisual J#
paradigmObject-oriented, structured, imperative
year
developerMicrosoft
discontinuedyes
ver layout
latest_release_versionv2.0 Second Edition
latest_release_date
influenced_byC#, Java and Visual J++
platform.NET Framework
::

| name = Visual J# | logo = | file_ext = | paradigm = Object-oriented, structured, imperative | year = | designer = | developer = Microsoft | discontinued = yes | ver layout = | latest_release_version = v2.0 Second Edition | latest_release_date = | latest_test_version = | latest_test_date = | typing = | implementations = | dialects = | influenced_by = C#, Java and Visual J++ | influenced = | platform = .NET Framework | license = | website = | wikibooks =

Visual J# (pronounced "jay-sharp") is a discontinued implementation of the J# programming language that was a transitional language for programmers of Java and Visual J++ languages, so they could use their existing knowledge and applications with the .NET Framework. It was introduced in 2002 and discontinued in 2007, with support for the final release of the product continuing until October 2017.

J# worked with Java bytecode as well as source so it could be used to transition applications that used third-party libraries, even if their original source code was unavailable. It was developed by the Hyderabad-based Microsoft India Development Center at HITEC City in India.

The implementation of Java in Visual J++, MSJVM, did not pass Sun's compliance tests leading to a lawsuit from Sun, Java's creator, and creation of J#. Microsoft ceased such support for the MSJVM on December 31, 2007 (later Oracle bought Sun, and with it Java and its trademarks). Microsoft however, officially started distributing Java again in 2021 (though not bundled with Windows or its web browsers as before with J++), i.e. their build of Oracle's OpenJDK, which Microsoft plans to support for at least 6 years, for LTS versions, i.e. to September 2027 for Java 17.

Fundamental differences between J# and Java

Java and J# use the same general syntax but there are non-Java conventions in J# to support the .NET environment. For example, to use .NET "properties" with a standard JavaBean class, it is necessary to prefix getter and setter methods with the Javadoc-like annotation:

::code[lang=java] /** @beanproperty */

...and change the corresponding private variable name to be different from the suffix of the getXxx/setXxx names{{Citation needed|date=February 2017}}.

J# does not compile Java-language source code to Java bytecode (.class files), and does not support [[Java applet]] development or the ability to host applets directly in a [[web browser]], although it does provide a wrapper called Microsoft J# Browser Controls for hosting them as [[ActiveX]] objects. Finally, [[Java Native Interface]] (JNI) and [[Java Native Interface#Microsoft.27s RNI|raw native interface]] (RNI) are substituted with [[Platform Invocation Services|P/Invoke]]; J# does not support [[remote method invocation]] (RMI).{{cite web|url=http://msdn.microsoft.com/en-us/library/7622y256(v=vs.80).aspx|title=Visual J# Migration|department=[[Visual Studio 2005]]|work=[[MSDN Library]]|archive-url=https://web.archive.org/web/20120316061217/http://msdn.microsoft.com/en-us/library/7622y256(v=vs.80).aspx|archive-date=2012-03-16|access-date=2021-12-25}}

''[[InfoWorld]]'' said: "J#'s interface to the .NET framework is solid, but not as seamless as [[C Sharp (programming language)|C#]]. In particular, J# code cannot define new .NET attributes, events, value types, or delegates. J# can make use of these language constructs if they are defined in an assembly written in another language, but its inability to define new ones limits J#'s reach and interoperability compared to other .NET languages."{{cite web |last1=Yager |first1=Tom |date=2001-11-21 |df=dmy |url=https://www.infoworld.com/article/2075819/just-don-t-call-j--java.html |title=Just don't call J# Java |work=[[InfoWorld]] |access-date=2020-07-20}}

Contrariwise, Microsoft documentation for Visual Studio 2005 details the definition of .NET delegates,{{cite web |url=https://msdn.microsoft.com/en-us/library/0kks3c36(v=vs.80).aspx |title=delegate (Visual J#) |department=[[Visual Studio 2005]] |work=[[MSDN Library]] |archive-url=https://web.archive.org/web/20111219230625/http://msdn.microsoft.com/en-US/library/0kks3c36(v=VS.80).aspx |archive-date=2011-12-19}} events,{{cite web |url=https://msdn.microsoft.com/en-us/library/09b0135h(v=vs.80).aspx |title=Definition and Use of Events |department=[[Visual Studio 2005]] |work=[[MSDN Library]] |archive-url=https://web.archive.org/web/20111219230625/https://msdn.microsoft.com/en-us/library/09b0135h(v=vs.80).aspx |archive-date=2011-12-19}} and value types{{cite web |url=https://msdn.microsoft.com/en-us/library/wysdab55(v=vs.80).aspx |title=User-Defined Value Types |department=[[Visual Studio 2005]] |work=[[MSDN Library]] |archive-url=https://web.archive.org/web/20111220004451/http://msdn.microsoft.com/en-US/library/wysdab55(v=VS.80).aspx |archive-date=2011-12-20}} directly in J#.

Like C# and unlike Java, J# is able to use the [[C preprocessor]] directives.

==History of J#== In January 2007, Microsoft announced:Microsoft Developer Network, [http://msdn.microsoft.com/en-us/vjsharp/ Visual J# Product Announcement], 10 January 2007

  • That Microsoft would produce an updated version of Visual J# 2.0, including a [[64-bit computing|64-bit]] [[freely redistributable software|redistributable]] version, called J# 2.0 Second Edition to meet customer demand for 64-bit runtime support. Microsoft released Visual J# 2.0 Second Edition in May 2007.{{Cite web |url=http://www.microsoft.com/downloads/details.aspx?familyid=42C46554-5313-4348-BF81-9BB133518945&displaylang=en |title=Visual J# 2.0 Second Edition Redistributable Download |website=[[Microsoft]] |access-date=2010-04-27 |archive-url=https://web.archive.org/web/20070523221606/http://www.microsoft.com/downloads/details.aspx?familyid=42C46554-5313-4348-BF81-9BB133518945&displaylang=en |archive-date=2007-05-23 |url-status=bot: unknown }}
  • Retirement of the J# language and Java Language Conversion Assistant from future versions of ''[[Visual Studio]]''. The last version, shipping with Visual Studio 2005, was supported until 2015.
  • Calling J# code from .NET 4.0 code would fail unless vjsnativ.dll was pre-loaded.{{cite web|url=http://blogs.windwardreports.com/davidt/2011/02/calling-j-code-from-net-40.html|title=Calling J# code from .NET 4.0 - Windward Wrocks|access-date=6 March 2017}}

The download of Visual J# 2005 Express Edition is no longer available from Microsoft's website.

Visual J# is out of support including the Visual J# 2.0 Redistributable Second Edition released in 2007, that was supported through to 2017 "(5 years mainstream and 5 years extended support) on EN-US locales."{{cite web|url=https://msdn.microsoft.com/en-us/vstudio/bb188593|title=Visual J# Home|access-date=6 March 2017}}{{Cite news|url=https://blogs.msdn.microsoft.com/visualstudio/2017/04/10/end-of-support-for-visual-studio-2008-in-one-year/|title=End of Support for Visual Studio 2008 – in One Year|access-date=2017-04-11|language=en-US}}

== Example == The following is a simple example of Visual J#. package Wikipedia.Examples;

import System.*; import System.ComponentModel.Container; import System.Drawing.Point; import System.Drawing.Size; import System.Windows.Forms.Application; import System.Windows.Forms.Button; import System.Windows.Forms.Form; import System.Windows.Forms.Label; import System.Windows.Forms.TextBox;

public class HelloWorld extends Form { private TextBox textBox; private Button button; private Label label;

private Container components = null;

public HelloWorld() {
    InitializeComponent();
}

protected void Dispose(boolean disposing) {
    if (disposing) {
        components.Dispose();
    }
    super.Dispose(disposing);
}

private void onClick(Object sender, EventArgs e) {
    label.set_Text(String.Format("Inputted text: {0}", textBox.get_Text());
}

#region Windows Form Designer generated code
private void InitializeComponent() {
    this.textBox = new TextBox();
    this.button = new Button();
    this.label = new Label();
    this.SuspendLayout();

    // initialise text box
    textBox.set_Location(new Point(50, 30));
    textBox.set_Name("Hello world!");
    textBox.set_Size(new Size(120, 20));

    // initialise button
    button.set_Location(new Point(50, 60));
    button.set_Name("button");
    button.set_Text("Click me!");
    button.add_Click(new EventHandler(this.onClick));

    // initialise label
    label.set_Location(new Point(50, 90));
    label.set_Name("label");
    label.set_Size(new Size(200, 20));

    // initialise form
    set_AutoScaleBaseSize(new Size(6, 15));
    set_ClientSize(new Size(220, 140));
    get_Controls().Add(textBox);
    get_Controls().Add(button);
    get_Controls().Add(label);
    set_Name("form");
    set_Text("Hello, world!");
    ResumeLayout(false);
}
#endregion

/** @attribute System.STAThread() */
public static void main(String[] args) {
    Application.Run(new HelloWorld());
}

} ::

References

References

  1. (22 October 2019). "New and Upgraded Features in Visual Studio .NET 2003". Microsoft Learn.
  2. "Visual J# Home".
  3. (30 April 2007). "Java to .NET Framework Migration Workshop: Free Online Training".
  4. Microsoft News, [https://news.microsoft.com/2002/07/01/microsoft-rounds-out-developer-languages-with-launch-of-visual-j-net/], 1 July 2002
  5. S Prasanna, [http://www.expresscomputeronline.com/20020729/indnews3.shtml Microsoft's VJ#.Net is made in India], ''Express Computer'', 29 July 2002 {{webarchive. link. (28 November 2013)
  6. "The Hindu Business Line : Microsoft lines up big plans for Hyderabad centre". www.thehindubusinessline.com.
  7. (2021-05-25). "Announcing General Availability of Microsoft Build of OpenJDK".
  8. "Visual J# Migration". [[MSDN Library]].
  9. (2001-11-21). "Just don't call J# Java". [[InfoWorld]].
  10. "delegate (Visual J#)". [[MSDN Library]].
  11. "Definition and Use of Events". [[MSDN Library]].
  12. "User-Defined Value Types". [[MSDN Library]].
  13. Microsoft Developer Network, [http://msdn.microsoft.com/en-us/vjsharp/ Visual J# Product Announcement], 10 January 2007
  14. "Visual J# 2.0 Second Edition Redistributable Download".
  15. "Calling J# code from .NET 4.0 - Windward Wrocks".
  16. "Visual J# Home".
  17. "End of Support for Visual Studio 2008 – in One Year".

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

.net-programming-languages2002-softwarejava-development-toolsjava-programming-language-familymicrosoft-programming-languagesmicrosoft-visual-studiodiscontinued-microsoft-development-tools