实时 Java 互操作性

发布于 2024-07-13 16:03:59 字数 265 浏览 6 评论 0原文

我想知道rtsj中的JRE6和JVM之间的互操作性如何。 看来我只能使用他们的实现(因为代码将使用他们的 JVM 进行解释),因此我无法使用 Java 6 提供的许多功能。 它可以支持图形用户界面吗? (例如修改工业过程的参数)。

我可能是错的,希望能得到你的反馈。

而且,Java 的实现似乎更加实时。 您使用过哪一款,您最喜欢哪一款?

I am wondering how it's the interoperability between JRE6 and the JVM from rtsj. It seems that I have to use only their implementation (since the code will be interpreted using their JVM), so I cannot use many of the features that Java 6 has to offer.
Can it support a GUI? (say for example to modify the parameters of an industrial process).

I might be wrong, hoping to get some feedback from you.

Also, it seems that are more real time implementations for Java. Which one did you use and which one did you like most?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

甜扑 2024-07-20 16:03:59

为了提供实时行为,JVM 需要经过专门设计。 这包括操作系统级别的集成,以访问主机操作系统的实时调度功能。

例如,Sun 实时 JVM 与 J2SE5 兼容。 http://java.sun.com/javase/technologies/realtime/ faq.jsp#4

一般来说,提供特定功能(如安全性或实时行为)的系统(操作系统、JVM 等)的任何专用实例往往是通用版本之后的版本。

至于使用 GUI 进行实时,您应该研究使用 JMX、RMI 或 Web 服务(以最轻量级为准)等实时流程的 2 层客户端-服务器控制。 直接在实时代码中使用 GUI 似乎可能会给应用程序带来许多潜在问题,因为它试图在实时约束下执行。

In order to provide real-time behavior, the JVM needs to be very specifically engineered. This includes integration at the operating system level to get access to real-time scheduling features of the host OS.

The Sun rea-time JVM is compatible with J2SE5, for instance. http://java.sun.com/javase/technologies/realtime/faq.jsp#4

Generally, any specialized instance of a system (OS, JVM, etc) that offers niche functionality, like security or real-time behavior, tends to be a release behind the general purpose version.

As to using a GUI for real-time, you should investigate using 2 tier client-server control of the real-time process using something like JMX, RMI or web-services (whichever is the lightest-weight). Using a GUI directly in real-time code seems like it could introduce lots of potential problems for the application as it tries to execute withing real-time constraints.

花开半夏魅人心 2024-07-20 16:03:59

请参阅我对另一个问题的回答有关 RTSJ 商业级实施的更多示例。 最新版本 (2.1) 与 JDK1.5 兼容,因此您应该可以使用 Swing/AWT。

虽然编写一个 GUI 在与实时进程相同的 JVM 中执行是可行的,但尚不清楚这是否是一个好的架构决策。 您更有可能更愿意隔离 JVM 中的实时行为,并提供一个可分离的接口,在单独的内存空间中实现 GUI。

原则上,您应该能够编写 RTSJ 代码,使其与非实时线程在同一个 JVM 中运行(我已经做了很多这样的事情),但要正确实现同步可能很困难。

See my answer to another question for some more examples of RTSJ commercial-grade implementations. The latest version (2.1) is compliant with JDK1.5, so you should have Swing/AWT available.

While it is feasible to write a GUI to execute within the same JVM as real-time processes, it's not clear that this is a good architectural decision. It is more likely that you'd prefer to isolate the real-time behaviors in a JVM and provide a separable interface that implements to GUI in a separate memory space.

In principle, you are supposed to be able to write RTSJ code such that it runs in the same JVM with non-real-time threads (and I have done a lot of this) but it can be tough to get synchronization right.

山人契 2024-07-20 16:03:59

正如本书所述,Sun的JRE之间可以存在互操作性Java 和 rtsj 实现。

As this book describes, there can be interoperability between the JRE of Sun Java and the rtsj implementation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文