首页 \ 问答 \ 我对JDK,JRE和JVM的理解[已关闭](My understanding about JDK, JRE and JVM [closed])

我对JDK,JRE和JVM的理解[已关闭](My understanding about JDK, JRE and JVM [closed])

深入分析之后,我了解了JDK,JRE和JVM。 如果我错了,请纠正我的错误...

  1. JVM是JRE的子集,JRE是JDK的子集。
  2. JVM用于通过使用JRE将字节代码(* .class)转换为目标代码(机器代码)。
  3. JRE有操作系统(OS)指定由JVM用于字节码转换对象代码的DLL。
  4. 如果明天假设任何新的操作系统将启动,那么当前可用的JRE可能不支持用于字节码到机器码转换的JVM。 因此,JRE可能需要加强以支持即将推出的新操作系统。
  5. 所以从上面的分析中我得出结论,JVM对于所有操作系统都很常见,但JRE具有特定于操作系统的DLL,在字节代码转换过程中JVM将使用该DLL。

After my deep analysis this is how i have understand about JDK, JRE and JVM. Please correct me if i am wrong...

  1. JVM is subset of JRE, JRE is subset of JDK.
  2. JVM is used to convert the byte code (*.class) to object code(machine code) by using JRE.
  3. JRE has Operating System (OS) specify DLL which is used by JVM for byte code to object code conversion.
  4. If suppose tomorrow if any new OS will launch then the currently available JREs may not support the JVM for byte code to machine code conversion. So the JRE may required to enhance to support for the new upcoming OS.
  5. So from the above my analysis i am concluding like JVM is common for all OS but JRE has OS specific DLL which will be used by the JVM during byte code to object code conversion.

原文:https://stackoverflow.com/questions/21914466
更新时间:2023-06-21 15:06

最满意答案

在你的控制器中:

public ActionResult Index()
{
    DataTable dt = new DataTable();
    return View(dt);
}

在您的视图中:只需创建DataTable类型的模型

Inherits="System.Web.Mvc.ViewPage<System.Data.DataTable>"

迭代它:

 <% foreach (System.Data.DataRow row in Model.Rows) { %>

        <%= row["column"].ToString(); %>   

 <%}%>

In your controller:

public ActionResult Index()
{
    DataTable dt = new DataTable();
    return View(dt);
}

In your View: Just make your model of type DataTable

Inherits="System.Web.Mvc.ViewPage<System.Data.DataTable>"

To iterate over it:

 <% foreach (System.Data.DataRow row in Model.Rows) { %>

        <%= row["column"].ToString(); %>   

 <%}%>

相关问答

更多