Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

"Sybex 1z0-815 page 459" Module Compile Problem

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I wonder that does it really required usage of "-p mods", while compiling a module?
I think, "-p mods" have no sense while compiling a module, right? Since I have tried like that
and it has worked.

javac -d mods\feeding feeding\zoo\animal\feeding\Task.java feeding\*.java

In addition, I am suspicious whether your compile module command is correct?

javac -p mods
-d feeding
feeding/zoo/animal/feeding/*.java
feeding/*.java

The above one exist at page 459 should be corrected like ;

javac -d mods
feeding/zoo/animal/feeding/*.java
feeding/*.java

Otherwise, it will compile but put .class file under source directories!

 
author & internet detective
Posts: 39957
804
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Taylan,
Welcome to CodeRanch!

Did you try compiling a second module that refers to another module yet? That's where -p becomes useful. (We included it in the first module for consistency and to get readers used to it)

As far as your proposed change, we don't want to compile to "mods". We want that to be the folder where the jar files live.

I do agree that in the real world, we would compile elsewhere. But in the real world, we'd use Maven or Gradle and not be compiling a the command line in the first place!
 
taylan istanbul
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne,
Thank you for a warm welcome


I hope to ask/ share more question/ information code related.

I have a better understanding role of mods folder now.

In the past, I supposed that it is the directory in which .class files should exist.

I haven't read second module example yet. When I read,
I think especially, I see the difference.

Have a nice day and
keep us posted!

 
taylan istanbul
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have successfully compiled Care module yet!

However, as you know, there are different operating systems such as Solaris,
Windows or Linux. My question, in the 1z0-815 exam, which OS exam takers will
be responsible for? Since, an OS has Linux kernel has path like zoo/animal/care/medical
while a Windows has pat structure like zoo\animal\care\medical.


Note: Especially, while compiling a module OS is important
but running a module has no sense, right?

 
Jeanne Boyarsky
author & internet detective
Posts: 39957
804
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exam tries to stay away from such differences.

For general knowledge, it is good to know that ; (Windows) and : (UNIX) map to each other. And that \ (Windows) and / (Unix) do.
 
Willie Smits can speak 40 languages. This tiny ad can speak only one:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic