• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

classpath and javac

Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given the following two files containing Light.java and Dark.java:

And if those files are located in the following directory structure:

-----| Light.java
-----| Dark.java
-----| checker

and this comand line invocation

Ok, i try this and works, but my question is.

¿How javac can find Light.java? ... I assume that -cp checker/dira we changed the classpath environment variable to "dira", were there is not any .java source file. So, for me the java algorithm is trying to find de source file there. is that right?

Sorry for this basic question but i search on the internet and on this forum and I dont understand why i am wrong.

Sorry , its working, One error in my computer led me to think that to run javac is necessary to set the classpath when according to theory , only seeks classes . In my computer HelloWord.java does not copile without "javac - cp ." , but I try in another and it works . Now i understand a lot of things, It was driving me crazy.
My, my, aren't you a big fella. Here, have a tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic