Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Reading about the Google v Oracle case, I came across these questions (apparently from the presiding Judge)

...
Is it agreed that the following is true, at least as of 1996?

The following were the core Java Application Programming Interface: java.lang, java.util and java.io.

Does the Java programming language refer to or require any method, class or package outside the above three?
...

source: Groklaw

There are obviously lots of legal ramifications, Google and Oracle probably disagree on some points, and I don't care. Leave law to the lawyers.

However, I suspect there's an interesting bit of history in here.

My question is (as someone who first did any Java coding around 2001 in version 1.3), in version 1.0 of Java was anything required outside of java.lang, java.util, and java.io to compile a valid Java program?

As an example (using C# 5.0), the await keyword is dependent upon Task<T> GetAwaiter() (amongst other things). The compiler couldn't function to spec without that class.

Equivalently, were there any core runtime features (like ClassLoader*) that were dependent on other packages?

I'll admit I ask out of curiosity, exactly what is necessary for minimum-viable Java (the language, ignoring all the legal bits around it) is interesting.

*I am assuming that ClassLoader was even a feature in Java 1.0, it's part of the spec in 7.0 and presumably many earlier versions.

share|improve this question

migrated from stackoverflow.com May 4 '12 at 5:47

This question came from our site for professional and enthusiast programmers.

2  
back in the days when java was a simple language ... –  Jens Schauder May 4 '12 at 5:10
7  
back in the days when java –  Sara Chipps May 4 '12 at 5:56
2  
FYI, the await keyword doesn't depend on Task<T>. The Task class just happens to satisfy the things that the await keyword does depend on (a method called GetAwaiter() etc). –  Matt Hamilton May 4 '12 at 6:04
2  
@Matt - corrected, should have gone with yield and IEnumerator or something; just so excited for await. –  Kevin Montrose May 4 '12 at 6:45
    
So you basically want to know which classes java.lang.Object actually depended on in JDK 1, right? –  scarfridge May 4 '12 at 6:47

3 Answers 3

up vote 50 down vote accepted

Per Wikipedia, the first formally released version of Java was 1.0.2, on Jan 23 1996.

The first stable version was the JDK 1.0.2. is called Java 1

There's an archive of Java 1.0.2 and all related documentation here:

  • JDK 1.0.2 API reference (book format)
  • JDK 1.0.2 API reference (javadoc format)
  • Java tutorial
  • Java language specification (link broken, wayback'd here)
  • Java virtual machine specification

There appears to be a download of the JDK 1.0.2 bits here

http://www.pascal-man.com/download/download-jdk.shtml

It works for me at the time of writing.

Java 1.0.2 on Windows 7 x64

BEHOLD THE RAW UNMITIGATED POWER OF JAVA 1.0.2


In the language spec, the following classes are referred to (single citation, not exhaustive citations):

  • Class (section 4.3.1)
  • String (section 4.3.1)
  • Object (section 4.3.2)
  • Random (section 4.4)
  • Thread (section 17.2)
  • ThreadGroup (section 17.2)
  • Throwable (section 11)
  • Error (section 11.2)
  • loads and loads of errors, all under java.lang (section 11.5.2.1 - 11.5.2.2)
  • RuntimeException (section 11.2.1)
  • the "Array classes", [I, and so on (section 10.8)

... at which point I stopped looking because, technically, [I, et. al. aren't in the java.lang, java.util, or java.io packages.

Example:

class Test {
  // Compare namespaces of built-ins object and int[]
  public static void main(String[] args){
    int[] arr = new int[0];
    Object obj = new Object();

    Class arrClass = arr.getClass();
    Class objClass = obj.getClass();

    Class arrSuper = arrClass.getSuperclass();

    System.out.println("plain jane Object - " + objClass.getName());
    System.out.println();
    System.out.println("int[] - "+arrClass.getName());
    System.out.println("super of int[] - "+arrSuper.getName());
  }
}

Outputs

enter image description here

Behavior is consistent between modern and 1.0.2

enter image description here

share|improve this answer
    
Gold Google-fu yet again. –  Kevin Montrose May 4 '12 at 5:53
7  
    
@YannisRizos You and me both. That was my first web browser. –  World Engineer May 4 '12 at 6:03
    
@WorldEngineer: I give you Mosaic. –  sbi May 4 '12 at 9:39
    

There were less than a dozen packages in the original JDK -- these plus applet, awt, awt.peer. That may have been it! It is absolutely likely -- 99% certain -- that these three packages included all classes that were explicitly known to the core JVM itself, and that there were no classes outside these packages mentioned in the language spec.

share|improve this answer

java.net was also among the first packages available and it was great from the start, especially with the threading facility (now the Thread model appears outdated compared to what you have in more recent languages but it was great then).

I remember having coded a web browser (very incomplete, even compared to what existed at the time) in order to learn the freshly published 1.02 and, just after, a complete web application server (still used in industry). That was long before the servlet api and everybody being persuaded that you have to use heavy frameworks to make fast and reliable http applications in java.

With java.net (and the GC, and Threads, and exceptions and java.util) java was bound to be a major technology server side (at the opposite side, java.applet was painful since the first day...)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.