Page 1 of 1

Error Building Java FirstSteps Examples

Posted: Wed Nov 06, 2019 7:09 pm
by CilindroAmarillo
Hello!

I've been trying to learn about UNO. I was wondering if someone could help me with building the Java examples included in the SDK, specifically the Java FirstSteps examples. I called Make inside the directory 'OpenOffice 4\sdk\examples\DevelopersGuide\FirstSteps', and I received the following error message:

Code: Select all

'..' is not recognized as an internal or external command,
operable program or batch file.
mkdir ..\\..\\..\\WINexample.out\\class\\FirstStepsExamples
The directory or file cannot be created.
make: [../../../WINexample.out/class/FirstStepsExamples/FirstUnoContact.mf] Error 1 (ignored)
The system cannot find the path specified.
make: *** [../../../WINexample.out/class/FirstStepsExamples/FirstUnoContact.mf] Error 1
I would appreciate if someone could help me solve these errors. Hopefully it's just something I'm doing wrong.

Thanks in advance!

Edit: I tried running the Make command with administrator privileges, and I got it to create a directory. However, it still produces the following errors. I still need some help to get the makefile to complete.

Code: Select all

'..' is not recognized as an internal or external command,
operable program or batch file.
mkdir ..\\..\\..\\WINexample.out\\class\\FirstStepsExamples
mkdir ..\\..\\..\\WINexample.out\\class\\FirstStepsExamples
A subdirectory or file ..\\..\\..\\WINexample.out\\class\\FirstStepsExamples already exists.
make: [../../../WINexample.out/class/FirstStepsExamples/FirstUnoContact.class] Error 1 (ignored)
"/bin/javac"  -classpath ";../../../WINexample.out/class/FirstStepsExamples" -d ../../../WINexample.out/class/FirstStepsExamples FirstUnoContact.java
The system cannot find the path specified.
make: *** [../../../WINexample.out/class/FirstStepsExamples/FirstUnoContact.class] Error 1

Re: Error Building Java FirstSteps Examples

Posted: Wed Nov 06, 2019 7:31 pm
by Zizi64
Have you installed a 32 bit Java environment? The AOO is a 32 bit software, it need a 32 bit java.

Re: Error Building Java FirstSteps Examples

Posted: Wed Nov 06, 2019 9:43 pm
by CilindroAmarillo
Yes, I have OpenOffice running with the 32-bit JRE 8. I’m having a little trouble understanding how your question relates to the problem, as this build script lies outside of OpenOffice. Could you provide a little bit more context, please?

Re: Error Building Java FirstSteps Examples

Posted: Wed Nov 06, 2019 9:52 pm
by Zizi64
Sorry I never used the Java with the AOO/LO.

I am using the built-in StarBasic, and the API functions and procedures to control the Office suite.

Re: Error Building Java FirstSteps Examples

Posted: Wed Nov 06, 2019 10:00 pm
by RoryOF
Zizi64 was checking that you had the correct Java installed. If your Java was incorrect, that was not a good place to start any diagnosis.

Look at the error messages
mkdir ..\\..\\..\\WINexample.out\\class\\FirstStepsExamples
The directory or file cannot be created.
write a simple Java program to prove that you can create a file, and then the file.
make: [../../../WINexample.out/class/FirstStepsExamples/FirstUnoContact.mf] Error 1 (ignored)
The system cannot find the path specified.
again, write a simple program to access a file; then look to see why the specified path/file cannot be accessed - does it exist?

Remember, that error messages are there to aid the User. One has to interpret them.

Re: Error Building Java FirstSteps Examples

Posted: Wed Nov 06, 2019 10:20 pm
by CilindroAmarillo
You were just making me think: the Makefile is located in Program Files (x86). I’m not exactly sure, but I seem to recall that you need administrator permissions to modify that directory. I’ll try running Make inside a console with administrator privileges as soon as I can. I’ll mark the thread as solved if it works.

Edit: I tried running Make as an administrator on a different machine, with the same environment. The script created the directory 'WINExample.out\class\FirstStepsExamples' inside my SDK directory. It contains one file, named FirstUnoContact.mf. There were still some error messages, though I wasn't able to save them. I saw the " '..' is not recognized as an external or internal command" error again, and rather than complaining about not being able to create the output directory, it complains about it already existing.

I'm not quite sure what the final output has supposed to be, though I expect that it should be some jar files. Is there anything I can do to get the makefile to run to completion?

Edit 2: Here is the error message, if it helps. I'll edit my original post as well.

Code: Select all

'..' is not recognized as an internal or external command,
operable program or batch file.
mkdir ..\\..\\..\\WINexample.out\\class\\FirstStepsExamples
mkdir ..\\..\\..\\WINexample.out\\class\\FirstStepsExamples
A subdirectory or file ..\\..\\..\\WINexample.out\\class\\FirstStepsExamples already exists.
make: [../../../WINexample.out/class/FirstStepsExamples/FirstUnoContact.class] Error 1 (ignored)
"/bin/javac"  -classpath ";../../../WINexample.out/class/FirstStepsExamples" -d ../../../WINexample.out/class/FirstStepsExamples FirstUnoContact.java
The system cannot find the path specified.
make: *** [../../../WINexample.out/class/FirstStepsExamples/FirstUnoContact.class] Error 1