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
1
vote
0 answers

NoClassDefFoundError even though jar is in the module path Eclipse

I am working on a vanilla Eclipse project and trying to avoid using Maven. I have added Jackson modules to the module path as an external jar. When I do so, the import statement no longer shows an error but when I run my program I get the following…
NewForOlly
  • 35
  • 5
1
vote
2 answers

How can I force Gradle to use --module-path instead of -cp?

I have a relatively straightforward modular project, and I've already set all of the options that I've found in the documentation as well as in different answers or articles such as How to force gradle to add dependencies to the module path instead…
1
vote
1 answer

What is the value of adding non-modular jars to the -classpath and modular jars to the --module-path when compiling a module?

I've seen that in a project with module-info.java, maven adds the modular jars (containing module-info.class or manifest property Automatic-Module-Name ), to the --module-path, and the rest of the jars to the -classpath. But the spec states: [...]…
Marinos An
  • 9,481
  • 6
  • 63
  • 96
1
vote
1 answer

How to Run Java Module class (java 9 jigsaw project) with third party library (jar files)?

Right now I'm trying to develop a Java project with pure java (no builtscript). I'm implementing the module concept from Java 9. I'm having a trouble when it comes to run a Java project (main class) with additional jar file (third party library). I…
1
vote
2 answers

Add JavaFX jmods to java --list-modules

Preface: I need to open .jar files which requires Java and JavaFX. I have installed both Java (from Oracle website) and JavaFX (SDK from openjfx website). I have added environment variables by updating /etc/environment file, and adding…
Sanmay Joshi
  • 115
  • 1
  • 2
  • 9
1
vote
2 answers

Python: No Module named xxx

Im getting nowhere with the following error on my Raspberry Pi: My own Python script calls a function from another module named BlackBean.py which in turn imports other modules called "netaddr" and "configparser". The problem is that I just cant…
0
votes
0 answers

Is there a way to open all modules to a specific modules?

I have a Java-Swing-Application with a small, self-written application-debugger (let's call it AID) attached. With AID you can execute code, inspect objects and look at the ui-hierarchy inside the application. When running the app with java 17 or…
Syndrome
  • 1
  • 3
0
votes
0 answers

I am using Java SE 17 for my project. But to access an endpoint I need to use compiler level SE 1.7 or below

I am using SE 17 but to access an SOAP API Endpoint in java I need a jdk version of 1.7 or below , else the compiler throws me and exception as "The package javax.xml.namespace is accessible from more than one module: , java.xml".I've tried to add…
HR S
  • 3
  • 2
0
votes
0 answers

how to move jar files from classpath to module path

I wonder how to add jar files to module path: What I am working on is a maven project. In the Java build path, Libraries, there are no folders specifying whether I am adding the external jars to classpath or modulepath: normally there will be two…
0
votes
0 answers

what is --module-path in java 8

I have installed openjfx with JDK8 on Ubuntu. I am adding openjfx modules with --module-path flag. But module-path flag is missing in Java 8. I have tried using classpath but that doesn't seem to work. javac --module-path /usr/share/openjfx/lib…
Fitohe
  • 13
  • 1
  • 3
0
votes
1 answer

Will creating non modular application require me to separate my modular from non-modular dependencies

I am upgrading a legacy application to java 11. Currently we don't use maven or gradle. As i've updated it, i've replaced certain libraries that have been removed from the jdk in 11. Some of the newer dependencies i've added contain module-info.java…
janst
  • 102
  • 10
0
votes
1 answer

Make java.sql package or module available to boot classloader

I am using sql statement wrappers. When trying with jdk 11, I am getting java.lang.NoClassDefFoundError: java/sql/PreparedStatement. From java 9, java.sql is loaded in the platform loader. My wrapper classes are in boot classpath. How do I make any…
0
votes
1 answer

Not able to compile and run a classpath Java Application

I'm having serious problems understanding how to manage folders vs. packages names when it comes to deploying Java. I have this little program, constructed like this: deployer-classpath.bat deployer-modulepath.bat src data com …
mEm
  • 353
  • 3
  • 12
0
votes
1 answer

IntellijIDEA + Gradle + JavaFX: java.lang.ClassNotFoundException for one "Run Configuration" but not the other

Intellij IDEA driving me nuts with bad behaviour: I have one (Gradle-based) Project with two main classes written in Java, each in its own package. One is called "HelloFX" One is called "ImageViewExample" Both use JavaFX so need some special "Run…
David Tonhofer
  • 14,559
  • 5
  • 55
  • 51
0
votes
1 answer

Why does Java.exe suddenly fail to find files/modules even though Windows Explorer shows they exist

We're experiencing a strange issue - has anybody seen anything similar? We have a Java/JavaFX desktop application that has been running successfully on a Windows platform (Server 2012) for almost a year. Recently we moved the application to a…