Win a copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java this week in the Agile and Other Processes 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Classpath and Linux....AAHH!!!

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why does it take more than 2 hours to figure this out!?!?! WWWHHYYY!!!


[ September 06, 2005: Message edited by: Tommy Barnes ]
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

First, the CLASSPATH separator, like the PATH separator, is ":" on UNIX, not ";" as it is on Winders.

Second, saying "import javazoom.converter;" implies a class named "converter." In your case, you've got a package named converter from which you want to import multiple classes. The syntax is "import javazoom.converter.*;"
 
Ranch Hand
Posts: 531
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tommy, never use CLASSPATH. Control what you use to compile and run java using the -classpath command line switch. Create a small shell script should it get verbose.
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see the use of CLASSPATH as fatal. Avoiding it at all costs seems to me overly strong advice.
 
Tommy Barnes
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
YEEESSSS!



did the trick. I also had a problem compiling hello world...

worked it out pretty good.

Thanks!
[ September 06, 2005: Message edited by: Tommy Barnes ]
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't have to put the JAR files in the .../jre/lib/ext directory in the classpath explicitly. The Java runtime environment will pick up those JAR files automatically.

See this: The Java Extension Mechanism for Support of Optional Packages
 
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

did the trick.


It is not the trick. It is how import works.
 
Rick O'Shay
Ranch Hand
Posts: 531
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Michael Ernest:
I don't see the use of CLASSPATH as fatal. Avoiding it at all costs seems to me overly strong advice.



I agree. I say never use it and replace with -cp. I don't say it's fatal. I don't say avoid it at all costs. I have no problem with it personally, but it creates an endless stream of issues with noobs that FAQ's don't seem to help with.
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Ernest Friedman-Hill:
Hi,

Welcome to JavaRanch!

First, the CLASSPATH separator, like the PATH separator, is ":" on UNIX, not ";" as it is on Winders.

Second, saying "import javazoom.converter;" implies a class named "converter." In your case, you've got a package named converter from which you want to import multiple classes. The syntax is "import javazoom.converter.*;"



Unless I am reading the above output wrong, shouldn't it be "import javazoom.jl.converter.*;"?

Layne
[ September 08, 2005: Message edited by: Layne Lund ]
 
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!