newbie java question

TheDude05

Limp Gawd
Joined
Jan 27, 2005
Messages
393
Let me say before I've never programmed in java and never used any of its web j2ee web services.

I'm trying to use jasper reports and im not sure how it suppose to be "installed". Its in a .jar archive which I thought were for java executables. Am I suppose to extract the files out to a common library folder or my application folder or what? I'm wanting to use it on my tomcat server and eventually writing a java class to interface with my php webapp.. (going to use java-php bridge) I'm on linux if it makes any difference. I'm confused... :( help!
 
Try right-clicking on the file.

Then hover over the "Open With" option on the context menu and select:

Java(TM) 2 Platform Standard Edition binary

This should run the .jar file as an executable. You probably need to have the Java Runtime Environment (JRE) installed on your machine to do this.

Edit: Additionally, .jar is not just for executables. Think of a JAR file more like a ZIP file. In fact, it is an extension of that format. It was given that name since it is supposed to be like a jar, you know, the kind with a lid that you store things in.
 
Well I dont have gnome installed on this machine yet so i'm in a ssh session. If run try and run it on the command line it complains about not having a "main" function which leads me to believe it just a bunch of classes and not an actual running program
 
Ok, sorry I've not used Jasper reports before, and was assuming it was installable and gave you Windows based instructions.

I looked at the JAR and it does not appear to be executable.
Basically, it is filled with compiled .class files. You should be able to use these directly by including the Jar file in your class path when you execute *your* program.

The API for using the provided objects is free on the web as well. If that is not enough for you to figure it out, then you can buy the complete documentation for $50. Of course, that is how they make their money so there's no motivation to make sure you can pick Jasper up purely from the API. I've heard good things about the e-book. Of course, it is no longer 'free' then.

Anyway, you should be good to go. Just write your code with the proper imports and make sure that jar is in your class path.
 
Back
Top