J# FAQ for High School Teachers

Up

  1. Can I use J# for the Advanced Placement Computer Science program?
  2. Is there a Marine Biology Simulation for J#?
  3. I have an existing Java program that I want to use with J#. How do I add it to a project?
  4. My existing program uses Swing or I want to create a program that uses Swing functionality. Do I need to do anything special?
  5. I have several Java classes with their own main method. How do I tell the Visual Studio .NET IDE which one to use?
  6. Can I use JAR files with J#?
  7. Can I use Applets with J#?
  8. Why should I use J# when Java is free?
  9. What is the difference between J# and Java?
  10. Where can I get more information about J#?
  11. Are there any other resources available for teachers of computer science who use J#?

 Can I use J# for the Advanced Placement Computer Science program?

Visual J# .NET fully supports the requirements specified by the College Board for teaching the Java language starting in the 2003-2004 academic year. This includes support for the Java-language syntax and the Java Development Kit (JDK) functionality as specified in the AP Subset (both A and AB subsets are fully supported by J#). The AP Computer Science curriculum is also supplemented by the Microsoft Marine Biology Simulation (MBS) Case Study. This case study provides students with a full-scale application which serves as a model for teaching computer science concepts.

Is there a Marine Biology Simulation for J#?

Yes there is. It is available as a free download from http://msdn.microsoft.com/vjsharp/using/academic/mbs/default.aspx. This simulation includes all of the classes and methods supplied by the College Board. It also includes the source files for all the classes and methods involved in the display and running of the simulation.

There is now a new version of the Marine Biology Simulation (MBS) for Visual Studio 2005. You can download it here. If you and/or your students want to work on the MBS with Visual Studio Express than this is the one you want.

I have an existing Java program that I want to use with J#. How do I add it to a project?

One way is the create a new J# Console project, delete the Class1.jsl file from the Solution Explorer, and select Add Existing Class from the Project menu. Use the browse function in the dialogue box to find your existing file and click on the Open button. Set your new class, assuming it has a main method, as the startup object. Edit, compile and run your program as usual.

My existing program uses Swing or I want to create a program that uses Swing functionality. Do I need to do anything special?

Visual Studio 2005 includes Swing functionality for use with Visual J#. If you are using an older version of Visual Studio and Visual J# you will need the following information.

The Microsoft Supplemental UI Library for Visual J# .NET v1.1 provides much of the functionality described in the Java 2 JFC Swing specification. It also adds support for much of the functionality found in the JDK 1.2 java.util package. The Supplemental UI Library installs as an add-on to Visual J# .NET 2003.

The Supplemental UI Library is available for academic and other non-professional use only, and is not supported or intended for use in commercial applications.

The Supplemental UI Library may be downloaded for free from http://msdn.microsoft.com/vjsharp/supui/

Once the Supplemental UI Library is installed you can add it to a J# Console project that will use Swing functionality. This is done by selecting Add Reference from the Project menu. From the dialogue box select the VJSSupUILib component (as shown below) and click the OK button.

 

 I have several Java classes with their own main method. How do I tell the Visual Studio .NET IDE which one to use?

Right click on the project file in the Solution Explorer and select Properties at the bottom of the menu. From the dialogue box (shown below) select the class you want as the Startup Object from the list of classes.

Only classes with a main method will be displayed on the list.

Can I use JAR files with J#?

The Visual J# Binary Converter Tool (JbImp.exe) converts certain Java-language bytecode (.class) files to Microsoft® intermediate language (MSIL). This tool enables developers to convert most JDK 1.1.4 level libraries and applications available only as bytecode files to MSIL assemblies, and run them on Visual J#. Use this tool only if the Java-language sources for the applications or libraries are not available. If Java-language sources are available, it is recommended that you use the Visual J# compiler (vjc.exe) instead.

Jbimp is a command line utility that takes as parameters the jar file to convert and the name of the DLL library to be created. For example:

"c:\program files\Microsoft visual j# .net\framework\bin\jbimp.exe"  /t:library mylib.jar /out:mylib.dll

There is more information about Jbimp here.

Can I use Applets with J#?

Microsoft supplies the J# Browser Controls that provide the capability to migrate existing applets to run within the context of the .NET Framework - usually with no changes to the Java applet source code!

You can download the beta of 1.1b here:
http://msdn.microsoft.com/vjsharp/downloads/browsercontrolsbeta/

There is also a “shipping“ version, version 1.1 that is still available here:
http://msdn.microsoft.com/vjsharp/downloads/browsercontrols

Why should I use J# when Java is free?

Visual Studio .NET is not as expensive for schools as many think. The MSDN AA program offers a program for universities and a second program for high schools. Highlights of this program include a license to install Visual Studio .NET on all department lab computers, all faculty preparation systems AND the privately owned systems of all students taking a credit course for one low price.

The Visual Studio .NET IDE allows you to teach several languages including J#, Visual Basic .NET, C++ and C# without students having to learn a new IDE.

 The Visual Studio .NET IDE and the associated framework makes coding even complicated projects easy. This includes projects involving databases, web services using classes and methods that are intrinsic to the system.

You can use classes written in other .NET languages in J# projects. This allows you to write and use classes in other languages where they are appropriate to do things that might be difficult in Java.

What is the difference between J# and Java?

Visual J# .NET is a development tool for Java-language developers who want to build applications and services on the Microsoft .NET Framework. Visual J# .NET provides the easiest transition for Java-language developers into the world of XML Web services, and dramatically improves the interoperability of Java-language programs with existing software written in a variety of other programming languages.

Visual J# .NET 2003 is not a tool for developing applications intended to run on a Java virtual machine. Applications and services built with Visual J# .NET 2003 will run only in the .NET Framework; they will not run on any Java virtual machine. Visual J# .NET 2003 has been developed independently by Microsoft. It is neither endorsed nor approved by Sun Microsystems, Inc.

Where can I get more information about J#?

The J# home page is http://msdn.microsoft.com/vjsharp/.

Are there any other resources available for teachers of computer science who use J#?

There is a special resource page for educators at http://msdn.microsoft.com/vjsharp/using/academic/.

Copyright Alfred C Thompson II 2006