Thanks to user phew for the help/ideas.
I missed the obvious command line instructions on Xerial’s site for the Sample program. To get the program to run from the command line, I had to copy the JAR file into the same folder as the .CLASS file. Then run the following command:
java -classpath ".:sqlite-jdbc-(VERSION).jar" Sample
Inside the quotation marks are multiple paths, separated thru a colon (:
) under Unix and a semicolon (;
) under Windows. The dot as one of the paths is important – only naming the JAR file alone is not enough. A full call on Windows would be:
"%JAVA_HOME%\bin\java.exe" -cp "sqlite-jdbc-(VERSION).jar;." Sample
Note the semicolon instead of the colon. The order of the paths do not really matter, and -cp
does the same as -classpath
, just shorter.
Related Posts:
- Is GNU’s Java Compiler (GCJ) dead? [closed]
- Eclipse/Maven error: “No compiler is provided in this environment”
- Reverse a string in Java
- Is there any doubly linked list implementation in Java?
- What is a JavaBean exactly?
- Can’t execute jar- file: “no main manifest attribute”
- In a simple to understand explanation, what is Runnable in Java?
- Java – How to use \t in my example [duplicate]
- Android Studio Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
- String concatenation: concat() vs “+” operator
- Rock, Paper, Scissors Game Java
- How do I reverse an int array in Java?
- Why should a Java class implement comparable?
- How Long Does it Take to Learn Java for a Complete Newbie?
- Java JDK – possible lossy conversion from double to int
- Global variables in Java
- Lombok and Maven
- java Arrays.sort 2d array
- what is the difference between `public class` and just `class`?
- Copying and modifying array elements
- How to send Https Post request in java
- What is the purpose of a listener in Java?
- stale element reference: element is not attached to the page document
- Error: can only iterate over an array or an instance of java.lang.Iterable
- Why can array constants only be used in initializers?
- Where is Java’s Array indexOf?
- How can I concatenate two arrays in Java?
- Difference between spring @Controller and @RestController annotation
- How do I use a delimiter with Scanner.useDelimiter in Java?
- Sort a single String in Java
- Difference between slf4j-log4j12 and log4j-over-slf4j
- Java, “Variable name” cannot be resolved to a variable
- What is Java String interning?
- What condition does while(true) test? When is it true and false?
- What is the significance of log4j.rootLogger property in log4j.properties file? What happens if I don’t use this property?
- “Instantiating” a List in Java? [duplicate]
- HTTP Status 405 – Request method ‘POST’ not supported (Spring MVC)
- Missing `server’ JVM (Java\jre7\bin\server\jvm.dll.)
- Convert String array to ArrayList
- java uses or overrides a deprecated API error
- What is setBounds and how do I use it?
- copy a 2d array in java
- Exception in thread “main” java.lang.ArrayIndexOutOfBoundsException
- Generating all permutations of a given string
- imageio.IIOException: Can’t read input file
- Difference between OpenJDK and Adoptium/AdoptOpenJDK
- Compile failed; see the compiler error output for details
- Java: Rotating Images
- Invalid character constant in java
- How to pass a function as a parameter in Java?
- ResultSet exception – before start of result set
- The activity must be exported or contain an intent-filter
- How to set JAVA_HOME environment variable on Mac OS X 10.9?
- Remove last character of a StringBuilder?
- Why SpringMVC Request method ‘GET’ not supported?
- Error: JAVA_HOME is not defined correctly executing maven
- Java can’t find file when running through Eclipse
- How do I draw a triangle?
- Java path..Error of jvm.cfg
- How to fix the compiler error in this program?
- “The public type <
> must be defined in its own file” error in Eclipse [duplicate] - How to calculate the intersection of two sets?
- method does not override method in its superclass
- Adding a timer to my program (javafx)
- How to resolve “Syntax error on token “else”” in Java?
- java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 exception
- What does this expression language ${pageContext.request.contextPath} exactly do in JSP EL?
- Simulating Game of Craps in JAVA
- How can I initialize a LinkedList with entries/values in it?
- How to resolve Unable to load authentication plugin ‘caching_sha2_password’ issue
- Deleting an object in java?
- Recompile with -Xlint:deprecation for details
- How to determine an object’s class?
- Division of integers in Java
- Consider this code: “int s = 20; int t = s++ + –s;”. What are the values of s and t?
- Reading a .txt file using Scanner class in Java
- “\b” in Java – Windows implemented
- Error: package or namespace load failed for ‘rJava’
- Difference between regex [A-z] and [a-zA-Z]
- How can I convert a char to CharSequence?
- Problems Generating A Math.random Number, Either 0 or 1
- package org.json does not exist when importing org.json.JSONObject
- How to add an element at the end of an array?
- Fields in interfaces
- How to print out all the elements of a List in Java?
- How to send data to COM PORT using JAVA?
- PrintWriter failing to print to file
- char initial value in Java
- What is the difference between local and instance variables in Java?
- Exception in thread “main” java.net.BindException: Address already in use – Error in Netbeans only
- ArithmeticException: “Non-terminating decimal expansion; no exact representable decimal result”
- Use String.split() with multiple delimiters
- I get “Type mismatch cannot convert from int to boolean” despite not using boolean
- creating array without declaring the size – java
- Downloading Java JDK on Linux via wget is shown license page instead
- What is the purpose of Java DOT operator?
- Return outside method error
- How to define a relative path in java
- Java rules for casting
- No content to map due to end-of-input jackson parser