• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Elton Hughes
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jars placed in this folder are automatically added to the classpath hence "extending" the Java library.
 
Elton Hughes
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
LOL

Thanks Bear.

Damn glasses. Can't see with them, can't see without them.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic