0

I'm trying to run a Java program from a script called converter.cmd but something is wrong.

    P:\LatitudeConsulting\LatConConverter-1.8.2>dir
 Volume in drive P has no label.
 Volume Serial Number is 1074-4BBE

 Directory of P:\LatitudeConsulting\LatConConverter-1.8.2

08/25/2011  10:32 AM    <DIR>          .
08/25/2011  10:32 AM    <DIR>          ..
05/11/2011  09:29 PM             2,349 convert.xsd
02/19/2008  09:28 PM               100 Converter.cmd
05/11/2011  09:29 PM           104,697 Converter.jar
05/11/2011  09:29 PM            74,082 Converter.jar.old
05/19/2011  01:02 PM             1,432 Converter.properties
05/19/2011  04:37 PM             1,432 Converter.properties.modifiedJJA.txt
08/24/2011  04:54 PM               292 FieldList.txt
08/25/2011  10:31 AM    <DIR>          jre.1.6.0
05/11/2011  09:30 PM             1,747 MimeTypes.properties

Here is the content of converter.cmd:

cd %~dp0%
jre.1.6.0\bin\java -Xmx1024m -cp Converter.jar com.latcon.ExportConvert.Converter %1 %2

Here is what I get when I type converter at the above command prompt:

    P:\LatitudeConsulting\LatConConverter-1.8.2>converter

P:\LatitudeConsulting\LatConConverter-1.8.2>cd P:\LatitudeConsulting\LatConConverter-1.8.2\

P:\LatitudeConsulting\LatConConverter-1.8.2>jre.1.6.0\bin\java -Xmx1024m -cp Converter.jar com.latcon.ExportConvert.Conv
erter
'jre.1.6.0\bin\java' is not recognized as an internal or external command,
operable program or batch file.

P:\LatitudeConsulting\LatConConverter-1.8.2>

EDIT---------

    P:\>dir p:\LatitudeConsulting\LatConConverter-1.8.2\jre.1.6.0\bin\java.*
 Volume in drive P has no label.
 Volume Serial Number is 1074-4BBE

 Directory of p:\LatitudeConsulting\LatConConverter-1.8.2\jre.1.6.0\bin

05/11/2011  09:29 PM           126,976 java.dll
           1 File(s)        126,976 bytes
           0 Dir(s)  16,691,785,728 bytes free

P:\>

Looks like no java.exe exists - only java.dll

2
  • what is the output of dir P:\LatitudeConsulting\LatConConverter-1.8.2\jre.1.6.0\bin\java.*? Commented Aug 25, 2011 at 15:34
  • Thanks gnat. I think you've spotted something (see my edit --- above) but not sure how to proceed here... Commented Aug 25, 2011 at 15:56

2 Answers 2

1

Try jre.1.6.0\bin\java.exe - with the extension.

Sign up to request clarification or add additional context in comments.

2 Comments

Added the .exe extension but it still fails (virtually the same error as before): 'jre.1.6.0\bin\java.exe' is not recognized as an internal or external command, operable program or batch file.
Somehow library got corrupted...there is no java.exe present in the required directory. Thanks for your time - I am rebuilding the whole thing now from the original .zip distribution container.
1

Try just java or java.exe, your java program might not be in jre.1.6.0\bin.

If it's not in the relative path you're trying to execute it from, copy it there ( assuming that's what you want ).

1 Comment

Somehow library got corrupted...there is no java.exe present in the required directory. Thanks for your time - I am rebuilding the whole thing now from the original .zip distribution container.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.