jar files used for the below imports - java

Anyone used these imports in your files...?
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.methods.*;
import org.apache.commons.httpclient.params.HttpMethodParams;
I have an example that uses these imports. I have commons-codec-1.6.jar/httpclient-4.1.2.jar/httpcore-4.1.2.jar/commons-logging.jar in my classpath. Still the import fails. any inputs?

That's Apache commons-httpclient. And the Javadocs for that library.

Related

where to get java SDK for BusinessObjects

I want to import the packages, for example:
import java.io.PrintWriter;
import java.text.DateFormat;
import java.util.Date;
these packages have already existed so it doesn't pop up any error messages.
When I want to import others packages:
import com.businessobjects.rebean.wi.DocumentInstance;
import com.businessobjects.rebean.wi.Prompt;
import com.businessobjects.rebean.wi.Prompts;
import com.businessobjects.rebean.wi.ReportEngine;
import com.businessobjects.rebean.wi.ReportEngines;
import com.crystaldecisions.enterprise.ocaframework.ServiceNames;
import com.crystaldecisions.sdk.exception.SDKException;
import com.crystaldecisions.sdk.framework.CrystalEnterprise;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.framework.ISessionMgr;
import com.crystaldecisions.sdk.occa.infostore.IInfoObject;
import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
import com.crystaldecisions.sdk.plugin.desktop.folder.IFolder;
It will say "the import cannot be resolved", but where I can get the jar files to resolve these problems?
I tried to search these jar files in the java lib folder but was not able to get them.
Can anyone tell the exact folder path for these jar files, if it is there?
Or where can I download those packages.....
I found the website (https://help.sap.com/doc/javadocs_bip_42/4.2/en-US/bip/en/com/crystaldecisions/sdk/exception/package-summary.html) but I still don't know how to import it......
You'll need rebean.wi.adapter.jar and cecore.jar. They are located in the following directory with BO client or server software is installed:
C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java\lib
Note that these are not available publicly -- you will need to install the software.

I Added a jar into my Eclipse project, but still it doesn't import

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.

Cannot find java.nio.file.Files

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.*;

Eclipse: Java application size

So i made it finally to the final stage of my simple java app that runs under windows and is used to get the user name and log it in an remote excel file. up until now everything is ok.
When i Externelize (does that word exist?) the app to make it a runnable jar the size of the app was 22Mo! wich is huge since i want to use it in an email (outlook).
Here come the question (finally). Can i delete any of the default java jars in the classpath and the app will still run ?? if yes, which ones??
NB: i tried including the imports in the SS if it does help
NB2: the Jar of the app it self is just 20Ko , the ressources are around 22Mo .
By the way thank you all for helping me make this app it was thanks to this website eventhought i didn't ask any question up until now you'll still answered them all..You rock !
Those are my imports:
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Iterator;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.wb.swt.SWTResourceManager;
EDIT: So after the discussions i managed to reduce the size of the app to 8Mo by deleting some of the jar in the referenced library (org.ibm.icu.jar). The app still runs perfectly without it
A jar file is just a zip file, so what I would do is simply unzip the file and see what comes with it and what is large. The standard java libraries, should not even be part of your JAR as they are part of the JRE.
However, my suspicion is that you use Apache POI and that is huge. So if you are writing to an Excel file you might have to stick with that size or find another library.
You could for example write the output as CSV which is very lightweight.

I have downloaded geotools . In which eclipse directory should I put it in for it to be fetched by my java file?

package geotools.data.geojson;
import jts.geom.Coordinate;
import jts.geom.CoordinateSequence;
import jts.geom.Envelope;
import jts.geom.Geometry;
import jts.geom.GeometryCollection;
import jts.geom.LineString;
import jts.geom.MultiLineString;
import jts.geom.MultiPoint;
import jts.geom.MultiPolygon;
import jts.geom.Point;
import jts.geom.Polygon;
import jts.geom.impl.CoordinateArraySequence;
So where should jts and geotools go into for me to be able to access them ?
There is an eclipse quickstart that answers your question; it provides instructions for both use of maven (which is more automatic); and for downloading the jars into a usable eclipse project.
http://docs.geotools.org/latest/userguide/tutorial/quickstart/eclipse.html
The eclipse download includes JTS (and other support libraries as needed).
It should be added to the project's build-path if it's a JAR file.

Categories