hello everyone,
the source code for my program is
import java.util.*;
class Sort
{
public static void main(String q[])
{
long start=System.currentTimeMillis();
int a[]=new int[100000];
Random r=new Random();
for(int i=0;i<a.length;i++)
a[i]=r.nextInt();
for(int i=0; i<a.length-1;i++)
{
for(int j=i+1;j<=a.length-1;j++)
{
if(a[i]>a[j])
{
int t=a[j];
a[j]=a[i];
a[i]=t;}
}}
long end=System.currentTimeMillis();
System.out.println("time:"+(end-start));
}}
then i have a created jar file of this program using following commands int the command prompt:
echo Main-Class: Sort >manifest.txt
jar cvfm Sort.jar manifest.txt Sort.class
This creates the jar file. But when I try to run it by double clicking i get the error 'could not find main class. the program will exit'
Also when i try to run it in command prompt I get an exception that it could not find the main class.
What should I do?