I have a little problem with jena. I want to use https://github.com/ldodds/slug in one of my project. This application comes without dependencies so I use Maven to gather what this app needs. Maven resolved everything except one package
import com.hp.hpl.jena.db.*;
I cannot resolve it with any of jena maven respositories. Do you know where I can find it? Maybe jena.db was available in older package but I cannot find any migration guide about this package.
If you are familiar with problem or know Jena structure well, please help.
Thanks in advance.
The RDB storage layer (the package com.hp.hpl.jena.db) was removed from Jena a long time. Presumably slug works with the version of in it's lib directory.
It would be better to use TDB or generalise and use SPARQL (query and update) so it will work with an external, standard triple store (like Jena Fuseki -- there are many to choose from). It will need changes to slug.
Related
I am trying to write a standalone Java application in IntelliJ using edu.stanford.nlp.trees.GrammaticalStructure. Therefore, I have imported the module:
import edu.stanford.nlp.trees.GrammaticalStructure;
Currently, Intellij doesn't recognize this and many others of the imported external libraries (cannot resolve the symbols) and is also not able to automatically download/import them.
Is there a way to use the GrammaticalStructure class without having to download the entire Stanford CoreNLP .jar and adding it to the project as a library? This question applies to other dependencies as well, since I want to use other external libraries but avoid including their .jar files as much as possible (to minimize the size of the final application, given that it will be standalone). Unfortunately, all the solutions I have found proposed exactly that.
Apologies if I have overlooked some basic setting or setup steps, it has been a while since I have worked with Java.
Any help is greatly appreciated.
If you want to use it means you want to execute the code in them. How is the runtime supposed to execute code that is does not have? How is the compiler supposed to know how the code is defined (e.g. what the classes look like)? This is simply impossible. If you want to use the code you have to provide it to the compiler as well as the runtime.
If you just dont want to include all of that code into your application, you need either access to the sources and just pick the class you need or you need some kind of JAR minimizer as #CrazyCoder suggested.
I am beginning at Java GUI, so I ask you professional coders to be understading towards to my humble question.
So, I have been coding this small Java project. I came across a problem, which is to query a Json file. During my quest over the internet looking for an answer, I stumbled upon this project on github:
https://github.com/json-path/JsonPath
Which proved to be the solution for my problem. Everything I need to be able to search for specific nodes on a json file is there, hard coded.
My beginner question: Is that possible to include this 'JsonPath' in my existing project? The IDE is Apache Netbeans 10.0 and the project is a Java SE application.
Thanks in advance!
I tried searching Services->Maven repository->Find...
I happened to find this package but I have no clue how to add the package. Also, I am not sure if its possible to add it to my project.
At first I thought doing something like "com.jayway.jsonpath" to my main class would solve my problem - But obvisouly it didn't, that's why I'm asking you guys for some guidance.
You're going to want to use a dependency management tool like Gradle or Maven first. This gives you a place to put all of the third-party dependencies like this one in your project. (Note: how to use or install either of those tools is outside of the scope of this question.)
Then, you just need the Maven coordinates. Luckily the project has those coordinates available.
I have a problem regarding the usage of libs in Eclipse. I want to know which lib is used in which package.
I tried the search functionality but this did not really solve my issue.
I do not try to figure out which libs are used in general but which are used e.g. in the test package only.
Thank you in advance!
A simple method is to temporarily remove the library and see where you get errors.
For a project I am building a Java GUI from which queries can be sent to Neo4j, to make it easier to do particular analyses. To get this all working, I have downloaded a .jar folder containing all relevant classes (neo4j-javadocs-2.1.7-javadoc.jar). I have loaded the library through the project->properties->libraries->Add JAR, but I can't seem to import the classes I want to use in my GUI (neither automatically nor manually).
I am dabbling in Java, so it is probably a basic oversight that I am making, but with the help from tutorials online and trying different commands (like entering the path of the .jar file) I can't get it working. One of these tutorials is specific on the Neo4j library, so I am very confused. That tutorial is written for Eclipse, instead of NetBeans which I am working with, but as far as my knowledge goes that shouldn't matter for the commands
I don't have enough reputation to post direct images, but this link contains a screenshot. If more information is required, let me know. http://i.stack.imgur.com/lUytK.png
Additionally, when I normally add a class that is not imported, there is an automatic function to import the class. This option is missing for my specific class, so maybe I added the library in an incorrect way?
http://i.stack.imgur.com/QeDX4.png
Edit: Issue resolved thanks to a colleague that came in. Apparently I loaded the Javadoc where I should have loaded to individual classes from the lib directory.
It really should work.
Try to save all changes. NetBeans reparses the classes when you save them.
Try to build your project manually from command line using Ant build script
Use Maven, Ivy or Gradle for Dependency Management then you can depend on the Neo4j artifacts.
For sending queries to the server you actually don't need Neo4j artifacts.
You can also use the JDBC driver, see http://neo4j.com/developer/java
I am very new to Realtime system development in Java. I create Java files in OpenSuse and compile it. I get an error:
The import javax.realtime cannot be resolved.
I have been searching for RealTime JAR file. I tried many website such as FindJar.com, Oracle website (Sun), etc. I cannot find it.
Any idea how to resolve this?
Realtime behavior is not something you can add to a VM by just adding a Jar file. The way priorities and synchronization are handled is completely different in a realtime JVM. You can download the personal edition of JamaicaVM to try out the RTSJ: "http://www.aicas.com/jamaica-pe.html". JamaicaVM does not just provide the javax.realtime package, but also provides realtime garbage collection.
Check out http://java.sun.com/javase/technologies/realtime/rts/ .
There is a evaluation download and academic license if that meets your demands
You could try: http://www.timesys.com/java/ (RTSJ Reference Implementation from timesys) . The copy's for Research Purpose though.
I have found out that the Javolution-Core package contains javax.realtime.RealtimeThread class https://mvnrepository.com/artifact/org.javolution/javolution-core-java/6.0.0.
However, the essential dependencies like javax.realtime.SchedulingParameters and javax.realtime.ReleaseParameters are still missing from this package.
I think you can download a RT implementation from IBM for Java 8 here.
Also, if you want more find more information check this answer.