Mannsi
asked on
Problem with multiple Java Classpaths in Ubuntu
Hello experts,
I've just started using Java in Ubuntu and one of my first tasks was connecting to a PostgreSQL DB using it. I read a bit and it said that I should change the Classpath in .bashrc to the location of the PostgreSQL .jar file. No problem, did that and everything worked like a charm. But now I wan't to add another file to my Classpath, and I so far I have been unsuccessful. This is the line that for my postgresql connection settings:
export CLASSPATH=.:/usr/lib/jvm/j ava-6-sun- 1.6.0.07/p ostgresql- 8.3-603.jd bc4.jar
My question is, how do I add another .jar file to my Classpath.
I've just started using Java in Ubuntu and one of my first tasks was connecting to a PostgreSQL DB using it. I read a bit and it said that I should change the Classpath in .bashrc to the location of the PostgreSQL .jar file. No problem, did that and everything worked like a charm. But now I wan't to add another file to my Classpath, and I so far I have been unsuccessful. This is the line that for my postgresql connection settings:
export CLASSPATH=.:/usr/lib/jvm/j
My question is, how do I add another .jar file to my Classpath.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry if this is an added question, please let me know if this is inappropriate.
It is an added question but hey - that happens. Anyway it looks as though you are having file permission problems. Are you on lynx or unix. The jar file probably hat root permissions or something along those lines and you will need to be added to a group that has permissions to the file. Do you have a system admin? They should be able to fix this for you no problem.
ASKER
I'm using my own laptop computer, running Linux Ubuntu. I understand that I'm having file permission problems, I just don't know how to fix it. I've blindly done a couple of 'chmod something' and 'chown something' when following a few HowTo's but I've never really understood it. I'm going to close this question since you did answer the question I posted first, but if it's a question of single command that you know about, I would appreciate it. Thanks
Because its your computer you can open the file to everyone chmod 777
ASKER
When I open a terminal after doing the changes I get a
bash:PathToFile.jar: Permission denied.
What permission do I have to assign to the file ?