Tag: runtime error

NoClassDefFoundError:Mac计算机上的javax / swing / GroupLayout $组

我只在Mac计算机上测试Java程序时出现运行时错误。 它在各种Windows操作系统上测试完美。 这是我在Mac计算机上收到的错误消息… 线程“AWT-EventQueue-0”中的exceptionjava.lang.NoClassDefFoundError:javax / swing / GroupLayout $ project.MainPanel.calculateButtonActionPerformed(MainPanel.java:198)at project.MainPanel.access $ 200(MainPanel.java:32) at project.MainPanel $ 3.actionPerformed(MainPanel.java:97)at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)at javax.swing.AbstractButton $ Handler.actionPerformed(AbstractButton.java:2202)at javax.swing .DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)位于java.awt的javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)的javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)。 java.awt.Container.processEvent上的java.awt.Component.processEvent(Component.java:5367)中的javax.swing.JComponent.processMouseEvent(JComponent.java:3135)上的Component.processMouseEvent(Component.java:5602) .java:2010)java.awt.Con上的java.awt.Component.dispatchEventImpl(Component.java:4068) tainer.dispatchEventImpl(Container.java:2068)位于java.awt.Light上的java.awt.Component.dispatchEvent(Component.java:3903)java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)java.awt.LightweightDispatcher.processMouseEvent(Container) .java:3936)java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)at java.awt.Container.dispatchEventImpl(Container.java:2054)at java.awt.Window.dispatchEventImpl(Window.java:1801) java.awt.EventDispatchEvent(EventQueue.java:463)java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatch!)的java.awt.Component.dispatchEvent(Component.java:3903) Thread.j ava:269)java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java: 176)at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)\ 我不知道为什么会这样。 我在Windows计算机上编译程序的事实可能是问题吗? 这是我唯一能想到的。

Hadoop Basics的MapReduce程序中的java.lang.NoClassDefFoundError

我正在尝试Hadoop的Basic MapReduce程序,其教程在http://java.dzone.com/articles/hadoop-basics-creating 该类的完整代码是(代码存在于上面的url上) import java.io.IOException; import java.util.StringTokenizer; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.input.KeyValueTextInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.apache.hadoop.util.GenericOptionsParser; public class Dictionary { public static class WordMapper extends Mapper { private Text word = new Text(); public void map(Text key, Text value, Context context) throws […]

如何修复Eclipse Java虚拟机启动程序错误?

就像标题所说的那样,我遇到了eclipse JVM启动器的问题。 昨晚,一切都运转良好,据我所知,从那时起我的电脑上一切都没有变化。 但是,我今天早上醒来发现当我在eclipse中运行我的任何项目时,我发现了这个错误: Java Virtual Machine Launcher- Error: could not open C:\Program Files\Java\jre1.8.0_60\lib\amd6jvm.cfg 我已经validation了Path变量的完整性,( C:\Program Files\Java\jdk1.8.0_65\bin )现在,您可能会注意到,我的jdk是65版。我的JRE和Java安装也是如此。 我不明白为什么eclipse使用jre 60.我也检查了偏好并改变了jre版本65.没有运气。 此外,我运行了一个简单的java文件,没有通过命令行使用eclipse,运行/编译就好了。 我尝试将-vm标签(它还没有存在)添加到eclipse.ini并将其设置为jvm,但它没有帮助。 (我除了它)我不知道该做什么…请帮助,我已经尝试了我知道怎么做的一切。 谢谢! 编辑: 我的eclipse.ini文件如下: -startup ../../../.p2/pool/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar –launcher.library ../../../.p2/pool/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417 -product org.eclipse.epp.package.java.product –launcher.defaultAction openFile –launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform –launcher.XXMaxPermSize 256m –launcher.defaultAction openFile –launcher.appendVmargs -install C:/Users/Sanjiv/eclipse/java-mars/eclipse -vmargs -Dosgi.requiredJavaVersion=1.7 -Xms256m -Xmx1024m -Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest -Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/ 编辑2我已经尝试重新安装java,eclipse和jdk。

Spring boot 1.5.2 – 加载徽标后Web应用程序停止了吗?

我有一个非常奇怪的Spring Boot问题,我不知道为什么使用Spring Boot的Web应用程序无法启动,即使我直接在终端上运行它也没有输出错误。 java -jar /var/lib/tomcat/webapps/rasdaman.war log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.StandardServletEnvironment). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. . ____ _ __ _ _ /\ / ‘ __ _ () __ __ _ \ \ \ ( ( )__ | ‘_ | ‘| | ‘ […]

NetBeans中找不到主类

我一直在为我的class级编程工作。 我正在使用NetBeans。 我完成了我的项目并且工作正常。 当我尝试运行它时,我收到一条消息“没有找到主要类”。 以下是一些主要的代码: package luisrp3; import java.io.FileNotFoundException; import java.io.PrintStream; public class LuisRp3 { public static void main(String[] args) throws FileNotFoundException { java.io.File newFile = new java.io.File(“LuisRamosp4.txt”); if (newFile.exists()) { newFile.delete(); } System.setOut(new PrintStream(newFile)); Guitar guitar = new Guitar(); 我以前发过这个,但有几个问题。 我已经修复了其他人,现在剩下这一个了。 任何建议将不胜感激。

“错误:在MyClass类中找不到主要方法,请将主方法定义为……”

新Java程序员在尝试运行Java程序时经常会遇到这些消息。 Error: Main method not found in class MyClass, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application Error: Main method is not static in class MyClass, please define the main method as: public static void main(String[] args) Error: Main method must return a value […]