Mostrando entradas con la etiqueta Java. Mostrar todas las entradas
Mostrando entradas con la etiqueta Java. Mostrar todas las entradas

sábado, 1 de diciembre de 2012

JVM fonts and JasperReports

Error:

net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'Arial' is not available to the JVM.
Causa:

En Ubuntu no existe el mismo tipo de letra que en Windows

Solución:

a) Instalar las fuentes de Windows en Ubuntu

    Ejecutar:

sudo apt-get install --reinstall ttf-mscorefonts-installer

b) Existe un .jar donde se empaquetaron las fuentes más comunes de Windows que no existen en Ubuntu.

 Ver este link



Mi Ambiente de Trabajo:

- Ubuntu 10.4

- Eclipse 3.X

- JasperReports 3.7.2

- Tomcat 6.x

miércoles, 1 de agosto de 2012

jueves, 1 de diciembre de 2011

sábado, 7 de mayo de 2011

Convertir un Byte Array a InputStream

byte[] bytes = ... //get byte array from somewhere.

InputStream input = new ByteArrayInputStream(bytes);

int data = input.read();
while(data != -1) {
//do something with data

data = input.read();
}
input.close();


Note: The proper exception handling has been skipped here for the sake of clarity. To learn more about correct exception handling, go to Java IO Exception Handling.

Obtener más información del tema

Struts File Upload and Save

Subir archivos en nuestra web
Struts File Upload and Save