Solved

Problem running jar file

Posted on 2011-03-06
9
391 Views
Last Modified: 2012-05-11
I am trying to run milk-1-0.jar file from this website. I have jre installed and set my classpath using: set CLASSPATH=C:\Users\chudy\Desktop\Work\wekafiles\milk\milk-1-0.jar . When I am trying to run the file from a command line using java milk.classifiers.DD -t data.arff according to this file http://www.cs.waikato.ac.nz/~ml/milk/README I am getting following error message:

Exception in thread "main" java.lang.NoClassDefFoundError: milk/classifiers/DD
Caused by: java.lang.ClassNotFoundException: milk.classifiers.DD
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: milk.classifiers.DD.  Program will exit.

How to run it?
0
Comment
Question by:chudyksg
  • 7
9 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 35046323
Please run the following and attach the file listing.txt
jar tv milk-1-0.jar >listing.txt

Open in new window

0
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 35046365
Just checked: that jar file is not intended to be used like that: you need to unjar it and place the root folder in your classpath
0
 

Author Comment

by:chudyksg
ID: 35046371
I try to run it but nothing is happening. It just creates and empty txt file
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35046377
How are you trying to run it?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 86

Expert Comment

by:CEHJ
ID: 35046441
If you run the app without arguments, it will tell you what arguments you need
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35046650
I explained the problem clearly. The software runs for me
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35063212
Accept http:#35046365 please
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35068070
:)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

867 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now