You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by A Z <po...@live.com.au> on 2021/11/18 04:08:56 UTC
Simple Modules Question.
I have a tiny little Java OpenJDK 17 Module file, module-info.java,
module JavaApplication
{
requires java.base;
}
and Netbeans 12.5 is giving me the following errors:
C:\Users\User\Documents\NetBeansProjects\JavaApplication1\src\Java1\Start.java:1: error: file should be on source path, or on patch path for module
package Java1;
C:\Users\User\Documents\NetBeansProjects\JavaApplication1\src\Java1\module-info.java:1: error: file should be on source path, or on patch path for module
module JavaApplication
2 errors
If I have a Java application, where exactly am I supposed to put the module file itself, what do I do to get it to compile and insert correctly?
Re: Simple Modules Question.
Posted by A Z <po...@live.com.au>.
-For what I am doing, I need to have an Ant Project.
1. My little module is getting put inside <default package>, which is not the
package of my Main method. Netbeans is telling me twice:
module JavaApplication
{
requires java.base;
}
C:\Users\User\Documents\NetBeansProjects\JavaApplication1\src\JavaApplication1\Main.java:1: error: file should be on source path, or on patch path for module
package JavaApplication1;
C:\Users\User\Documents\NetBeansProjects\JavaApplication1\src\module-info.java:1: error: file should be on source path, or on patch path for module
module JavaApplication
2 errors
What exactly do I do to get my Main method and module to compile correctly?
1. The second question that I do ask, is why is it that OpenJDK 17 floating point arithmetic
is still creating denormal and pronormal values, when apparently, JEP 306 is
delivered in OpenJDK 17?
out.println("Program has started...");
double a = 0.1;
double b = 0.1;
double c = a*b;
out.println(c);
out.println("Program is Finished.");
? This feature, this update, is extremely important from this end.
🙂 Merry Christmas, too!
________________________________
From: Pieter van den Hombergh <pi...@gmail.com>
Sent: Thursday, 18 November 2021 8:36 PM
To: A Z <po...@live.com.au>
Cc: users@netbeans.apache.org <us...@netbeans.apache.org>
Subject: Re: Simple Modules Question.
Dear AZ,
You do not state whether this is a maven or an ant project.
Assuming it is a maven project (which is advisable), than your files should be in the folder in C:\Users\User\Documents\NetBeansProjects\JavaApplication1\src\main\java\Java1
This conforms to the default setup of a maven project, src/main/java contains all relevant files for the application src/test/java the test files for e.g. unit testing.
For more complex projects you may have additional resource folders under test and main.
On Thu, Nov 18, 2021 at 5:09 AM A Z <po...@live.com.au>> wrote:
I have a tiny little Java OpenJDK 17 Module file, module-info.java,
module JavaApplication
{
requires java.base;
}
and Netbeans 12.5 is giving me the following errors:
C:\Users\User\Documents\NetBeansProjects\JavaApplication1\src\Java1\Start.java:1: error: file should be on source path, or on patch path for module
package Java1;
C:\Users\User\Documents\NetBeansProjects\JavaApplication1\src\Java1\module-info.java:1: error: file should be on source path, or on patch path for module
module JavaApplication
2 errors
If I have a Java application, where exactly am I supposed to put the module file itself, what do I do to get it to compile and insert correctly?
--
Pieter Van den Hombergh.
No software documentation is complete with out it's source code.
Re: Simple Modules Question.
Posted by Pieter van den Hombergh <pi...@gmail.com>.
Dear AZ,
You do not state whether this is a maven or an ant project.
Assuming it is a maven project (which is advisable), than your files should
be in the folder
in C:\Users\User\Documents\NetBeansProjects\JavaApplication1\src*\main\java*
\Java1
This conforms to the default setup of a maven project, src/main/java
contains all relevant files for the application src/test/java the test
files for e.g. unit testing.
For more complex projects you may have additional resource folders under
test and main.
On Thu, Nov 18, 2021 at 5:09 AM A Z <po...@live.com.au> wrote:
> I have a tiny little Java OpenJDK 17 Module file, module-info.java,
>
> *module JavaApplication *
> *{*
> *requires java.base;*
> *}*
>
> and Netbeans 12.5 is giving me the following errors:
>
> C:\Users\User\Documents\NetBeansProjects\JavaApplication1\src\Java1\Start.java:1:
> error: file should be on source path, or on patch path for module
> package Java1;
> C:\Users\User\Documents\NetBeansProjects\JavaApplication1\src\Java1\module-info.java:1:
> error: file should be on source path, or on patch path for module
> module JavaApplication
> 2 errors
>
> *If I have a Java application, where exactly am I supposed to put the
> module file itself, what do I do to get it to compile and insert correctly?*
>
--
Pieter Van den Hombergh.
No software documentation is complete with out it's source code.