Jasper report on java
When I try to execute the sample code. Some error occur.
Code : Quote:
Quote:
|
You seems to run your app with a JRE while a JDK is expected.
|
How to solve this problem?
|
By using the java command that is part of a JDK installation and not from a JRE one.
|
I am using Netbeans as my IDE. So I think it should be okie. Or maybe got some toher setting?
|
And you run your code from netbeans ?
Then perhaps the issue is simply you haven't javac in your PATH. |
Yeah. I running all my code from netbeans. But I just face this problem in this project only. So other project is no prolem at all. I running the netbeans in my slackware. I had set the PATH. the problem still the same.
Compiling the file was no any problem. This problem occur when run the project. |
I still believe there is a problem with your PATH. NetBeans doesn't need javac to compile, but jasper reports needs it.
|
So I set the PATH. Output is this.
Quote:
|
You may have two JRE's installed one along with jdk 1.5.0_07 and one here /usr/lib/java/bin:/usr/lib/java/jre/bin, Did you install the jdk seperately or install it as part of netbeans. Also before installation get rid of previous jre that may have come with the distro you are using.
the command java -version will let you know which jre installation is applied to PATH. |
I think should be a copy of JRE bundle with the distro that I using. Then I install the JDK. Then following by Netbeans.
Quote:
|
okay now try the command...
/usr/lib/java/jre/bin/java -version or it maybe /usr/lib/java/bin/java -version see if you get the same result as above. As for your problem you mat have to add jasper to your classpath with netbeans... |
What says "type javac" or "which javac".
How do you launch netbeans ? are you doing it from the same console where you set the PATH ? |
Dude, I know what is my problem by follow your guides. I had settle it.
So firstly, I located the java. I means the default java which come with the distro in /usr/lib/java which is link with the JRE. I delete the link and link it with the JDK that I installed in the earlier time. And it settle my problem. Thanks bro on your guide. |
All times are GMT -5. The time now is 03:34 PM. |