Re: Can't locate Javax

From: David Zimmerman (dzimm_at_hiddenmind.com)
Date: 10/16/03


Date: Thu, 16 Oct 2003 15:01:41 GMT

You don't need to ever specify rt.jar on your classpath, its part of the
default bootclasspath.

You need to change your import slightly

import javax.swing.*;

ak wrote:

> forget tools.jar and src - you need c:\j2sdk1.4.2\lib\rt.jar
>
>
> "Asad Khan" <uoft_cstutor@yahoo.com> schrieb im Newsbeitrag
> news:6Qxjb.135309$ko%.4158@news04.bloor.is.net.cable.rogers.com...
>
>>Hi,
>>
>>I am using DrJava, and I am writing a program that has the following
>>statement:
>>
>> import javax.swing;
>>
>>It gives me this error when compiled:
>>
>> File: C:\Program Files\DrJava\CustomJFrame.java [line: 1]
>> Error: package javax does not exist
>>
>>I did set my classpath variable to:
>>
>> c:\j2sdk1.4.2\lib\tools.jar;C:\j2sdk1.4.2_01\src\javax
>>
>>where C:\j2sdk1.4.2_01\src\javax is where javax is located.
>>
>>What am I doing wrong?
>>
>>
>>
>
>
>



Relevant Pages

  • Re: Adding UNC paths to CLASSPATH
    ... >:The problem I've got is that I can't properly set the CLASSPATH required ... expecting that the jar file will already contain a manifest ... If this is all that's needed, then make sure your manifest contains one, ... Or specify them in a subdirectory and specify that in the ...
    (comp.lang.java.help)
  • Re: ZipException when running jar file from command file
    ... > But I need to specify VM arguments, and I can't specify VM arguments in ... > the manifest file (unless somebody can tell me how, ... If I run it by double-clicking MyJar.cmd from Windows Explorer, ... > CLASSPATH wasn't set. ...
    (comp.lang.java.programmer)
  • Re: Automated tool for exe jar
    ... >> Setup your CLASSPATH and also ensure Java's BIN directory is in PATH, ... The newer JDKs can get that from their installation. ... Maybe you mean to specify the path variable in the manifest file? ...
    (comp.lang.java.programmer)
  • Re: NoClassDefFoundError Files.Symantec.Norton with xjc tool
    ... probably your CLASSPATH. ... You'll need to specify how your program ...
    (comp.lang.java.programmer)
  • Re: Java on Linux
    ... How is this managed in Linux? ... > You are thinking of the classpath. ... > or specify the path on the java or javac command line via the ... the CLASSPATH environment variable empty and specify the classpath ...
    (comp.lang.java.programmer)