Questions tagged [module-path]

Starting from Java 9 module path is used by JVM to look up modules during different phases (compile-time, runtime, etc.) by specifying `--module-path` or `-p` options. Its value is a semicolon-separated (;) list of directories each of which is a directory of modules.

66 questions
6
votes
1 answer

Migrating java application from Java 8 to Java 11

Advance thanks, who are be going to help me. Story: till date my application is using JDK8, but right now I am migrating my application to Open JDK11 and using IVY as dependency manager and Ant as a build tool. Problem: I was facing compile-time…
Dupinder Singh
  • 7,175
  • 6
  • 37
  • 61
6
votes
1 answer

Why is my Java9 module service not working?

--------------------------------------------- package org.zpf.service; public interface Services { void test(); } module org.zpf.service.Services { exports org.zpf.service; } --------------------------------------------- package…
6
votes
0 answers

Splitting Gradle dependencies between Java 9 module path and classpath: automatic modules

I followed the Gradle guide on building Java 9 modules to get a simple Java 9-based library project off the ground. In particular I followed the advice in the guide to manually set my module path like so: ext.moduleName = 'com.foo.bar' compileJava…
5
votes
1 answer

how to generate javadoc for multiple modules

I'm trying to create javadoc (jdk11) for multiple modules in a single document. I tried to do it like this. The file/directory structure is: workspace doc maths src main java …
stegzzz
  • 407
  • 4
  • 9
5
votes
2 answers

Is there a way to modify module path and added modules of a programmatic JShell instance?

I'm trying to run some Java code at run-time through a JShell instance I created using the JShell API. To demonstrate my problem, I'm going to share my simple code. With my current setup I have a directory called lib that has the MySQL Java driver:…
4
votes
1 answer

How to fix module not found: spring.web and similar errors

I'm trying to build a simple maven spring-rest app with Java 11, but I'm getting 'module not found error' constantly. I read a lot of similar questions on SO. I tried various recommendations - deletions of maven repository, resolving some warnings…
Nedim
  • 320
  • 4
  • 11
4
votes
3 answers

JavaFX and Maven in Intellij: JAVA_HOME set but "Unrecognized option --module-path" error persisting

Using Maven and JavaFX in Intellij (2019.1). I have been following this tutorial. I have a curious error that keeps occurring - every time I keep running the javafx:run plugin, it fails, giving this error: Error: Could not create the Java Virtual…
Harvey Ellis
  • 596
  • 1
  • 3
  • 12
4
votes
1 answer

Automatic modules not found in Eclipse 2018-12 when project is opened

I want to switch from Oracle JDK 8 to Open JDK 11 using Eclipse 2018-12. I have the following situation: In my Eclipse workspace I have a main maven project called example with some maven dependencies my_dependency_1, my_dependency_2 that are also…
user27772
  • 522
  • 1
  • 4
  • 18
4
votes
2 answers

java 9 unnamed module reads package [X] from both ... while debugging (with IntelliJ)

In my project I have a package that uses several 3rd party libraries. Let's have a look at the dependency tree: [INFO] +- commons-logging:commons-logging:jar:1.2:compile [INFO] +-…
jahuer1
  • 377
  • 4
  • 15
4
votes
2 answers

How to run Java 9 application with classpath rather than module path in IDEA?

When I run a main class in IDEA, it puts the module and its dependencies on a module path. Is it possible to change it to a classpath?
ZhekaKozlov
  • 36,558
  • 20
  • 126
  • 155
3
votes
0 answers

Automatically determine what to place on Classpath and Modulepath?

I have an application that has both JPMS modules and old fashioned non modular jar files. I don't want to put all of the jars on the classpath because then I loose some specific functionality baked into the modules (such as JPMS service provider…
3
votes
1 answer

How to avoid adding vm arguments everytime I create a new javafx project?

I am creating javafx projects in STS(4.6.1) with e(fx)clipse plugin and scenebuilder. Everytime I create a new project, I have to add the VM arguments in run configurations: --module-path "/home/path/to/javafx sdk/lib" --add-modules…
dhakalkumar
  • 161
  • 1
  • 3
  • 14
3
votes
1 answer

Does maven add all dependencies to modulepath by default?

I read on Java 9 Modularity book: Dependencies are always put on the module path, even when dependency isn't modularized yet. [...] The most important changes made to Apache Maven for support of the Java module system are as follows: Uses the…
3
votes
1 answer

In which directory does module-info.java go?

From the quick start tutorial of project Jigsaw, it seems that module-info.java goes to a directory with the name of the module, for instance, for a module my.module containing a class MyClass: bin/ my.module/ module-info.class …
user10307643
3
votes
1 answer

modulepath environment variable in Java similar to CLASSPATH

In previous versions of Java if you had for example a user-defined package org.mypackage in windows with directory structure D:\myprogram\ | ---> org\ | ---> mypackage\ | …