error: package net.sf.dynamicreports.jasper.builder does not exist - java

I want to ask something regarding this error. I am using dynamicreports to generate report and after i compiled and run the program this error occured.
error: package net.sf.dynamicreports.jasper.builder does not exist
error: package net.sf.dynamicreports.report.builder does not exist
error: package net.sf.dynamicreports.report.builder.column does not exist
error: package net.sf.dynamicreports.report.builder.component does not exist
error: package net.sf.dynamicreports.report.builder.datatype does not exist
error: package net.sf.dynamicreports.report.constant does not exist
error: package net.sf.dynamicreports.report.exception does not exist
what is lacking in my code in order this package to be recognized by the JVM during runtime?

Its possible that dynamicreports is not present in the code Run path..can you please specify how you are running your code.
You can use the following command :
java -classpath <path of dynamicreports jar>;your_jar MainClass

Related

no main manifest attribute, when trying to run a jar file

I'm trying to run this Java GUI application but I'm not sure how to get it to run. The project is located here: https://gitee.com/gangshushu/v7/tree/master/admon_gui/one-jar.
My initial attempt was:
java -jar one-jar-ant-task-0.97.jar
But I end up with the error:
no main manifest attribute, in one-jar-ant-task-0.97.jar
Doing some search around, Failing to run jar file from command line: “no main manifest attribute”, I ended up running:
java -cp one-jar-ant-task-0.97.jar Main
But I end up with another error message:
Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
Searching around gave me some information overload here: What does "Could not find or load main class" mean?
How do I run this Java program? This is my first time trying to run a jar file, and I'm a little stuck.
Am I trying to run the Java program the wrong way?
Your main class is in a package, you need to specify in what package to find your main class. Try the following command line:
java -cp one-jar-ant-task-0.97.jar com.beegfs.admon.gui.program.Main

Cannot find symbol error while compiling java class from the command line

I want to compile a java class called Contrat.java which is using an object of the class ListContrat.java both classes are located in the same folder whose path is : C:\Users\hue7\workspace\Test\src\com\sky, I tried to compile (create .class) executing the following commands from the folder namded sky:
javac Contrat.java and javac -cp ListContrat.java Contrat.java both gives the error:
Contrat.java:21: error: cannot find symbol
protected List<ListContrat> contrat;
^
symbol: class ListContrat
location: class Contrat
Contrat.java:23: error: cannot find symbol
public List<ListContrat> getContrat() {
^
symbol: class ListContrat
location: class Contrat
Note: Contrat.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
But when I execute the command javac Contrat.java from src folder it works correctly.
Can anyone explain why please ?
Finally I resolved the error, executing the command from the src folder.

Package R does not exist even when the package in the java files matches the one in the Manifest file

I'm a beginner with Android developpement and I don't use Android Studio but Atom.
I have this error when I try to compile my code :
gradle build
:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
/home/sofian/Programmation/Web/phone-appli/src/main/java/fr/cavallones/phoneappli/MainActivity.java:8: error: cannot find sym
bol
import fr.cavallones.phoneappli.R;
^
symbol: class R
location: package fr.cavallones.phoneappli
/home/sofian/Programmation/Web/phone-appli/src/main/java/fr/cavallones/phoneappli/MainActivity.java:18: error: package R does
not exist
setContentView(R.layout.layout_activity);
^
2 errors
The source code on github : https://github.com/Cavallones/phone-appli
Thanks a lot for the help !

Configure Eclipse Plugin for Apache Hadoop2.7.2

I am using this for configuring eclipse in windows 8.1. I compiled hadoop 2.7.2; when I entered
ant jar -Dversion=2.7.2 -Declipse.home=C:/eclips/eclipse -Dhadoop.home=D:/Hadoop/hadoop-2.7.2
Buildfile:C:\hadoop2x-eclipse-plugin\src\contrib\eclipse-plugin\build.xml
I got lots of errors. I don't know where I should find compiler output and what is NewDriverWizard?
pache\hadoop\eclipse\NewDriverWizard.java:22: error: package org.eclipse.core.ru
ntime does not exist
[javac] C:\hadoop2x-eclipse-plugin\src\contrib\eclipse-plugin\src\java\org\a
pache\hadoop\eclipse\NewDriverWizard.java:24: error: package org.eclipse.jdt.cor
e does not exist
[javac] C:\hadoop2x-eclipse-plugin\src\contrib\eclipse-plugin\src\java\org\a
pache\hadoop\eclipse\NewDriverWizard.java:25: error: package org.eclipse.jdt.int
ernal.ui.wizards does not exist
.
.
.
BUILD FAILED
C:\hadoop2x-eclipse-plugin\src\contrib\eclipse-plugin\build.xml:76: Compile fail
ed; see the compiler error output for details.

error: package org.jsoup.Jsoup does not exist while compiling the class using command prompt

While compiling a java class in which I had imported packages such as org.jsoup.Jsoup, the following error was retrieved:
package org.jsoup does not exist.
I don't know how to add the classpath for jsoup-1.8.1.jar file.
Try:
java -cp .:jsoup-1.8.1.jar JsoupTest

Categories

Resources