JDK-4239214 : JavaC does not generate package heirarchy
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.2.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1999-05-18
  • Updated: 2000-01-11
  • Resolved: 2000-01-11
Related Reports
Duplicate :  
Description

Name: skT88420			Date: 05/18/99


When compiling classes which live in package hierarchies, the corresponding directories are not created unless you have the -d . option.

It would make more sense if, when compiling source files, for the class files to always be put inside its package directory structure.

This would allow you to run an object as 'java com.sun.Stuff' rather than the 'bodged' 'java Stuff' as an executable.
(Review ID: 83208) 
======================================================================

Comments
WORK AROUND Name: skT88420 Date: 05/18/99 Essentially have -d . as a 'default' option. Workaround is to have -d . as the default, or set an alias so that 'javac' is 'javac -d .' Note that this makes no difference if the object lives in no package; it will still execute in the current directory (which is what people want when they are testing small code). However, classes which live in packages shouldn't be put in the current directory. ======================================================================
11-06-2004

EVALUATION We are looking into rationalizing the 'javac' command-line syntax and associated behavior at some point in the future. william.maddox@Eng 1999-06-23 I have created a bug for the command-line rationalization, 4304048, and closed this one as a duplicate. william.maddox@Eng 2000-01-11
23-06-1999