Specifies which version of the common language runtime (CLR) can run the assembly. This compiler option is supported on both the 32-bit and 64-bit versions of the Visual J# compiler.
/platform:{x86 | x64 | Itanium | anycpu}
- anycpu
-
Compiles your assembly to run on any platform. This is the default behavior when you select the 64-bit Visual J# compiler and when the /platform option is not specified.
- x86
-
Compiles your assembly to be run by the 32-bit, x86-compatible CLR. This is the default behavior when you choose the 32-bit Visual J# compiler and when the /platform option is not specified.
- x64
-
Compiles your assembly to be run by the 64-bit CLR on a computer that supports the x64 or EM64T instruction set.
- Itanium
-
Compiles your assembly to be run by the 64-bit CLR on a computer that has an Itanium or IA64 processor.
Use the /platform option to specify the type of processor that the output file targets.
In general, .NET Framework assemblies written in Visual J# run the same regardless of the platform.
On a 64-bit Windows operating system:
-
Assemblies compiled with /platform:x86 execute on the 32-bit CLR running under WOW64.
-
Executables compiled with the /platform:anycpu execute on the 64-bit CLR.
-
A DLL compiled with the /platform:anycpu executes on the same CLR as the process into which it loaded.
For more information about how to develop an application that runs on a Windows 64-bit operating system, see 64-bit Applications.
Note |
|---|
| To be compatible with the previous releases of Visual J# Redistributable, the code generated by the 32-bit Visual J# compiler that ships with Microsoft Visual J# 2.0 Redistributable Package – Second Edition targets the x86 platform by default. To run the existing Visual J# applications natively on 64-bit platforms, rebuild the existing applications by using the /platform option and create anycpu or 64-bit platform-specific applications. |
The following example shows how to use /platform to specify that the application should only be run by the 64-bit CLR on a 64-bit Windows operating system for Itanium.
vjc /platform:Itanium myItanium.jsl
Other Resources
Visual J# Compiler