Open JDK1.7 - Ubuntu 12.04

Hi.

I’m not able to compile my code using Aspose cells 7.4.0 and open jdk 1.7.

My code Test.java is:

import java.net.URI;
import java.io.File;
import com.aspose.cells.*;
import java.awt.Font;
import java.util.ArrayList;
import java.util.Iterator;

public class Test {
public static void Test(String[] args) {
System.out.println(“Test”);
License license = new License();
}
}

When I try to compile, I get the following:
$ javac Test.java -classpath *.jar
javac: invalid flag: bcprov-jdk16-146.jar

Any ideas?

Kind regards,
JP.

Hi,

I was able to compile including aspose-cells-7.4.1.jar only. Including other files gives me “invalid flag”.

Then, I had a problem with fonts. I solved the problem by including the following into the source code:

ArrayList fontDirList = new ArrayList();
// Fill ArrayList (index, String)
fontDirList.add(0, “/usr/share/fonts/truetype/msttcorefonts”);
fontDirList.add(1, “/usr/share/fonts/truetype”);
fontDirList.add(2, “/usr/share/fonts”);
fontDirList.add(3, “c:\windows\fonts”);
CellsHelper.setFontDirs(fontDirList);

Is there any smarter way of coding the font fix?

Kind regards,
JP

Hi,

Thanks for your posting and using Aspose.Cells for Java.

You must set the font directory. If you have a single directory for your fonts, then set it only once. If you have multiple directories, then set it just like you have already set.

Let us know if you face any problem.