Java-jar execution of Eclipse export jar package error handling

Source: Internet
Author: User

1. Error 1

F:\>java-jar Remotelogin.jar
Exception in Thread "awt-eventqueue-0" Java.lang.noclassdeffounderror:com/alibaba/fastjson/json
At Com.diantusoft.LoginWindow.getFingerPrintFromDB (loginwindow.java:819)
At Com.diantusoft.LoginWindow.login (loginwindow.java:630)
At Com.diantusoft.loginwindow.access$8 (loginwindow.java:577)
At com.diantusoft.loginwindow$13.mouseclicked (loginwindow.java:509)
At Java.awt.Component.processMouseEvent (component.java:6528)
At Javax.swing.JComponent.processMouseEvent (jcomponent.java:3324)
At Java.awt.Component.processEvent (component.java:6290)
At Java.awt.Container.processEvent (container.java:2234)
At Java.awt.Component.dispatchEventImpl (component.java:4881)
At Java.awt.Container.dispatchEventImpl (container.java:2292)
At Java.awt.Component.dispatchEvent (component.java:4703)
At Java.awt.LightweightDispatcher.retargetMouseEvent (container.java:4898)
At Java.awt.LightweightDispatcher.processMouseEvent (container.java:4542)
At Java.awt.LightweightDispatcher.dispatchEvent (container.java:4462)
At Java.awt.Container.dispatchEventImpl (container.java:2278)
At Java.awt.Window.dispatchEventImpl (window.java:2750)
At Java.awt.Component.dispatchEvent (component.java:4703)
At Java.awt.EventQueue.dispatchEventImpl (eventqueue.java:751)
At java.awt.eventqueue.access$500 (eventqueue.java:97)
At Java.awt.eventqueue$3.run (eventqueue.java:702)
At Java.awt.eventqueue$3.run (eventqueue.java:696)
At java.security.AccessController.doPrivileged (Native Method)
At Java.security.protectiondomain$1.dointersectionprivilege (protectiondomain.java:75)
At Java.security.protectiondomain$1.dointersectionprivilege (protectiondomain.java:86)
At Java.awt.eventqueue$4.run (eventqueue.java:724)
At Java.awt.eventqueue$4.run (eventqueue.java:722)
At java.security.AccessController.doPrivileged (Native Method)
At Java.security.protectiondomain$1.dointersectionprivilege (protectiondomain.java:75)
At Java.awt.EventQueue.dispatchEvent (eventqueue.java:721)
At Java.awt.EventDispatchThread.pumpOneEventForFilters (eventdispatchthread.java:201)
At Java.awt.EventDispatchThread.pumpEventsForFilter (eventdispatchthread.java:116)
At Java.awt.EventDispatchThread.pumpEventsForHierarchy (eventdispatchthread.java:105)
At Java.awt.EventDispatchThread.pumpEvents (eventdispatchthread.java:101)
At Java.awt.EventDispatchThread.pumpEvents (eventdispatchthread.java:93)
At Java.awt.EventDispatchThread.run (eventdispatchthread.java:82)
caused By:java.lang.ClassNotFoundException:com.alibaba.fastjson.JSON
At Java.net.URLClassLoader.findClass (urlclassloader.java:381)
At Java.lang.ClassLoader.loadClass (classloader.java:424)
At Sun.misc.launcher$appclassloader.loadclass (launcher.java:331)

Workaround: Use export, Java-Runnable jar file instead Export-java jar file on your proj ECT (right mouse click).

2. Error 2:could not find Main method from given launch configuration

Reason: Choose the wrong launch configuration, naturally can not find the main method, choose to choose the one that includes the main method of the class as launch

Java-jar execution of Eclipse export jar package error handling

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.