I am new in Java, I want to run a Java program, it needs three jars: swt-3.6M3-win32-win32-x86.jar,DJNativeSwing-SWT.jar,DJNativeSwing.jar. I have them, but I do not know where I should put them. Can someone help me?
the following is the import codes:
import chrriis.dj.nativeswing.swtimpl.NativeComponent;
import chrriis.dj.nativeswing.swtimpl.NativeInterface;
import chrriis.dj.nativeswing.swtimpl.components.JWebBrowser;
import chrriis.dj.nativeswing.swtimpl.components.WebBrowserAdapter;
import chrriis.dj.nativeswing.swtimpl.components.WebBrowserEvent;
Add them to your class path. In Eclipse: Right click the project>Properties>Java Build Path then add them as external jars.
Related
package esta.fontend;
import java.awt.*;
import java.sql.*;
import javax.swing.*;
import esta.dbConnection.ConnectionDB;
import net.proteanit.sql.DbUtils;// This is where i find the problem;
Image Link explaining my problem
rs2xml.jar doesn't contain the needed java class.
The most probably reason is that it was built incorrectly.
As you may see it contains 'src.net.proteanit.sql' which is empty.
So to fix the problem the jar should be rebuilt
The package should not include 'src' prefix
The DbUtils class should be truly included into it.
i need to import java.nio.file.* but cannot find the jar containing this package
I installed new version of jdk 1.8 but still i cannot import this package .Can anybody tell me the jar file containing this package.
Thanks
I think the package want you to import is java input output.
Used this
import java.io.file.*;
Instead of
import java.nio.file.*;
Here's the thing: I've downloaded the javax.mail API, added it under Libraries->Add Jar/Folder. I've compiled the code, but it keeps yielding an error on the 'import javax.mail;' sentence, saying that the package does not exist. What is going wrong?
You've mentioned this line:
import javax.mail;
This won't work, because mail is a package and not a class. Either use:
import javax.mail.*;
to import the whole package or import specific classes using:
import javax.mail.Header;
import javax.mail.Message;
import javax.mail.Session;
(the classes are randomly selected and should only show how to import a specific class)
you commented
I've extracted the javax.mail JAR file to the netbeans8.0.2 folder
you dont need to do that,
it should be enough to put the jar in your project's lib folder and maybe reference it in the build path.
cheers
I have copied my project from one system to another,now I am trying to run it,I am having a message in build path that 95 build path entries are missing. I am having main problem with importing some packages like:
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRField
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.xml.JRXmlLoader;
import com.mysql.jdbc.Connection;
import com.mysql.jdbc.PreparedStatement;
import com.mysql.jdbc.Statement;
import org.krysalis.barcode4j.BarcodeDimension;
import org.krysalis.barcode4j.HumanReadablePlacement;
import org.krysalis.barcode4j.impl.AbstractBarcodeBean;
import org.krysalis.barcode4j.impl.code128.Code128Bean;
import org.krysalis.barcode4j.impl.upcean.EAN13Bean;
import org.krysalis.barcode4j.output.java2d.Java2DCanvasProvider;
import org.jdesktop.swingx.JXTaskPane;
import org.jdesktop.swingx.JXTaskPaneContainer;
import orgimp.pushingpixels.substance.api.SubstanceLookAndFeel;
import org.pushingpixels.substance.api.SubstanceSkin;
if you are using eclipse ,then right click on project
Properties->java build path
now check source all class file src is added or not,
check libraries that all necessary jar is added or not
if yor are running through comand prompt then you need to set path in command line
right click on project
go to properties-->java build path--->Libraries
add all library that needs in your project
and also check your java compiler
go to properties-->java compiler
choose necessary java compiler
------------------------------- OR ---------------------------------------------
it may be possible that required jar files are not present in your lib folder
Try deleting those entries from build path (make sure you leave the jars which eclipse already can find).
I have a really strange problem.
I want to import two files which are in the package soap. But Eclipse doesn't "see" the files if I want to import them. Even if I change the directory of the file to a package, in which Eclipse sees the other files and is able to import them, these two new .java-files won't show up to import. Even if I try to import it "by-hand", Eclipse doesn't find them:
import ch.asdf.soap.DocumentReply;
import ch.asdf.soap.DocumentRequest;
I've also tried to import the whole package:
import ch.asdf.soap.*;
There aren't any errors in the files.