NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

CLASSPATH

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
lando
Posted via mailing list.





PostPosted: Thu Feb 05, 2009 5:25 pm    Post subject: CLASSPATH Reply with quote

I'm trying to run a jdb demo and I get the warning below.

ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
Quote:
Quote:
Quote:
Please check your CLASSPATH variable <<<


I work with linux and I' ve put the settings in .bashrc >>>

DERBY_HOME=/home/lando/jdk1.6.0_11/db;
PATH=$PATH:$DERBY_HOME/bin;
CLASSPATH=$CLASSPATH:$DERBY_HOME/lib/*.jar;

I 've read that BERBY_HOME has to be set =/opt/db ..... but java
installation put library
as I 've recorded in .bashrc ! Has everything to be copied also to /opt/db ?

--
View this message in context: http://www.nabble.com/CLASSPATH-tp21856735p21856735.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
Wade Chandler
Posted via mailing list.





PostPosted: Thu Feb 05, 2009 5:43 pm    Post subject: CLASSPATH Reply with quote

I haven't run those demo's before, but CLASSPATH is recommended not to be used for a long time now. However, depending on what you are doing there to let child processes see your environment variables in BASH you need to use export VARNAME = value

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org



----- Original Message ----
Quote:
From: lando <address-removed>
To: address-removed
Sent: Thursday, February 5, 2009 12:25:12 PM
Subject: [nbusers] CLASSPATH



I'm trying to run a jdb demo and I get the warning below.

ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
Quote:
Quote:
Quote:
Please check your CLASSPATH variable <<<


I work with linux and I' ve put the settings in .bashrc >>>

DERBY_HOME=/home/lando/jdk1.6.0_11/db;
PATH=$PATH:$DERBY_HOME/bin;
CLASSPATH=$CLASSPATH:$DERBY_HOME/lib/*.jar;

I 've read that BERBY_HOME has to be set =/opt/db ..... but java
installation put library
as I 've recorded in .bashrc ! Has everything to be copied also to /opt/db ?

--
View this message in context:
http://www.nabble.com/CLASSPATH-tp21856735p21856735.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
Simon Roberts
Posted via mailing list.





PostPosted: Thu Feb 05, 2009 5:44 pm    Post subject: CLASSPATH Reply with quote

Variables need to be exported. What you have set up is invisible. Since you're using a bash-specific config file, you can simply add the word "export" to the start of each line that declares/assigns a variable.

HTH,
Simon

"You can tell whether a man is clever by his answers. You can tell whether a man is wise by his questions." — Naguib Mahfouz



----- Original Message ----
Quote:
From: lando <address-removed>
To: address-removed
Sent: Thursday, February 5, 2009 10:25:12 AM
Subject: [nbusers] CLASSPATH



I'm trying to run a jdb demo and I get the warning below.

ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
Quote:
Quote:
Quote:
Please check your CLASSPATH variable <<<


I work with linux and I' ve put the settings in .bashrc >>>

DERBY_HOME=/home/lando/jdk1.6.0_11/db;
PATH=$PATH:$DERBY_HOME/bin;
CLASSPATH=$CLASSPATH:$DERBY_HOME/lib/*.jar;

I 've read that BERBY_HOME has to be set =/opt/db ..... but java
installation put library
as I 've recorded in .bashrc ! Has everything to be copied also to /opt/db ?

--
View this message in context:
http://www.nabble.com/CLASSPATH-tp21856735p21856735.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
lando
Posted via mailing list.





PostPosted: Fri Feb 06, 2009 2:20 pm    Post subject: CLASSPATH Reply with quote

It works using the command below instead of CLASSPATH=$DERBY_HOME/lib/*.jar;
CLASSPATH=$DERBY_HOME/lib/derby.jar;

But it works only on command line......
NB 6.5 both with export and without it , still complains >>>
ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
Quote:
Quote:
Quote:
Quote:
Please check your CLASSPATH variable <<<
Is not something internal at NB ?
Thanks.











Wade Chandler wrote:
Quote:

I haven't run those demo's before, but CLASSPATH is recommended not to be
used for a long time now. However, depending on what you are doing there
to let child processes see your environment variables in BASH you need to
use export VARNAME = value

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner,
NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org



----- Original Message ----
Quote:
From: lando <address-removed>
To: address-removed
Sent: Thursday, February 5, 2009 12:25:12 PM
Subject: [nbusers] CLASSPATH



I'm trying to run a jdb demo and I get the warning below.

ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
Quote:
Quote:
Quote:
Please check your CLASSPATH variable <<<


I work with linux and I' ve put the settings in .bashrc >>>

DERBY_HOME=/home/lando/jdk1.6.0_11/db;
PATH=$PATH:$DERBY_HOME/bin;
CLASSPATH=$CLASSPATH:$DERBY_HOME/lib/*.jar;

I 've read that BERBY_HOME has to be set =/opt/db ..... but java
installation put library
as I 've recorded in .bashrc ! Has everything to be copied also to
/opt/db ?

--
View this message in context:
http://www.nabble.com/CLASSPATH-tp21856735p21856735.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.




--
View this message in context: http://www.nabble.com/CLASSPATH-tp21856735p21873294.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
lando
Posted via mailing list.





PostPosted: Fri Feb 06, 2009 2:47 pm    Post subject: CLASSPATH Reply with quote

Now I've added to Library //db/lib containing .jar files and still NB 6.5
gives
the same error !!!
See attachement . http://www.nabble.com/file/p21873824/NB2.png











Wade Chandler wrote:
Quote:

I haven't run those demo's before, but CLASSPATH is recommended not to be
used for a long time now. However, depending on what you are doing there
to let child processes see your environment variables in BASH you need to
use export VARNAME = value

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner,
NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org



----- Original Message ----
Quote:
From: lando <address-removed>
To: address-removed
Sent: Thursday, February 5, 2009 12:25:12 PM
Subject: [nbusers] CLASSPATH



I'm trying to run a jdb demo and I get the warning below.

ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
Quote:
Quote:
Quote:
Please check your CLASSPATH variable <<<


I work with linux and I' ve put the settings in .bashrc >>>

DERBY_HOME=/home/lando/jdk1.6.0_11/db;
PATH=$PATH:$DERBY_HOME/bin;
CLASSPATH=$CLASSPATH:$DERBY_HOME/lib/*.jar;

I 've read that BERBY_HOME has to be set =/opt/db ..... but java
installation put library
as I 've recorded in .bashrc ! Has everything to be copied also to
/opt/db ?

--
View this message in context:
http://www.nabble.com/CLASSPATH-tp21856735p21856735.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.






--
View this message in context: http://www.nabble.com/CLASSPATH-tp21856735p21873824.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
Wade Chandler
Posted via mailing list.





PostPosted: Fri Feb 06, 2009 4:01 pm    Post subject: CLASSPATH Reply with quote

NB isn't using what ever it is you are trying to use. CLASSPATH isn't used anymore (it has not been recommended to be used for a good long while now). That CLASSPATH variable is probably coming from Derby itself where it is giving you that message. To use the embedded driver from NB look under the services tab and look in your drivers section. You need to make sure you are pointing its classpath, using the UI, to the correct libraries under properties or when you add a new driver.

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org



----- Original Message ----
Quote:
From: lando <address-removed>
To: address-removed
Sent: Friday, February 6, 2009 9:20:00 AM
Subject: Re: [nbusers] CLASSPATH


It works using the command below instead of CLASSPATH=$DERBY_HOME/lib/*.jar;
CLASSPATH=$DERBY_HOME/lib/derby.jar;

But it works only on command line......
NB 6.5 both with export and without it , still complains >>>
ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
Quote:
Quote:
Quote:
Quote:
Please check your CLASSPATH variable <<<
Is not something internal at NB ?
Thanks.











Wade Chandler wrote:
Quote:

I haven't run those demo's before, but CLASSPATH is recommended not to be
used for a long time now. However, depending on what you are doing there
to let child processes see your environment variables in BASH you need to
use export VARNAME = value

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner,
NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org



----- Original Message ----
Quote:
From: lando
To: address-removed
Sent: Thursday, February 5, 2009 12:25:12 PM
Subject: [nbusers] CLASSPATH



I'm trying to run a jdb demo and I get the warning below.

ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
Quote:
Quote:
Quote:
Please check your CLASSPATH variable <<<


I work with linux and I' ve put the settings in .bashrc >>>

DERBY_HOME=/home/lando/jdk1.6.0_11/db;
PATH=$PATH:$DERBY_HOME/bin;
CLASSPATH=$CLASSPATH:$DERBY_HOME/lib/*.jar;

I 've read that BERBY_HOME has to be set =/opt/db ..... but java
installation put library
as I 've recorded in .bashrc ! Has everything to be copied also to
/opt/db ?

--
View this message in context:
http://www.nabble.com/CLASSPATH-tp21856735p21856735.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.




--
View this message in context:
http://www.nabble.com/CLASSPATH-tp21856735p21873294.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
lando
Posted via mailing list.





PostPosted: Fri Feb 06, 2009 4:52 pm    Post subject: CLASSPATH Reply with quote

It seems fine....... though it doesn't work....

ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver

Quote:
Quote:
Quote:
Please check your CLASSPATH variable <<<

java.sql.SQLException: No suitable driver found for
jdbc:derby:jdbcDemoDB;create=true
. . . exception thrown:
at java.sql.DriverManager.getConnection(DriverManager.java:602)


see attachement .
Thanks.
http://www.nabble.com/file/p21876340/NB3.png




Wade Chandler wrote:
Quote:

NB isn't using what ever it is you are trying to use. CLASSPATH isn't used
anymore (it has not been recommended to be used for a good long while
now). That CLASSPATH variable is probably coming from Derby itself where
it is giving you that message. To use the embedded driver from NB look
under the services tab and look in your drivers section. You need to make
sure you are pointing its classpath, using the UI, to the correct
libraries under properties or when you add a new driver.

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner,
NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org



----- Original Message ----
Quote:
From: lando <address-removed>
To: address-removed
Sent: Friday, February 6, 2009 9:20:00 AM
Subject: Re: [nbusers] CLASSPATH


It works using the command below instead of
CLASSPATH=$DERBY_HOME/lib/*.jar;
CLASSPATH=$DERBY_HOME/lib/derby.jar;

But it works only on command line......
NB 6.5 both with export and without it , still complains >>>
ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
Quote:
Quote:
Quote:
Quote:
Please check your CLASSPATH variable <<<
Is not something internal at NB ?
Thanks.











Wade Chandler wrote:
Quote:

I haven't run those demo's before, but CLASSPATH is recommended not to
be
Quote:
used for a long time now. However, depending on what you are doing
there
Quote:
to let child processes see your environment variables in BASH you need
to
Quote:
use export VARNAME = value

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner,
NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org



----- Original Message ----
Quote:
From: lando
To: address-removed
Sent: Thursday, February 5, 2009 12:25:12 PM
Subject: [nbusers] CLASSPATH



I'm trying to run a jdb demo and I get the warning below.

ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
Quote:
Quote:
Quote:
Please check your CLASSPATH variable <<<


I work with linux and I' ve put the settings in .bashrc >>>

DERBY_HOME=/home/lando/jdk1.6.0_11/db;
PATH=$PATH:$DERBY_HOME/bin;
CLASSPATH=$CLASSPATH:$DERBY_HOME/lib/*.jar;

I 've read that BERBY_HOME has to be set =/opt/db ..... but java
installation put library
as I 've recorded in .bashrc ! Has everything to be copied also to
/opt/db ?

--
View this message in context:
http://www.nabble.com/CLASSPATH-tp21856735p21856735.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.




--
View this message in context:
http://www.nabble.com/CLASSPATH-tp21856735p21873294.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.




--
View this message in context: http://www.nabble.com/CLASSPATH-tp21856735p21876340.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo