🌐
Oracle
docs.oracle.com › javaee › 7 › tutorial › usingexamples006.htm
2.6 Tutorial Example Directory Structure - Java Platform, Enterprise Edition: The Java EE Tutorial (Release 7)
Java Platform, Enterprise Edition: The Java EE Tutorial · Previous PageNext Page · To facilitate iterative development and keep application source files separate from compiled files, the tutorial examples use the Maven application directory structure. Each application module has the following structure: pom.xml: Maven build file ·
🌐
Apache Maven
maven.apache.org › guides › introduction › introduction-to-the-standard-directory-layout.html
Introduction to the Standard Directory Layout - Apache Maven
Within artifact producing source directories (ie. main and test), there is one directory for the language java (under which the normal package hierarchy exists), and one for resources (the structure which is copied to the target classpath given the default resource definition).
🌐
JAXB
javaee.github.io › tutorial › usingexamples006.html
Tutorial Example Directory Structure
To facilitate iterative development and keep application source files separate from compiled files, the tutorial examples use the Maven application directory structure. Each application module has the following structure: pom.xml: Maven build file · src/main/java: Java source files for the module ·
🌐
TechRepublic
techrepublic.com › home › developer
Directory Navigation in Java - TechRepublic
July 15, 2023 - We discuss how to work with directories, sub-directories, and traverse them using Java and the DirectoryStream method. Learn more.
🌐
Devmanuals
devmanuals.com › tutorials › java › corejava › JdkDirectory.html
Understanding the directory structure of JDK (Java SDK)
Now the explanation of the above structure is as follows:- Let's suppose the JDK software is installed at D:\jdk1.6.0 · D:\jdk1.6.0:-It is the root directory of JDK installation. It contains the Copyright, license, README files, src.zip,and the archive of source code for the Java platform.
🌐
CodingTechRoom
codingtechroom.com › tutorial › java-intellij-idea-directory-structure-java
Mastering IntelliJ IDEA Directory Structure for Java Projects - CodingTechRoom
In this tutorial, we will explore the intricacies of managing the directory structure within IntelliJ IDEA specifically for Java projects.
Find elsewhere
🌐
DEV Community
dev.to › imajenasyon › folder-structure-backend-java-2402
Folder structure - backend java - DEV Community
April 8, 2025 - It separates concerns into clearly defined layers (controller, service, repository) and uses standard Spring Boot project conventions. You can modify this structure to fit the specifics of your project as it evolves, but this should give you a great foundation for starting your backend application. ... Helpful guide on organizing backend Java projects!
Top answer
1 of 2
2

-d classes command line switch tells the compiler to store compiled code in classes folder.

See documentation of javac:

-d directory

Set the destination directory for class files. The destination directory must already exist; javac will not create the destination directory. If a class is part of a package, javac puts the class file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify -d /home/myclasses and the class is called com.mypackage.MyClass, then the class file is called /home/myclasses/com/mypackage/MyClass.class.

If -d is not specified, javac puts the class file in the same directory as the source file.

2 of 2
1

If you run javac without any arguments, help content gets printed

Usage: javac <options> <source files>
where possible options include:
  -g                         Generate all debugging info
  -g:none                    Generate no debugging info
  -g:{lines,vars,source}     Generate only some debugging info
  -nowarn                    Generate no warnings
  -verbose                   Output messages about what the compiler is doing
  -deprecation               Output source locations where deprecated APIs are used
  -classpath <path>          Specify where to find user class files and annotation processors
  -cp <path>                 Specify where to find user class files and annotation processors
  -sourcepath <path>         Specify where to find input source files
  -bootclasspath <path>      Override location of bootstrap class files
  -extdirs <dirs>            Override location of installed extensions
  -endorseddirs <dirs>       Override location of endorsed standards path
  -proc:{none,only}          Control whether annotation processing and/or compilation is done.
  -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
  -processorpath <path>      Specify where to find annotation processors
  -d <directory>             Specify where to place generated class files
  -s <directory>             Specify where to place generated source files
  -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
  -encoding <encoding>       Specify character encoding used by source files
  -source <release>          Provide source compatibility with specified release
  -target <release>          Generate class files for specific VM version
  -version                   Version information
  -help                      Print a synopsis of standard options
  -Akey[=value]              Options to pass to annotation processors
  -X                         Print a synopsis of nonstandard options
  -J<flag>                   Pass <flag> directly to the runtime system

And -d says -d <directory> Specify where to place generated class files

🌐
Coderanch
coderanch.com › t › 665795 › java › practice-project-directory-structure-java
Best practice for project directory structure in java (Java in General forum at Coderanch)
May 18, 2016 - Maven separates these two: src/main/java src/test/java You don't want your release package to include your tests.
🌐
Javawebtutor
javawebtutor.com › articles › servlets › structure_of_java_web_application.php
Directory Structure Of Java Web Application | Java Web Tutor
The classes directory contains all compiled Java classes that are part of your web application. The classes should be located in a directory structure matching their package structure.
🌐
EDUCBA
educba.com › home › software development › software development tutorials › java tutorial › java directories
Java Directories | Creation and Methods of Java Directories
March 28, 2023 - The chances of relevant results being retrieved can be increased by using java directories. In this tutorial, we understand the concept of directories, the creation of directories in java using different methods, a listing of directories in java, creation of temporary directories, writing into the files in the directories, advantages of directories in java and programming examples to demonstrate the creation of directories in java using different methods, writing into the files in java directories along with their output snapshots.
Address   Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
Oracle
docs.oracle.com › javase › 8 › docs › technotes › tools › windows › jdkfiles.html
3 JDK and JRE File Structure
April 21, 2026 - This chapter introduces the JDK directories and the files they contain. The file structure of the JRE is identical to the structure of the jre directory in the JDK. ... Demos and samples that show you how to program for the Java platform are available as a separate download at Java Downloads.
🌐
Tutorialspoint
tutorialspoint.com › java › java_directories.htm
Java - Directory Operations
Following example creates ... public class DirectoryTest { public static void main(String args[]) { String dirname = "/tmp/user/java/bin"; File directory = new File(dirname); // Create directory now....
🌐
Oracle
docs.oracle.com › javase › tutorial › essential › io › dirs.html
Creating and Reading Directories (The Java™ Tutorials > Essential Java Classes > Basic I/O)
You can create a new directory by using the createDirectory(Path, FileAttribute<?>) method. If you don't specify any FileAttributes, the new directory will have default attributes.
🌐
Apache Ant
ant.apache.org › easyant › history › trunk › ref › Directorystructure.html
Directory structure - Apache Ant
To clarify the directory structure source files and resources are separated in two directory. The directory structure of project source code looks like : src/main/java for main source code (note that this can be configured through the property src.main.java)