Skip to content
Advertisement

Tag: classpath

Custom LiquibaseDataTypes not found in docker image classpath

I am trying to build a custom Liquibase docker image (based on the official liquibase/liquibase:4.3.5 image) for running database migrations in Kubernetes. I am using some custom types for the database which are implemented using @DataTypeInfo annotation and extending existing LiquibaseDataTypes like liquibase.datatype.core.VarcharType (class discovery is implemented using the META-INF/services/liquibase.datatype.LiquibaseDatatype mechanism introduced in Liquibase 4+). These extensions are implemented inside

How to set the classpath correctly in java

I need to compile and run simple code using the gson library, but I can’t use Maven, Gradle or the IDE. The directory contains Main.java and gson-2.9.0.jar javac -cp gson-2.9.0.jar Main.java works correctly and creates Main.class But when I run java -cp ./*: Main, I get I also tried the following commands: But all these commands give the same result.

Read properties file from classpath (non-maven)

When I try to run my jar from another directory it cannot see the “config” folder with the “url.properties” file in it. Inside MyProperties class I have the following code, which runs perfectly when run from the same dir: The class that contains this code is in the following tree: It runs fine if I run this jar which contains

cmd window does not recognize the classpath option

when I enter like error occurs like this What’s problem? Answer You appear to be using a Linux/Unix system, based on your error: zsh: command not found: mariadb-java-client-2.7.1.jar. Your Java command therefore needs to use a colon :, not a semicolon ;. Semicolons are the JAR separators used on Windows for the java command. But for Linux, it is the

Is it possible to mix –class-path and –module-path in javac (JDK 9)?

When I compile a module that depends on other modules I’ve compiled previously I have to specify the –module-path <directory> option. This makes modules I depend on visible. But at the same time I would also like to make some non-modular Jar files visible. However if don’t make them automatic modules and just specify the –class-path some.jar right next to

Advertisement