Skip to main content
Published: January 11 2007, 3:55:00 PMUpdated: November 28 2020, 3:11:40 PM

I am getting the build error when using execute Java SDK code generate script :

                  ant -buildfile sdkCodeGen.xml.

 What is the cause and how to correct it? I am using JDK 1.5


[javac] Compiling 817 source files to C:\ebaysdk\source\core\classes
[javac] Fatal Error: Unable to find package java.lang in classpath or bootclasspath

Detailed Description

 The possible cause for this error is:
    -- The java.lang package is not found in the CLASSPATH environment variable. The java.lang package is bundled in rt.jar in the stardard JDK ( version) while it is defined in other jar in some other JDK.

   The workaround for this issue is to download the attached file, unzip it and add the rt.jar to the director as below:



How well did this answer your question?
Answers others found helpful