db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Embretsen <John.Embret...@Sun.COM>
Subject Re: question on Working with JavaDB Activities
Date Mon, 23 Apr 2007 11:24:31 GMT
Joe Annoni wrote:
> Couple of novice questions here (your help is much
> appreciated!):
> 
> 1) While going through the "Working with JavaDB" pdf
> in Step 2 of Activity 3 (ie, page 14), I'm getting a
> command line error of "'javac' is not recognized as an
> internal or external command...".  I presume there is
> a problem with my JAVA_HOME path, but I've changed it
> from the "java/j2re1.4.2_03" directory (which has
> worked for everything else) to "java/jdk1.6.0" (where
> the 'javac.exe' file exists) and still nothing.  Is
> there somewhere else where the 'javac' command should
> be picked up?


Try running

"${JAVA_HOME}/bin/javac" ("%JAVA_HOME%\bin\javac" on Windows) instead of just
"javac". Alternatively, if you add the path to the bin/ directory of your java
installation to your PATH environment variable, for example:

Bash shell: export PATH=${JAVA_HOME}/bin:${PATH}

Windows cmd.exe: set PATH=%JAVA_HOME%\bin;%PATH%

then "javac" should work. The "Working with..." guide does not show this as far
as I can see, but I don't know if that was a conscious decision or not.


> 2) Separately, I compiled the WwdEmbedded.java file in
> an IDE (JCreator) and when I trying executing it I get
> "ClassNotFoundException:
> org.apache.derby.jdbc.EmbeddedDriver".  I understand
> this may be a CLASSPATH problem, however when I check
> %classpath% it shows it pointing to the 'derby.jar'
> and 'derbytools.jar' files.  Any other common problems
> or suggestions?

Your analysis is correct, this happens when the driver class (which is in
derby.jar) is not in the classpath. Did you (try to) execute the application in
a command window or via the IDE? I don't have any other suggestions than double
checking that the application is using the classpath you think it is using...

Does running sysinfo ("java org.apache.derby.tools.sysinfo") work?


-- 
John



Mime
View raw message