Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Runnable JAR file export | JAR creation failed.(Could not find main method from given launch configuration)
Runnable JAR file export | JAR creation failed. [message #1777734] Sun, 03 December 2017 17:24
Alessandro Zavattaro is currently offline Alessandro ZavattaroFriend
Messages: 1
Registered: December 2017
Junior Member
Hey everyone,

I receive this error while using the Runnable JAR File Export Wizard to export a small java application (File-> New-> Java Project) with GUI made with WindowBuilder (File-> New -> Other ->WindowBuilder-> Swing Designer -> Application Window):

index.php/fa/31480/0/

I'm using Eclipse 4.7.1a. and the project was originally built using the default environment JRE: Java-SE 9.0.1 and executed with the default Run Configuration.
The application works fine, also when launched with: Run as-> Java Application.

This is the current Run Configuration I'm using:

index.php/fa/31481/0/

index.php/fa/31482/0/

I don't really know why it can launch normally the application but not exporting it as runnable jar, please note Project and Class (under the Main Class tab in the first image) are correct.

What I tried:

  • Deleted the current 'Run Configuration', cleaned the project, then re-built/re-launched
  • Deleted the current workspace, and created a new one re-importing the exported project as a .rar archive
  • Created a new Java project changing the version of environment JRE to JAVA-SE 1-8
  • Updated Eclipse to Eclipse Photon 2018 v.4.8 M3 version
  • Re-started / Deleted / Re-installed Eclipse Oxygen 4.7.1a
  • Compiling with JAVAC / JAVA with CMD prompt: JAVAC command create the correct .class file, while JAVA command give me the error: "java.lang.NoClassDefFoundError" exception, referred to the main method


Someone can help me, I don't know really what other do??
I've of course the main method in my main jBit class.
  • Attachment: img1.jpg
    (Size: 57.79KB, Downloaded 96 times)
  • Attachment: img2.jpg
    (Size: 143.57KB, Downloaded 105 times)
  • Attachment: img3.jpg
    (Size: 146.91KB, Downloaded 95 times)
Previous Topic:Newly Imported Projects Not Showing After Update
Next Topic:How to install new software for eclipse mips64el platform
Goto Forum:
  


Current Time: Thu Dec 14 10:24:54 GMT 2017

Powered by FUDForum. Page generated in 0.02499 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software