wood burning stoves 2.0*
The moose likes Mac OS and the fly likes What is the role of /Library/Java/Extentions ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "What is the role of /Library/Java/Extentions ?" Watch "What is the role of /Library/Java/Extentions ?" New topic
Author

What is the role of /Library/Java/Extentions ?

Elton Hughes
Ranch Hand

Joined: Jun 19, 2003
Posts: 72
Hello All,

I am using Mac OS 10.3.8 and I am starting to learn about Velocity. I had some problems (actually I still do, but I want to work on them some more before turning to help), but the biggest one was solved when I moved a Velocity jar file into /Library/Java/Extentions.

So what does that directory actually do?

Thanks,

Elton
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

Jars placed in this folder are automatically added to the classpath hence "extending" the Java library.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Elton Hughes
Ranch Hand

Joined: Jun 19, 2003
Posts: 72
Hello Bear,

Thank you for the answer. It is what I thought. But that now leads me to a new question, I hope you do not mind.

I am beginning and exporation of Velocity. I have downloaded and installed in. According to the ant build, it installed successfully.

There are two jar files that came with Velocity. I have moved them to /Library/Java/Extentions. But when I compile this simple application I get an error. The application is:


The error message I get is:
-> javac HelloWorld.java
HelloWorld.java:5: cannot resolve symbol
symbol : class VelocityCotext
location: package velocity
import org.apache.velocity.VelocityCotext;
^
HelloWorld.java:19: cannot resolve symbol
symbol : class VelocityCotext
location: class HelloWorld
VelocityCotext context = new VelocityContext();
^
HelloWorld.java:19: cannot resolve symbol
symbol : class VelocityContext
location: class HelloWorld
VelocityCotext context = new VelocityContext();
^
HelloWorld.java:23: cannot resolve symbol
symbol : variable template
location: class HelloWorld
template.merge(context, writer);
^
4 errors


Seems to me like it is saying that it cannot find the jar files in that directory. Am I reading that right?

Thanks,

Elton
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

Seems to me like it is saying that it cannot find the jar files in that directory. Am I reading that right?


No. I believe it is saying that you misspelled the class name.
Elton Hughes
Ranch Hand

Joined: Jun 19, 2003
Posts: 72
LOL

Thanks Bear.

Damn glasses. Can't see with them, can't see without them.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65



The clue was that it choked on the second import and not the first. If it liked the first, then we know that the package was read from the classpath correctly.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What is the role of /Library/Java/Extentions ?
 
Similar Threads
What is the use of VM file?
Running Java Programs from the command prompt
Journal Article - Velocity - An Introduction
velocity templates and internationalization
extending velocity