i just ported the .java file over and recompiled. I didnt set the classpath since i thought the -cp command line syntax took care of that. Or am i wrong?

java Javagpg -cp SecureBlackbox.PGP.jar:SecureBlackbox.Base.jar

On 10/8/16 11:32 PM, Jack Woehr wrote:
Did you port the whole NetBeans project over and you are running the
NetBeans-generated ant buildfile on the i? Is it all packaged by that
buildfile into a jar and a lib directory? Is the jar above the lib
directory? Or are you doing this by hand on the i, which means you'll have
to set CLASSPATH before attempting to run.

On Sat, Oct 8, 2016 at 6:40 PM, tim <iseriesstuff@xxxxxxxxx> wrote:

im using an api from secure black box for GPG work. i wrote a program to
decrypt a file. its works fine in my pc netbean environment. when i port it
over to my iseries, compile and try to run it im getting a class not found
error. the class its looking for is in one of the 2 jar files that are in
the same folder on the iseries. "SecureBlackbox.Base.TElStream" is
located in the SecureBlackbox.Base.jar.

Exception in thread "main" java.lang.NoClassDefFoundError:
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:90)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:167)
Caused by: java.lang.ClassNotFoundException: SecureBlackbox.Base.TElStream
at java.net.URLClassLoader.findClass(URLClassLoader.java:599)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:711)
at java.lang.ClassLoader.loadClass(ClassLoader.java:679)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:325)
at java.lang.ClassLoader.loadClass(ClassLoader.java:658)
... 3 more

"command line" used to run:
java Javagpg -cp SecureBlackbox.PGP.jar:SecureBlackbox.Base.jar

"ls" of the folder:

Java Code:
import SecureBlackbox.Base.SBUtils;
import SecureBlackbox.PGP.TElPGPCreateStreamEventParams;
import SecureBlackbox.PGP.TElPGPKeyring;
import SecureBlackbox.PGP.TElPGPReader;
import SecureBlackbox.PGP.TSBPGPCreateOutputStreamEvent;
import java.util.Date;
import org.freepascal.rtl.TObject;
import SecureBlackbox.Base.TElFileStream;
import SecureBlackbox.Base.TSBString;

public class Javagpg {
static String outfile;

public static void main(String[] args) {
outfile = args[0];
TElPGPKeyring keyring = new TElPGPKeyring();
TElPGPReader pgpReader;
pgpReader = new TElPGPReader();
"/PGPcerts/privatekey.asc", true);
TSBString a = new TSBString();
a.value = "14144t!";
a.value = outfile + ".TXT";

TElFileStream inF = new TElFileStream(outfile, "rw", true);
pgpReader.decryptAndVerify(inF, 0);

static TSBPGPCreateOutputStreamEvent.Callback outStreamCallback = new
TSBPGPCreateOutputStreamEvent.Callback() {
public void tsbpgpCreateOutputStreamEventCallback(TObject sender,
String fileName,
Date timeStamp,
TElPGPCreateStreamEventParams streamParams) {
String target = outfile + ".txt";
streamParams.Stream = new TElFileStream(target, "rw", true);
streamParams.FreeOnFinish = true;

This is the Java Programming on and around the IBM i (JAVA400-L) mailing
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2022 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.