Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Import Error

 
Charmaine Gatling
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I keep getting an error regarding an import that I know is there. Besides the location of the files, what else do I need to check when I get an error because of the import?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the classpath as well. What does the error message say?
 
Doug Wolfinger
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was having the same problem in Win98, using jdk1.3. There was a topic regarding this back in August 2000 that doesn't appear to be available any more. http://www.javaranch.com/ubb/Forum33/HTML/000670.html
I have created a folder, "interfaces", with an interface in the folder that creates the package...

Then in the program over in the bin directory, it actually appears to be working now...

I don't remember what problem I was having in 2000, but it's working now.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doug,
That thread is still available - just not through that hyperlink. A while back, changes were made to the server that have rendered the old-style of thread referencing invalid. If you remember key words/concepts from the conversation, you may have success finding it by using the google search feature found at the bottom of this page. Or, since you already have the old style of reference, just change it to one of the newer forms in use:
http://www.coderanch.com/t/387070/java/java/Help-compiling-packages
or
http://www.coderanch.com/t/387070/java/java/Help-compiling-packages
And it looks like this is the thread where you described your problem in 2000.
[ July 27, 2002: Message edited by: Dirk Schreckmann ]
 
Doug Wolfinger
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, but that's the topic I started. Jane Griscti posted a reply to me that included a link to a discussion which had been happening for some time before I started my topic. Your suggestion worked and here is the link in question
http://www.coderanch.com/t/387070/java/java/Help-compiling-packages
That lead to this topic.
http://www.coderanch.com/t/194641/java-programmer-SCJP/certification/import-package
[ July 27, 2002: Message edited by: Doug Wolfinger ]
 
Marilyn de Queiroz
Sheriff
Posts: 9066
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Charmaine Gatling:
I keep getting an error regarding an import that I know is there. Besides the location of the files, what else do I need to check when I get an error because of the import?


Is the class that is importing the import in the default package, or does it have a package statement above the import statements?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic