Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

java -jar

Posted on 2004-10-04
8
Medium Priority
?
388 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 500 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

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!

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

636 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