This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Classpath and Linux....AAHH!!!  RSS feed

 
Tommy Barnes
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 ]
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • 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.*;"
 
Rick O'Shay
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.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
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 ]
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16026
87
Android IntelliJ IDE Java Scala Spring
  • 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
 
David Ulicny
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.
 
Layne Lund
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 ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!