Renter Posted August 2, 2006 Share Posted August 2, 2006 Hi. I check out JasperReports with NB 5.0 and Japplets. I followed the instructions to integrate and setup JasperReport (Vers.: 1.2.5) into Netbean 5.0. After some small probs, I could now compile and start the JApplet with all JARs. But it did not work. The JAVA consle (1.5.0_06) tells me: Code:java.io.IOException: CreateProcess: javac -classpath C:PROGRA~1JavaJRE15~1.0_0classes "C:Dokumente und EinstellungenrenterDesktopHelloReportWorld_1154246681093_465389.java" error=2 at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) at java.lang.ProcessBuilder.start(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:62) at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileUnits(JRAbstractClassCompiler.java:67) at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:189) at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:105) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:211) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:144) at javaTAS.RTK_00jasperReport(javaTAS.java:128) at javaTAS.actionPerformed(javaTAS.java:1027) at javaTAS.BUTTON_MOUSE_CLICKED(javaTAS.java:870) at javaTAS.access$600(javaTAS.java:38) at javaTAS$FormListener.mouseClicked(javaTAS.java:818) at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) What have I to do, to work with JasperReports basically in JApplets? Thxrenter Link to comment Share on other sites More sharing options...
teodord Posted August 2, 2006 Share Posted August 2, 2006 Hi, Put the jdt-compiler.jar in the classpath. You can find it in the /lib directory of our distribution package. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
Renter Posted August 2, 2006 Author Share Posted August 2, 2006 it did not help...:( Post edited by: Renter, at: 2006/08/02 09:34 Link to comment Share on other sites More sharing options...
teodord Posted August 2, 2006 Share Posted August 2, 2006 Hi, The exception you posted comes from the fact that you are trying to compile a report template.By default, the engine tries to use the JDT-based compiler. If it does not find it in the classpath, then it tries to locate JDK-based compilers in the classpath. For this to succeed, you would have to have the tools.jar from JDK in the classpath. Apparently this too fails and then the engine tries to launch javac.exe from command line, but probably you don't have it in the path and this is why all eventually fails with the stack trace you see. I don't know much about JApplets, but it is something that has to do with the classpath. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
Renter Posted August 2, 2006 Author Share Posted August 2, 2006 my CLASSPATH content is: .;C:\Programme\Java\jre1.5.0_06\lib\ext\QTJava.zip;C:\JavaAddOns\jasper-1-2-5\lib\jdt-compiler-3.1.1.jar and a part of my PATH content is: ...C:\Programme\Java\jre1.5.0_06\bin;C:\JavaAddOnsjasper-1-2-5\lib the javac.exe fro general is a part of jre and not of the jdk, so even if it works on my development pc, how does it work with an workstation which has only the jre-version and no jdt-compiler.jar? the next thing is, in the code I tell the program to use sources and destinations on the server, where the japplet is located. I thought, what the jdt-compiler should be stored in the directory, where the japplet is located expanded as single files. But nothing will work. the backslashes are lost during posting...Post edited by: Renter, at: 2006/08/02 09:59 Link to comment Share on other sites More sharing options...
Renter Posted August 2, 2006 Author Share Posted August 2, 2006 Well, I've copied the javac.exe after long way of tries from the jdk-dir into the jre-dir and what surprise, something more happens, but for this one I need perhaps some general notes. The point is, the comipler want to compile a <name>.class file from the location: c:|dokumente und einstellungen|renter|desktop|HelloReportWorld_1154529550687_463418.class together with error message: (the system can not find the named file) What is the sense for this class file, is it temporary and who produces what file? I placed a | where normally a backslach appears...Post edited by: Renter, at: 2006/08/02 15:03 Link to comment Share on other sites More sharing options...
teodord Posted August 3, 2006 Share Posted August 3, 2006 Hi, You would not have such hard times with copying exe files and temp files and all if you would somehow find out why the JDT-jar is not found in the classpath of the process you are running from NetBeans.I'm not an expert in NetBeans, but there must be an easy way to add third-party JARs to projects. Note that the JDT compiler does not work with temp files on disk and is up to 10 times faster than the JDK one. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now