classpath woes -newbie

J

jsons

First of all, my apologies, I am a VB programmer [ducking tomatoes and
stones]. I humbly come to this group for guidance, since my vb
communities have been unable to assist.

I was given a java application and asked to call it from a web page
(ASP.Net). Sounds simple enough, I have called external apps from web
pages before, falling off a donkey easy, right?.

I wrote a simple batch file to call the java app and tested it through
the command line on the server, life is good:

RunJava batch code:

cd C:\JavaApp
"C:\Program Files\Java\jdk1.5.0_12\bin\java" JavaApp Arg1 Arg2 >> c:
\JavaApp\outfile.txt

Then I call the RunJava batch file from my ASP page... not so good. My
output gives an error:

Exception in thread "main"
java.lang.NoClassDefFoundError: C:\Program Files\App 3/0\javajar/jar

Please NOTE: My original classpath has spaces and dots in it. I
enclosed everything in double quotes but the error message had changed
to dots in the path to slashes.

ie:
classpath = C:\Program Files\App 3.0\javajar.jar
error reads C:\Program Files\App 3/0\javajar/jar

I moved the jar file to a more simple location, relative to the java
app:
C:\JavaApp\classes\javajar.jar

but get the same error. Ugh.

I tried using the -classpath switch, but get the same error, EVEN when
running through command prompt, NOT just through ASP page. Stranger
and stranger things are amiss.

I have tried obvious (to me, at least) solutions such as permissions,
changing directories, changing dots to slashes and using chr(46)
functions through ASP to force the dot to an ansii dot which, by the
way, gave the same error only it left the dots in place...

I am at the end of 'java-less knowledge' rope and have not found any
help elsewhere on the web. With all respect and humility I turn to the
gurus of this group for enlightenment.

Any suggestions are greatly appreciated and will be tested and replied
to.

Shoot the donkey.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

classpath woes 2
a java classpath question 12
Classpath in Jar manifest 1
java applet classpath 5
CLASSPATH 5
classpath problem in my machine 5
ant script, problem with classpath 4
Building classpath at runtime 2

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top