Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I need help

 
zhang feng
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i had a display.java;i compiled it,and founded a display.jar files.then i deleted the display.java and display.class;i had an other Usedisplay.java . i use the display.class's object in the Usedisplay. both display.jar and Usedisplay.java have a path.but i compile the Usedisplay.java ,is wrong!show the "package display does not exit"," import display.*"
please help me ,i think to use the class from .jar files!
i m sorry ,my english level is not well!
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any classes you want to use (import) in another class should be on your CLASSPATH, not your PATH.

javac -cp .;c:\path\to\your\jar_file.jar Usedisplay.java
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even though this might be a servlet you're compiling, I'm still going to move it to Java In General - Beginners.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic