.jar file not running after export

9c942209db7f0f7b321850761367fbf7
0
nileharis 101 Nov 06, 2013 at 14:42

Hi guys, i want so help with my homework.

Below is my code, which i can run fine via console in eclipse, but when i export it as executable jar file it just doesnt open.

Here is the code:

    package palindrom;
import java.util.Scanner;
import java.util.Arrays;
import java.lang.*;
import java.util.regex.Pattern;


public class Palindrom {
    
    
    
    public static void main(String[] args){
        
        String dosmstring;
        int i=0;
        int d=0;
        int k,n;
        int l=0;
        int m;
        int f=0;
    
        
        char temp[]=new char[100];
        char pik2[]=new char[100];
        Scanner neo=new Scanner(System.in);
        String s=neo.nextLine();
    
    
        long time=System.nanoTime();
        System.out.println("The time in nanoseconds is:");
        System.out.println(time);


        String arr1 = s.replaceAll("[^a-zA-Z0-9]+","");
        String kain1=arr1.toLowerCase();
        String firstname11 = kain1.replaceAll("\\d","");
        String telik=firstname11.replaceAll("\\s+","");
    
        k=telik.length();
        d++;
        m=0;
        while(k!=0){
                
                
            temp[i]=firstname11.charAt(m);
            
            i++;
            k--;
            m++;
                
        }
        
        n=telik.length();
        while(n!=0){
            pik2[f]=firstname11.charAt(n-1);
        
            f++;
            n--;
        }
        boolean TelikApot=Arrays.equals(temp,pik2);
        if (TelikApot==true){
            
            System.out.println("H frash einai palindromikh");
        }
        else
        {
            System.out.println("H frash dn  einai palindromikh");
        }
    }
}

Please can u help me? :(( thanks

1 Reply

Please log in or register to post a reply.

A638aa42130293f319eda7fa4ba121f4
0
fireside 141 Nov 06, 2013 at 18:07

That’s really an eclipse kind of thing, so you need to ask on their forums. I found this link with same problem: http://stackoverflow.com/questions/17936526/why-wont-my-eclipse-executable-jar-run-with-a-double-click

Hope you find an answer.