我使用的是 Win7 64 位,当我尝试在 Eclipse 中启动 websphere 8 时,它显示
Get the following error when start the server :
Exception in thread "main" java.lang.NoClassDefFoundError: Files
Caused by: java.lang.ClassNotFoundException: Files
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at java.lang.ClassLoader.loadClass(ClassLoader.java:646)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:612)
Could not find the main class: Files. Program will exit.
但是当我进入第一步控制台并运行安装验证时,服务器启动并在 Eclipse 中启动。
请帮忙。
最佳答案
对我来说,这个问题的根本原因是最近为 JAVA_HOME
添加了一个环境变量,以及 %JAVA_HOME%\bin
的相应条目添加到我的 Windows PATH
中。这一切似乎在 cmd.exe
提示符/窗口内的任何内容中都能正常工作,但对于在 IDE 中启动的 WAS 脚本却无法正常工作。对我来说,有问题的 Program Files
引用就在这些变量中。删除这些定义并重新启动 IDE(重要!)似乎解决了我的问题。
关于java - 在 Eclipse 中启动 Websphere 8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13304865/