Solved

Problem running jar file

Posted on 2011-03-06
9
402 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 86

Expert Comment

by:CEHJ
ID: 35046377
How are you trying to run it?
0
 
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 AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
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 …

773 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