Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Class Path

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guy's
I have a super class in C:\sample01\superclass.java and its derived class in in C:\sample01\derivedclass.java;
Both directories are in PATH, Is is path different from Classpath, If yes then where to set it, so that I can compile my derived class. current message on screen is "Super class not found"
Help me out.
Thanks in advance,

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Anil,
It seems that u've not set the Classpath variable. So give the following command on the dos prompt and then compile the program again.
set classpath = %PATH% ; c:\
Reply it it works
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
PATH is a envionament variable we have to set it as
PATH= %PATH%;C:\JDK1.2.2\BIN;
CLASS PATH TELLS THE COMPILER WHERE UR CLASS FILES ARE LOCATED
SO GIVE IT AS
CLASS PATH= %CLASSPATH% ;C:\PACKAGE WHERE UR .CLASS FILES ARE LOCATED.
U CAN AVOID USING CLASS PATH IF U USE javac -d <directory> command
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic