Solved

java -jar

Posted on 2004-10-04
8
383 Views
Last Modified: 2013-11-23
I have a jar file called dumbster.jar

This jar file has several classes and a manifest file.
A class with this jar file, SimpleSmtpServer.class , is defined as such:
SimpleSmtpServer implements Runnable
 public void run() {
...

I was having a problem with the manifest file, so I added the following:
Main-Class: SimpleSmtpServer

Now I receive this error:
Exception in thread "main" java.lang.NoClassDefFoundError: SimpleSmtpServer

Now what?
0
Comment
Question by:Paullkha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 6

Expert Comment

by:expertmb
ID: 12217334
Main-Class: SimpleSmtpServer

does this class contains main() method in it
0
 
LVL 6

Expert Comment

by:expertmb
ID: 12217379
>>Exception in thread "main" java.lang.NoClassDefFoundError: SimpleSmtpServer
put complete package name
Main-Class: com.abc.def.ghi.SimpleSmtpServer
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 12217783
I believe your jar is meant to act as an applet library.
;JOOP!
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Expert Comment

by:babuno5
ID: 12238972
Hello
Main-Class:
this usually contains the name of the Class which contains the main Function

"main" java.lang.NoClassDefFoundError: SimpleSmtpServer
Usually this error comes when the Class does not contain the main class or
when the classpath is having some problems.
try putting the name of main class
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 12246096
... and an Apllet doesn't contain a main ... because the browser it will run in has the main().
Try to run this jar in an appletviewer !
;JOOP!
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 12246098
I meant   Applet   not Apllet.
;JOOP!
0
 
LVL 2

Author Comment

by:Paullkha
ID: 12248274
 public void run() {
that is all it has , no main


 I will try the Applet - not sure of all of this...
0
 
LVL 15

Accepted Solution

by:
babuno5 earned 125 total points
ID: 12249922
Hello,
well do u have a applet or a program containing main
well if applet then it can only be executed by a browser or appletviewer
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question