users@glassfish.java.net

Re: Please help me with integrating javax.persistence into GlassFish

From: Markus KARG <markus.karg_at_gmx.net>
Date: Mon, 14 Jul 2008 17:45:59 +0200

I do not see what that has to do with GlassFish.

Despite this possibly subjective feeling, I would think that you forgot
to tell your IDE that your project shall use JasperReports on its classpath.

Regards
Markus

glassfish_at_javadesktop.org schrieb:
> The problem is more than just the library.
>
> I have noticed any library I add will not work through the import statement. For example:
>
> My code looks like the following:
>
> import net.sf.jasperreports.engine;
>
> private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {
> // TODO add your handling code here:
>
> try {
> String reportName = "mystuff.jasper";
>
> InputStream fis = this.getClass().getClassLoader().getResourceAsStream(reportName);
>
> JasperPrint print = JasperFillManager.fillReport(fis, new HashMap(), new JREmptyDataSource());
> }
> catch (Exception ex)
> {
> ex.printStackTrace();
> }
> }
>
>
> The Netbeans 6.1 IDE tells me on the import line that net.sf.jasperreports does not exist. However, if I comment out the import line and fully qualify the reference to the libarary it compiles. For example:
>
> try {
> String reportName = "myreport.jasper";
>
> InputStream fis = this.getClass().getClassLoader().getResourceAsStream(reportName);
>
> net.sf.jasperreports.engine.JasperPrint print = net.sf.jasperreports.engine.JasperFillManager.fillReport(fis, new java.util.HashMap(), new net.sf.jasperreports.engine.JREmptyDataSource());
> }
> catch (Exception ex)
> {
> ex.printStackTrace();
> }
> }
>
> This is all after I have gone to the properties of the project and added the JasperReport Library.
>
> I think it is a bug in the IDE. Netbeans, any comments?
> [Message sent by forum member 'srmcatee' (srmcatee)]
>
> http://forums.java.net/jive/thread.jspa?messageID=286286
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>


-- 
http://www.xing.com/go/invita/58469