Error Building Java FirstSteps Examples

Creating a macro - Writing a Script - Using the API

Error Building Java FirstSteps Examples

Postby CilindroAmarillo » Wed Nov 06, 2019 7:09 pm

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   Expand viewCollapse view
'..' 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   Expand viewCollapse view
'..' 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
Last edited by CilindroAmarillo on Thu Nov 07, 2019 2:37 am, edited 1 time in total.
OpenOffice 4.1.7 | Windows 10
CilindroAmarillo
 
Posts: 3
Joined: Wed Nov 06, 2019 6:55 pm

Re: Error Building Java FirstSteps Examples

Postby Zizi64 » Wed Nov 06, 2019 7:31 pm

Have you installed a 32 bit Java environment? The AOO is a 32 bit software, it need a 32 bit java.
Tibor Kovacs, Hungary; LO6.1.6 on Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.3.3; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8516
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Error Building Java FirstSteps Examples

Postby CilindroAmarillo » Wed Nov 06, 2019 9:43 pm

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?
OpenOffice 4.1.7 | Windows 10
CilindroAmarillo
 
Posts: 3
Joined: Wed Nov 06, 2019 6:55 pm

Re: Error Building Java FirstSteps Examples

Postby Zizi64 » Wed Nov 06, 2019 9:52 pm

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.
Tibor Kovacs, Hungary; LO6.1.6 on Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.3.3; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8516
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Error Building Java FirstSteps Examples

Postby RoryOF » Wed Nov 06, 2019 10:00 pm

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.
Last edited by MrProgrammer on Wed Nov 06, 2019 10:11 pm, edited 1 time in total.
Reason: Changed [quote=] to [quote] so quotes would be shown as expected
Apache OpenOffice 4.1.7 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29861
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Error Building Java FirstSteps Examples

Postby CilindroAmarillo » Wed Nov 06, 2019 10:20 pm

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   Expand viewCollapse view
'..' 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
OpenOffice 4.1.7 | Windows 10
CilindroAmarillo
 
Posts: 3
Joined: Wed Nov 06, 2019 6:55 pm


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 3 guests