Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/02/2011, 12:34
Avatar de Pafate
Pafate
 
Fecha de Ingreso: mayo-2010
Mensajes: 232
Antigüedad: 13 años, 11 meses
Puntos: 1
No corre el .jar

Hola.

Estaba probando lo de crear ejecutables, para ello cree un codigo chiquito que te pide 2 datos y despues lo muestra.

En consola corre...
pero cuando lo hago ejecutable (Clean & Build main project) el .jar no corre.
Piensa un segundo y no hace nada.

Código:
package jav;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Jav {

    public static void main(String[] args) throws IOException {
     
	int n;
	String nom;
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	System.out.println("hola");
	nom = (br.readLine());
	System.out.println("ingrese su edad");
	n = Integer.parseInt(br.readLine());
	System.out.println(n);
	System.out.println(nom);

    }

}
Alguna idea?.

PD:
Nose si les interesa esto pero bueno

Código:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.1
Created-By: 1.6.0_23-b05 (Sun Microsystems Inc.)
Main-Class: Jav.Jav
Class-Path: 
X-COMMENT: Main-Class will be added automatically by build