We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

First Application

Hello!


I am trying to compile the program but im getting this errors displaying in the console:

Reemplazo.java:14: error: package com.aspose.words does not exist
import com.aspose.words.Cell;
^
Reemplazo.java:15: error: package com.aspose.words does not exist
import com.aspose.words.CellVerticalAlignment;
^
Reemplazo.java:16: error: package com.aspose.words does not exist
import com.aspose.words.Document;
^
Reemplazo.java:17: error: package com.aspose.words does not exist
import com.aspose.words.DocumentBuilder;
^
Reemplazo.java:18: error: package com.aspose.words does not exist
import com.aspose.words.HeightRule;
^
Reemplazo.java:19: error: package com.aspose.words does not exist
import com.aspose.words.NodeType;
^
Reemplazo.java:20: error: package com.aspose.words does not exist
import com.aspose.words.ParagraphAlignment;
^
Reemplazo.java:21: error: package com.aspose.words does not exist
import com.aspose.words.TextOrientation;
^
Reemplazo.java:24: error: package com.aspose.words does not exist
import com.aspose.words.Table;
^
Reemplazo.java:32: error: package com.aspose.words does not exist
com.aspose.words.License license = new com.aspose.words.License(
);
^
Reemplazo.java:32: error: package com.aspose.words does not exist
com.aspose.words.License license = new com.aspose.words.License(
);
^
Reemplazo.java:44: error: cannot find symbol
Document doc= new Document(prop.getProperty(“plantilla_de_entrad
a”));
^
symbol: class Document
location: class Reemplazo
Reemplazo.java:44: error: cannot find symbol
Document doc= new Document(prop.getProperty(“plantilla_de_entrad
a”));
^
symbol: class Document
location: class Reemplazo
Reemplazo.java:45: error: cannot find symbol
DocumentBuilder builder = new DocumentBuilder(doc);
^
symbol: class DocumentBuilder
location: class Reemplazo
Reemplazo.java:45: error: cannot find symbol
DocumentBuilder builder = new DocumentBuilder(doc);
^
symbol: class DocumentBuilder
location: class Reemplazo
Reemplazo.java:75: error: cannot find symbol
doc = new Document(prop.getProperty(“plantilla_de_entrada”));
^
symbol: class Document
location: class Reemplazo
Reemplazo.java:113: error: cannot find symbol
DocumentBuilder built = new DocumentBuilder(doc)
;
^
symbol: class DocumentBuilder
location: class Reemplazo
Reemplazo.java:113: error: cannot find symbol
DocumentBuilder built = new DocumentBuilder(doc)
;
^
symbol: class DocumentBuilder
location: class Reemplazo
Reemplazo.java:119: error: cannot find symbol
built.getRowFormat().setHeightRule(HeightRule.le
ngth);
^
symbol: variable HeightRule
location: class Reemplazo
Reemplazo.java:122: error: cannot find symbol
built.getParagraphFormat().setAlignment(Paragrap
hAlignment.CENTER);
^
symbol: variable ParagraphAlignment
location: class Reemplazo
Reemplazo.java:144: error: cannot find symbol
builder.getRowFormat().setHeight(HeightRule.AUTO);
^
symbol: variable HeightRule
location: class Reemplazo
.\ReplaceEvaluator.java:5: error: package com.aspose.words does not exist
import com.aspose.words.Document;
^
.\ReplaceEvaluator.java:6: error: package com.aspose.words does not exist
import com.aspose.words.DocumentBuilder;
^
.\ReplaceEvaluator.java:7: error: package com.aspose.words does not exist
import com.aspose.words.IReplacingCallback;
^
.\ReplaceEvaluator.java:8: error: package com.aspose.words does not exist
import com.aspose.words.Node;
^
.\ReplaceEvaluator.java:9: error: package com.aspose.words does not exist
import com.aspose.words.NodeType;
^
.\ReplaceEvaluator.java:10: error: package com.aspose.words does not exist
import com.aspose.words.ReplaceAction;
^
.\ReplaceEvaluator.java:11: error: package com.aspose.words does not exist
import com.aspose.words.ReplacingArgs;
^
.\ReplaceEvaluator.java:12: error: package com.aspose.words does not exist
import com.aspose.words.Run;
^
.\ReplaceEvaluator.java:15: error: cannot find symbol
public class ReplaceEvaluator implements IReplacingCallback {
^
symbol: class IReplacingCallback
.\ReplaceEvaluator.java:32: error: cannot find symbol
public int replacing(ReplacingArgs e) throws Exception {
^
symbol: class ReplacingArgs
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:92: error: cannot find symbol
private Run splitRun(Run run, int position) throws Exception
^
symbol: class Run
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:92: error: cannot find symbol
private Run splitRun(Run run, int position) throws Exception
^
symbol: class Run
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:36: error: cannot find symbol
Node currentNode = e.getMatchNode();
^
symbol: class Node
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:41: error: cannot find symbol
currentNode = splitRun((Run)currentNode, e.getMatchOffset());
^
symbol: class Run
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:62: error: cannot find symbol
while ((currentNode != null) && (currentNode.getNodeType() != NodeTy
pe.RUN));
^
symbol: variable NodeType
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:68: error: cannot find symbol
splitRun((Run)currentNode, remainingLength);
^
symbol: class Run
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:72: error: cannot find symbol
DocumentBuilder builder = new DocumentBuilder((Document)
e.getMatchNode().getDocument());
^
symbol: class DocumentBuilder
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:72: error: cannot find symbol
DocumentBuilder builder = new DocumentBuilder((Document)
e.getMatchNode().getDocument());
^
symbol: class DocumentBuilder
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:72: error: cannot find symbol
DocumentBuilder builder = new DocumentBuilder((Document)
e.getMatchNode().getDocument());
^
symbol: class Document
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:73: error: cannot find symbol
builder.moveTo((Run) runs.get(runs.size() - 1));
^
symbol: class Run
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:81: error: cannot find symbol
for (Run run : (Iterable) runs) {
^
symbol: class Run
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:81: error: cannot find symbol
for (Run run : (Iterable) runs) {
^
symbol: class Run
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:86: error: cannot find symbol
return ReplaceAction.SKIP;
^
symbol: variable ReplaceAction
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:94: error: cannot find symbol
Run afterRun = (Run)run.deepClone(true);
^
symbol: class Run
location: class ReplaceEvaluator
.\ReplaceEvaluator.java:94: error: cannot find symbol
Run afterRun = (Run)run.deepClone(true);
^
symbol: class Run
location: class ReplaceEvaluator
46 errors


Would you please help me?

Regards
Hi there,

Thanks for your inquiry. You need to include the Aspose.Words Jar file into your project. Please refer to the following article:

Install Aspose.Words for Java

Hello, again!


I made an investigation and I think that the problem its caused by the pom , I need to insert the direction of aspose.words into the pom, I really going to thank you to send me the configuration of the pom
Hi there,

Thanks for your inquiry.

Please check Prom.xml from the attached zip file and let us know if you have any more queries.

Hello!!

Thanks for the POM, but it doesn´t work, I´m still having the same message errors, I installed the aspose jar as the instructions that you sent me, I included the repository and dependencies in the pom.

Thanks for your support.

Regards.
Hi there,

Thanks for your inquiry.

I attached a sample "IntelliJ Idea" project in my previous post. Please download "AsposeWordsMavenTest.zip" and see how it goes on your end. I hope, this helps.