If you want to compile a class in a package it works like this:

-bash-4.2$ cd /l/www/classes/c212/fall2020/
code/      hw05/      images/    lab03/     labs/      readings/  resources/ wu231/
-bash-4.2$ cd /l/www/classes/c212/fall2020/
code/      hw05/      images/    lab03/     labs/      readings/  resources/ wu231/
-bash-4.2$ cd /l/www/classes/c212/fall2020/
-bash-4.2$ nano -w whatsnew.html
-bash-4.2$ pwd
/l/www/classes/c212/fall2020
-bash-4.2$ mkdir code
mkdir: cannot create directory ‘code’: File exists
-bash-4.2$ mkdir something
-bash-4.2$ cd some
-bash: cd: some: No such file or directory
-bash-4.2$ cd something/
-bash-4.2$ clear
-bash-4.2$ pwd
/l/www/classes/c212/fall2020/something
-bash-4.2$ ls -l
total 0
-bash-4.2$ mkdir src
-bash-4.2$ mkdir classes
-bash-4.2$ cd src/
-bash-4.2$ nano -w One.java
-bash-4.2$ ls -l
total 4
-rw-r--r-- 1 dgerman www 144 Oct 12 15:35 One.java
-bash-4.2$ cat One.java
package rctmpx;

public class One {
  public static void main(String[] args) {
    System.out.println("Ha ha: " + new java.util.Date());
  }
}
-bash-4.2$ pwd
/l/www/classes/c212/fall2020/something/src
-bash-4.2$ tree ../
../
├── classes
└── src
    └── One.java

2 directories, 1 file
-bash-4.2$ javac -d ../classes/ *.java
Picked up _JAVA_OPTIONS: -Xms512m -Xmx512m
-bash-4.2$ tree ../
../
+-- classes
|   +-- rctmpx
|       +-- One.class
+-- src
    +-- One.java

3 directories, 2 files
-bash-4.2$ cd ../classes/
-bash-4.2$ ls
rctmpx
-bash-4.2$ java rctmpx.One
Picked up _JAVA_OPTIONS: -Xms512m -Xmx512m
Ha ha: Mon Oct 12 15:36:06 EDT 2020
-bash-4.2$

--

public class One {
  public static void main(String[] args) {
    System.out.println("ksadufhsadkjfs"); 
    Two.main(null);
  }
}

--

public class Two {
  public static void main(String[] args) {
    System.out.println("askdjsdfakjgfdsa");  
  }
}

--

public class One {
  public static void main(String[] args) {
    // System.out.println("ksadufhsadkjfs"); 
    System.out.println( args ); 
    System.out.println( args.length ); 
    System.out.println( java.util.Arrays.toString( args ) ); 
    // Two.main(null);
  }
}

--

Welcome to DrJava.  Working directory is C:\Users\dgerman\Desktop\yesterday
> run One
[Ljava.lang.String;@24a0f6f0
0
[]
> java One 1 2 3 
[Ljava.lang.String;@38dfaf25
3
[1, 2, 3]
> java One "this is" 3 "and this is" 4
[Ljava.lang.String;@6686e750
4
[this is, 3, and this is, 4]
> java One this is 3 and this is 4
[Ljava.lang.String;@26df1e1d
7
[this, is, 3, and, this, is, 4]


--

public class One {
  public static void main(String[] args) {
    System.out.println("ksadufhsadkjfs"); 
    String[] daniel = null; 
    Two.main( daniel );
  }
}

--

public class What {
  private int value;
  private What next;
  public What(int value, What next) {
    this.value = value; 
    this.next = next; 
  }
  public String toString() {
    return this.value + " " + this.next;  
  }
  public static void main(String[] args) {
    What a = new What(3, null); 
    System.out.println( a ); // 3 null
    a = new What(5, a);
    System.out.println( a ); // 5 3 null
    a = new What(-1, a);
    System.out.println( a ); // -1 5 3 null
    System.out.println( a.next ); // 5 3 null  
    System.out.println( a.next.next ); // 3 null   
  }
}

--

import javax.swing.JFrame; 

public class One {
  public static void main(String[] args) {
    JFrame a = new JFrame("today etc."); 
    a.setVisible(true); 
    a.setSize(400, 400); 
  }
}

--

import javax.swing.JFrame; 

public class One {
  public static void main(String[] args) {
    JFrame a = new JFrame("today etc."); 
    a.setVisible(true); 
    a.setSize(400, 400); 
    a.add(new Two()); 
  }
}

--

import javax.swing.JComponent; 
import java.awt.Graphics; 

public class Two extends JComponent {
  private int count = 0; 
  public void paintComponent(Graphics g) {
    this.count += 1; 
    System.out.println( this.count ); 
  }
}

--

import javax.swing.JFrame; 

public class One {
  public static void main(String[] args) {
    JFrame a = new JFrame("today etc."); 
    a.setVisible(true); 
    a.setSize(400, 400); 
    Two b = new Two(); 
    b.addMouseMotionListener(new Referee("from the JComponent:")); 
    a.add( b ); 
    a.addMouseMotionListener(new Referee("from frame:"));
  }
}

--

import java.awt.event.MouseMotionListener; 
import java.awt.event.MouseEvent; 

public class Referee implements MouseMotionListener {
  String name; 
  public Referee(String name) { this.name = name; } 
  public void mouseMoved(MouseEvent e) { }   
  public void mouseDragged(MouseEvent e) { 
    int x = e.getX(), y = e.getY(); 
    System.out.println(this.name + " (" + x + ", " + y + ")"); 
  }   
}

--

import javax.swing.JComponent; 
import java.awt.Graphics; 

public class Two extends JComponent {
  private int count = 0; 
  public void paintComponent(Graphics g) {
    this.count += 1; 
    System.out.println( this.count ); 
  }
}

--