Win a copy of Rust Web Development this week in the Other Languages forum!

Codcu Mus

Greenhorn
+ Follow
since Jul 06, 2018
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Codcu Mus

Campbell Ritchie wrote:. . . and welcome to the Ranch, CM


Nice to meet you , everybody also .)
3 years ago

Norm Radder wrote:Sorry, I am not familiar with the exports statement.



Thanks sir . You interested in . I couldnt find the any answer in internet . not a common topic I think but i trying to learn at least . Have a nice day and life ))))
3 years ago

Norm Radder wrote:To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'

Paste here.

Please post text not images.  Text can not be copied from images to include in a response.

Sorry, I do not see in your response anything about the classpath that the javac command used and whether the appfuncs folder was in a folder on the classpath.

I think that error means that the javac command could not find appfuncs




Thanks bro . My first question here . I dont know using page very well .


C:\Users\pc\Desktop\JAVA PROJELERİM\mymodapp>javac -d appmodules\appfunc
s appsrc\appfuncs\module-info.java
appsrc\appfuncs\module-info.java:2: error: package is empty or does not
exist: appfuncs.simplefuncs
       exports appfuncs.simplefuncs ;
                       ^
1 error

C:\Users\pc\Desktop\JAVA PROJELERİM\mymodapp>tree
Folder PATH listing for volume TI31109200A
Volume serial number is 00000002 6C78:4728
C:.
├───appmodules
│   └───appfuncs
│       └───appfuncs
│           └───sipmplefuncs
└───appsrc
   ├───appfuncs
   │   └───appfuncs
   │       └───simplefuncs
   └───appstart
       └───appstart
           └───mymodappdemo

C:\Users\pc\Desktop\JAVA PROJELERİM\mymodapp>

Forget the first question and files
Actually my question is that only : Can I compile with javac mobile-info.java file without doing anything also if it includes  "require or export" codes . Sure if the files are right places ?
3 years ago

Norm Radder wrote:Does the classpath being used by javac refer to the folder that contains the appfuncs folder?



Thanks for reply ;
SimpleMathFuncs.java  : C:\Users\pc\Desktop\JAVA PROJELERİM\mymodapp\appsrc\appfuncs\appfuncs\simplefuncs
SimpleMathFuncs.class : C:\Users\pc\Desktop\JAVA PROJELERİM\mymodapp\appmodules\appfuncs\appfuncs\sipmplefuncs

module-info.java : module appfuncs { .... : C:\Users\pc\Desktop\JAVA PROJELERİM\mymodapp\appsrc\appfuncs

MyModAppDemo.java   :C:\Users\pc\Desktop\JAVA PROJELERİM\mymodapp\appsrc\appstart\appstart\mymodappdemo

module-info.java : module appstart { .... : C:\Users\pc\Desktop\JAVA PROJELERİM\mymodapp\appsrc\appstart

Actually i dont think the files places are incompatible with command prompt codes . because error is not about finenotFind
I am using eclipse normally jdk 10 . In the eclipse ide after module description there must be a Configure Build Path then Modulepath matches . But in command prompt i couldnt match the module-info.java for both of classes .

I know it became complicated and a little bit long . But I couldnt find compile module codes without create .jar file .
3 years ago
I have 2 classes and 2 module-info.java classes for them . i couldnt compile module-info.java classes as like in the book . short codes are below :



my command prompt error :

C:\Users\pc\Desktop\JAVA PROJELERİM\mymodapp>javac -d appmodules\appfunc
s appsrc\appfuncs\module-info.java
appsrc\appfuncs\module-info.java:2: error: package is empty or does not
exist: appfuncs.simplefuncs
       exports appfuncs.simplefuncs ;
                       ^
1 error

I compiled my 1.st class but couldt compile module-info.java






3 years ago