× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



hi Darren,

1) Your Java method is declared as static. Therefore, you'll also need to put 'static' on the RPG prototype.

2) You have the 'row' parameter commented-out in your RPG prototype.

3) Your method is named 'main', which normally has a special purpose in Java. I don't know if it's possible to use a method named 'main', this way... did the Java code compile without errors?

4) is the directory containing the .class file in your CLASSPATH?



On 3/22/2010 9:07 AM, darren@xxxxxxxxx wrote:


I'm still on a quest to improve our Excel document creation performance.
I've created the following java program to perform what Scott Klement's RPG
service program did, to create a text cell, but doing the 4 steps in Java
to hopefully get improved performance. I'm having problems either
specifying the java header stuff correctly, or in specifying the RPG
prototype, because I get a java.lang.NoClassDefFoundError: HSSFtext error
when calling a program using the prototype. Can anyone see where I'm going
wrong?

Java program:
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFRichTextString;

public final class HSSFtext {
public static void main(HSSFRow Row, int Col, String value,
HSSFCellStyle style ) {

HSSFCell Cell = Row.createCell(Col);
Cell.setCellType(1);
//wwStr = new_String(peString);
Cell.setCellValue(new HSSFRichTextString(value));
Cell.setCellStyle(style);

}
}



RPG prototype:
D hssf_textz...
D PR EXTPROC(*JAVA
D :'HSSFtext'
D :'main')
D* peRow like(HSSFRow)
D peCol like(jshort) value
D peString like(jstring)
D peStyle like(HSSFCellStyle)



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.