The Artima Developer Community
Sponsored Link

Java Answers Forum
package com.bruceeckel.simpletest does not exist

1 reply on 1 page. Most recent reply: Nov 7, 2003 7:17 PM by Senthilnathan

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Charles Keller

Posts: 8
Nickname: cgkeller
Registered: Oct, 2003

package com.bruceeckel.simpletest does not exist Posted: Nov 5, 2003 9:23 PM
Reply to this message Reply
Advertisement
I tried to run bruceeckel's program "IfElse" and i get the following 2 errors:

c:\java>javac IfElse.java
IfElse.java:4: package com.bruceeckel.simpletest does not exist
import com.bruceeckel.simpletest.*;

IfElse.java:7: cannot access Test
bad class file:.\Test.java
File does not contain class Test
static Test monitor = new Test();

2 errors

What did I do wrong? Should I put a "set classpath="somewhere and pointing to what?

Your valuable help will be appreciated.
Charles.


Senthilnathan

Posts: 13
Nickname: ssnathan
Registered: Jul, 2003

Re: package com.bruceeckel.simpletest does not exist Posted: Nov 7, 2003 7:17 PM
Reply to this message Reply
if you are importing some classes like
import com.bruceeckel.simpletest.*;

and the directory structure is like,

c:/mycode/src/com/bruceeckel/simpletest/test.java or some other java files, then

c:/mycode/src should be in the classpath ( command is 'set classpath=c:/mycode/src;%classpath%' )

The thing is, the javac tries to find the classes in the structure mentioned in the import statement starting from the directories mentioned in the classpath.

or if the files are in a jar, do
set classpath = c:/mysamples/bruceeckel.jar;%classpath%

Flat View: This topic has 1 reply on 1 page
Topic: No way to kill a java threads? Previous Topic   Next Topic Topic: How to solve this problem?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use