4

I need to run a Java application, which we are trying to port to Java 6, on an NT box.

I manage to run java 5 on it (although not officially supported), but when I try to run java 6 I get the following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Program Files\Java\jre1.6.0_05\bin\awt.dll: The specified procedure could not be found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at sun.security.action.LoadLibraryAction.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
    at sun.awt.DebugHelper.<clinit>(Unknown Source)
    at java.awt.EventQueue.<clinit>(Unknown Source)
    at javax.swing.SwingUtilities.invokeLater(Unknown Source)
    at ui.sequencer.test.WindowTest.main(WindowTest.java:136)

Anybody has any idea how to solve this?

This persists even when I move the java executables to another directory with no spaces in its name.

p.s. I know, I should upgrade, but it's not up to me or my company - this is a very very bug huge gigantic company we work with, and they intend to keep NT for another 5 years.

4

3 回答 3

2

好的,感谢所有观众以及@Roel Spiker 和@Partyzant 的回答。

这是不可能的。除非你在 NT 机器上安装 windows2000。这是因为 awt.dll fr J6SE 在 User32.dll 中使用了新方法,它是 windows 操作系统的一部分(链接到 kernel.dll 等)。使用 dll 依赖walker 自己看看。另一种可能的解决方案是稍微改变 OpenJDK 以使用 Windows NT 中可用的其他方法。

于 2008-10-03T09:16:10.367 回答
1

Java SE 6 requires at least Windows 2000.

于 2008-09-30T10:14:00.640 回答
1

如果您没有使用 GUI,例如 AWT、Swing 或 SWT,您可以尝试以无头模式启动应用程序。有关详细信息,请参阅http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/。要以无头模式启动 java,请使用java -Djava.awt.headless=true

它将处理 UnsatisfiedLinkError。我不知道这是否是唯一的障碍。

于 2008-09-30T11:12:26.663 回答