• 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:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

class path

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ,
i have the follwoing problems :
i create package myPackage .This myPackage contain number of classes (a,b, c, d,e,f,g) where each class in file and i want to use this package in example myExample.Therefore , i write :
package myPackage ;
in first line in each file(a,b,c,d,e,f)
and i write
import myPackage.* ;
in the first line in myExample file
where myPackage is in the following path :
c:\nada\myPackage\
and myExample in the follwoing path :
c:\nada\myExample.java
i use kawa interface and i try to add class path many times but still doesn't work .When i run myExample classes(a,b,..) not found
the question :
where i must add class path for myPackage
thanks alot
-Nada
 
Ranch Hand
Posts: 477
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This post doesn�t belongs to the Threads forum, I'm moving it to Java in General (intermediate) where you will get more help.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have no idea how KAWA works, but when you say that myPackage is in the following path:
c:\nada\myPackage\
do you mean that the class files are in that directory like
c:\nada\myPackage\a.class
or do you mean
c:\nada\myPackage\myPackage.jar
(which will not work).
Your classpath needs to include c:\nada for the myPackage import statement to work.
 
It's just a flesh wound! Or a tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic