• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

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

 
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
 
Marshal
Posts: 67280
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
Marshal
Posts: 67280
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
Marshal
Posts: 67280
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
She said she got a brazillian. I think owning people is wrong. That is how I learned ... tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!