I want to use neo4j libraries to connect my java app with neo4j database and follow the tutorials from http://neo4j.com/docs/stable/tutorials-java-embedded-hello-world.html.
At the beginning I copied the sources code from https://github.com/neo4j/neo4j/blob/2.2.2/community/embedded-examples/src/main/java/org/neo4j/examples/EmbeddedNeo4j.java and netbeans complains about missing libraries like:
import org.neo4j.graphdb.Direction;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.Relationship;
import org.neo4j.graphdb.RelationshipType;
import org.neo4j.graphdb.Transaction;
import org.neo4j.graphdb.factory.GraphDatabaseFactory;
import org.neo4j.io.fs.FileUtils;
I have searched libraries from http://search.maven.org/#search|ga|2|g%3A%22org.neo4j%22 site for example:
org.neo4j.graphdb
But can not find anywhere. Where can I find libraries?
You need the neo4j-kernel artifact and all of its (transitive) dependencies, see http://mvnrepository.com/artifact/org.neo4j/neo4j-kernel.
Have you looked at http://search.Maven.org and searched Neo4j?
Related
I'm running the API 3 with Java from Windows command using javac and java to compile, no problem. I'm trying the API 4 but can't make even the basic example to run. I understand my problem must be in the classpath but can't pinpoint on the problem. Can't see the com.google packages
I downloaded the API 4 Java Client, copied all .jar in libs to a folder libs in my project. Also copied google-api-services-analyticsreporting-v4-rev110-1.22.0.jar to the libs
I'm testing the service account example as in
https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/service-java
I setup the compiler as (I know the path exists)
javac -classpath ".;C:\Java\GAnalytics\libs\*" HelloAnalytics4.java
I also tried adding the subdirectories in the client
Error Package does not exit:
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.json.JsonFactory;
import com.google.api.client.json.gson.GsonFactory;
import com.google.analyticsreporting.v4.AnalyticsreportingScopes;
import com.google.analyticsreporting.v4.Analyticsreporting;
import com.google.analyticsreporting.v4.model.ColumnHeader;
import com.google.analyticsreporting.v4.model.DateRange;
import com.google.analyticsreporting.v4.model.DateRangeValues;
import com.google.analyticsreporting.v4.model.Dimension;
import com.google.analyticsreporting.v4.model.GetReportsRequest;
import com.google.analyticsreporting.v4.model.GetReportsResponse;
import com.google.analyticsreporting.v4.model.Metric;
import com.google.analyticsreporting.v4.model.MetricHeaderEntry;
import com.google.analyticsreporting.v4.model.Report;
import com.google.analyticsreporting.v4.model.ReportRequest;
import com.google.analyticsreporting.v4.model.ReportRow;
What am I missing?
Same problem for me, I solved by substituting all
"com.google.analyticsreporting.v4" ---> "com.google.api.services.analyticsreporting.v4"
and also:
Analyticsreporting --> AnalyticsReporting
Here the screen of the google-api-services-analyticsreporting-v4-rev111-1.22.0.jar unzipped
I am attempting to implement the Google Cloud Messaging CCS server written in Java, and I have downloaded the Smack library from here. My question is, which files do I place within my project in order to use these import statement?
import java.io.IOException;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.ConnectionConfiguration.SecurityMode;
import org.jivesoftware.smack.ConnectionListener;
import org.jivesoftware.smack.PacketInterceptor;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.filter.PacketTypeFilter;
import org.jivesoftware.smack.packet.DefaultPacketExtension;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.provider.PacketExtensionProvider;
import org.jivesoftware.smack.provider.ProviderManager;
import org.jivesoftware.smack.util.StringUtils;
import org.xmlpull.v1.XmlPullParser;
import org.jivesoftware.smack.SmackException;
You need to download the required libraries and import them into your project
I needed
Smack
JsonSimple
XmlPull 1.1.4.c
(Click for download links)
Once you've downloaded each library you need to import them into netbeans
Open your projects properties
Select Libraries
Select Add Library
Select Create
Add a name that indicates which library this is i.e Smack or JsonSimple so on
Add the jar, javadoc and sources if you downloaded them for each library
Rinse and repeat till all three libraries are added to your project
I am trying to import following packages in my .java file:-
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
I am getting error that the above mentioned packages do not exist.
You need to download elastic search jar to make it work. Download it from here.
And add it to your classpath.
I came across this sample code for handling file uploads with Netty, this looks perfect, just what I needed. Unfortunately I am having difficulty incorporating this class as many Netty API features are unresolved. One of them for example is io.netty.handler.codec.http.DiskFileUpload, I am unable to find this in any of the online API docs for 3.0,3.1.3.2.
The class I am having issues with is here:
https://github.com/netty/netty/blob/master/example/src/main/java/io/netty/example/http/upload/HttpUploadServerHandler.java
I have tried using netty-3.2.5.final, 3.3.1.final, 3.4.0.Alpha
Unresolved imports:
import org.jboss.netty.handler.codec.http.HttpPostRequestDecoder.EndOfDataDecoderException;
import org.jboss.netty.handler.codec.http.HttpPostRequestDecoder.ErrorDataDecoderException;
import org.jboss.netty.handler.codec.http.HttpPostRequestDecoder.IncompatibleDataDecoderException;
import org.jboss.netty.handler.codec.http.HttpPostRequestDecoder.NotEnoughDataDecoderException;
import org.jboss.netty.handler.codec.http.InterfaceHttpData;
import org.jboss.netty.handler.codec.http.InterfaceHttpData.HttpDataType
import org.jboss.netty.handler.codec.http.HttpDataFactory;
import org.jboss.netty.handler.codec.http.DiskAttribute;
import org.jboss.netty.handler.codec.http.DiskFileUpload;
import org.jboss.netty.handler.codec.http.FileUpload;
import org.jboss.netty.handler.codec.http.DefaultHttpDataFactory;
import org.jboss.netty.handler.codec.http.Attribute
Any help appricated
When you see the org.jboss.netty namespace, that indicates v3.x
io.netty is used in v4.
Online documentation is located at http://netty.io/docs/
It's under master branch which is 4.0.0.Alpha1-SNAPSHOT from the pom.
I m building an android application where I need these packages to import:
import com.sun.cnpi.rss.elements.Item;
import com.sun.cnpi.rss.elements.Rss;
import com.sun.cnpi.rss.parser.RssParser;
import com.sun.cnpi.rss.parser.RssParserException;
import com.sun.cnpi.rss.parser.RssParserFactory;
What should I do? From where can I find these packages?
You will need to download rss_utils_1.1.zip as seen in this tutorial.