× 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.



Have you tried inverting the classpath order, i.e:
-cp SecureBlackbox.Base.jar:SecureBlackbox.PGP.jar

On Sat, Oct 8, 2016 at 9:32 PM, Jack Woehr <jwoehr@xxxxxxxxxxxxxxxxxxxxxxxx>
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.


"error"
Exception in thread "main" java.lang.NoClassDefFoundError:
SecureBlackbox.Base.TElStream
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:
Javagpg$1.class
Javagpg.class
Javagpg.java
SecureBlackbox.Base.jar
SecureBlackbox.PGP.jar
compile_javagpg.sh
lib
manifest.mf

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];
SBUtils.setLicenseKey("30C...6F9");
TElPGPKeyring keyring = new TElPGPKeyring();
TElPGPReader pgpReader;
pgpReader = new TElPGPReader();
pgpReader.setOnCreateOutputStream(new
TSBPGPCreateOutputStreamEvent(outStreamCallback));
keyring.load("/PGPcerts/publickey.asc",
"/PGPcerts/privatekey.asc", true);
pgpReader.setDecryptingKeys(keyring);
pgpReader.setVerifyingKeys(keyring);
TSBString a = new TSBString();
a.value = "14144t!";
pgpReader.setKeyPassphrase(a);
a.value = outfile + ".TXT";
pgpReader.setOutputFile(a);

TElFileStream inF = new TElFileStream(outfile, "rw", true);
pgpReader.decryptAndVerify(inF, 0);
inF.Free();
System.exit(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
list
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.




--
Absolute Performance, Inc.
12303 Airport Way, Suite 100
Broomfield, CO 80021

NON-DISCLOSURE NOTICE: This communication including any and all
attachments is for the intended recipient(s) only and may contain
confidential and privileged information. If you are not the intended
recipient of this communication, any disclosure, copying further
distribution or use of this communication is prohibited. If you received
this communication in error, please contact the sender and delete/destroy
all copies of this communication immediately.





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.