I’m trying to get Aspose.Words working with the PHP/Java bridge, and having no success. So far I’ve managed to get Tomcat installed on my Ubuntu box, along with the PHP/Java bridge. All of that is tested and working. I’ve also installed Maven, since it seems to be mentioned vaguely here and there in the documentation.
Unfortunately the documentation beyond that seems a bit lacking. There’s a page at https://docs.aspose.com/display/wordsjava/PHP+and+Aspose.Words+for+Java that includes an example that fails, because java_require is apparently no longer supported. It suggests using ‘tomcat or jee hot deployment’. So I assume that this guide must be out of date.
The other document I’ve been referring to is at https://docs.aspose.com/display/wordsjava/Installation and is entitled ‘Installing Aspose.Words for Java from Maven Repository’. The information here is very basic, and it starts off with ‘First, you need to specify Aspose Maven Repository configuration/location in your Maven pom.xml’… Now that’s all very well, but I don’t have a Maven project, or really any wish to learn all about Maven for this one piece of work. All I want to do is use Aspose.Words from my existing PHP project.
Can anyone point me towards what I need to do next? I have some code that looks like this:
$documentObject = new Java(“com.aspose.words.Document”);
The above just leads to the following error: “java.lang.Exception: CreateInstance failed: new com.aspose.words.Document. Cause: java.lang.ClassNotFoundException: com.aspose.words.Document”
I’m sure I’m about 90% of the way to getting this working. Just not sure what I need to do next. Unfortunately I know next to nothing about Java.