This week's book giveaway is in the Cloud forum.
We're giving away four copies of Terraform in Action and have Scott Winkler on-line!
See this thread for details.
Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

command prompt problem

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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






Ekran-G-r-nt-s-(101).png
[Thumbnail for Ekran-G-r-nt-s-(101).png]
 
Master Rancher
Posts: 4510
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the classpath being used by javac refer to the folder that contains the appfuncs folder?
 
Codcu Mus
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 .
Ekran-G-r-nt-s-(102).png
[Thumbnail for Ekran-G-r-nt-s-(102).png]
 
Norm Radder
Master Rancher
Posts: 4510
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Codcu Mus
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ?
 
Norm Radder
Master Rancher
Posts: 4510
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I am not familiar with the exports statement or Java 9 Modules.
 
Codcu Mus
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ))))
 
Marshal
Posts: 74392
334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
. . . and welcome to the Ranch, CM
 
Codcu Mus
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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


Nice to meet you , everybody also .)
reply
    Bookmark Topic Watch Topic
  • New Topic