Can I execute multiple programs from JAR in cmd?

My task is to create two simple programs with output, put them both into one jar-archive and execute programs one by one. I can do it with one program using this commands: creating jar – jar cfe <…

Is it possible to shade some package in only one package in sbt?

let’s consider a following source code: assemblyShadeRules in assembly ++= Seq( ShadeRule.rename(“com.google.common.**” -> “my_package.@1”) .inAll ) It renames com.google….

Possible to mark my class/method as deprecated based on the JRE/JVM version?

Ten years ago I created, and have maintained, some commons/library jar files of helper classes specifically for cryptography in Java 8. Our organizations are FINALLY starting to update to Java 11 LTS, …

Include third party library in wildfly jar (keycloak SPI)

I am creating plugins (providers) for keycloak using the Service Provider Interface. I have been able to build a couple. Now I need to add the smallrye-graphql-client library to query a graphql server….

package com.mongodb.client does not exist for a java console program

So here is the back story … I need to make a simple java console project that accesses a MongoDB database and makes some changes to the records within so that another (much larger) program doesn’t …

Visual Studio Code Java Project export location

I’m using Visual Studio Code with the Java Extension Pack for a java application. As you can see in the image above, the downwards facing arrow button exports my project to a Jar, which is saved to …

How to get .jar resources path?

I’m using a custom method to get pictures from the resources/ folder. The hardcoded path works well when programming during production (src/main/resources/). However when delivering, I would need to …

Cannot run Launch4j (illegal access)

I would like to create an .exe file for my java desktop application. Hence, i saw that Launch4j was the best option. When I ran. the file, i have the following error message. WARNING: An illegal …

How can I import a custom package in IntelliJ IDEA (Java)?

There is such term like CLASSPATH which is using that JVM could find custom classes or jar files to import them to another packages (Am I right?). So, I created a few custom classes and placed them …

How can I create .JAR to Do a specific task , then use this JAR in another project?

e.g : i have a simple code that take an array list of numbers and computes Sum. I am created a .JAR of this code. now my question is how can I import this JAR in another project and pass array list to …