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



Mr. Perkins:

This trick does not work for directories, only for specific jar files. Also the endorsed directories as well as the ext directories override this class loading. The most wonderful thing about Java is how it changes with every release and with every patch. The regression errors in the J9 JVMs are painful as well as plentiful.

I am not philosophically opposed to open source, but it seems that every application likes to load its own incompatible version of the same open source jar files and assumes that no one else has. Also the people at Apache need to learn a thing or two about API stability and backwards compatibility to boot. Here's looking at you AXIS/XALAN/WSSD4J.

Nick Sonin

-----Original Message-----
From: James Perkins [mailto:jrperkinsjr@xxxxxxxxx]
Sent: Friday, September 28, 2012 11:28 AM
To: Java Programming on and around the IBM i
Subject: Re: J9 JVM not compliant?

It's pretty easy to do really. If you know what you need to set the CP as,
then adding it a MANIFEST.MF file and putting in the JAR is pretty simple
stuff. Check if the JAR already has a manifest, if so extract it and edit
it, if not create one. Add it to the JAR. You can open a JAR with any ZIP
tool if you don't want to use commands.

Closed source has the same issues. When you develop to a specific API you
need that version. That goes for any kind of software, doesn't matter the
language or whether it's open source or no.
--
James R. Perkins
(Who works for an open source company :-))


On Fri, Sep 28, 2012 at 8:18 AM, Sonin,Nikolai <nsonin@xxxxxxxxxxx> wrote:

Too bad most 3rd party Java tools do not seem to do this and assume that
they are the only thing in your application universe. We have three
vendors needing to run three different versions of Java with three
different versions of the same jar files. Open Source is so wonderful I
want to puke.

Nick Sonin

-----Original Message-----
From: James Perkins [mailto:jrperkinsjr@xxxxxxxxx]
Sent: Friday, September 28, 2012 11:10 AM
To: Java Programming on and around the IBM i
Subject: Re: J9 JVM not compliant?

I tend to prefer listing my dependencies in my MANIFEST.MF anyway. Just add
the Class-Path attribute which with most build tools is pretty easy to have
automatically happen. The ideal part of that is you don't have to set your
CP differently for different environments.

--
James R. Perkins


On Fri, Sep 28, 2012 at 5:57 AM, Sonin,Nikolai <nsonin@xxxxxxxxxxx> wrote:

Gavin:

Thanks for confirming what support told me and this is indeed a new
application. Sometimes it doesn't hurt to call IBM ;-) The problems
with
IBM's implementation of Java and Environment Variables on the iSeries are
just bizarre. For instance, your example below does not work in V5R4M5
with any of the JVMs, but this works:
addenvvar QIBM_RPG_JAVA_PROPERTIES
value('-Djava.endorsed.dirs=/Java')

However, I was able to put: java.endorsed.dirs=/java:/java/lib in the
systemDefault.properties file in my home directory and it works. Put in
a
semicolon and it does not. There are some very different behaviors for
environment variables and Java properties on the iSeries than any other
platform I have worked on. What do I have to look forward to? I
appreciate all the advice you can give a new iSeries Java programmer.

Nick Sonin



-----Original Message-----
From: Gan Zhang [mailto:zhanggan@xxxxxxxxxx]
Sent: Thursday, September 27, 2012 11:31 PM
To: Java Programming on and around the IBM i
Cc: java400-l-bounces@xxxxxxxxxxxx
Subject: Re: J9 JVM not compliant?

This is really a limitation for Java on IBM i . It's not only for J9 but
also for Classic JVM on i. Is your application a new app with Java on i?
Or it worked someway before you move to J9?
For RPG calling Java, there is a workaround way to make your application
work is that you can using a java.endorsed.dirs property to include the
folders containing your JARs.

addenvvar QIBM_RPG_JAVA_PROPERTIES
value('-Djava.endorsed.dirs=/Java;/Java/lib;')

Wish it can work for you.


Best regards.


____________________________________________________________________________________________

Gavin, Zhang Gan
IBM i J9 Dev, http://www.ibm.com/developerworks/ibmi/techupdates/java
Email: zhanggan@xxxxxxxxxx
Phone: +86-10-82452719
Address: 1/F, 28, ZhongGuanCun Software Park, No.8 Dong Bei Wang West
Road, Haidian District, Beijing P.R.China 100193



"Sonin,Nikolai" <nsonin@xxxxxxxxxxx>
Sent by: java400-l-bounces@xxxxxxxxxxxx
09/28/2012 12:13 AM
Please respond to
Java Programming on and around the IBM i <java400-l@xxxxxxxxxxxx>


To
<java400-l@xxxxxxxxxxxx>,
cc

Subject
J9 JVM not compliant?






To All:



I am trying to use the 32 bit J9 JVM that is 1.6 of java on V5R4M5 from
an ILE RPG program:



The following code:



D q s 1a inz('''')

/free



Exec_Command('CHGCURDIR DIR(' + q + '/java/' + q + ')');



Exec_Command('ADDENVVAR ENVVAR(CLASSPATH) REPLACE(*YES) ' +

'VALUE(' +

q +

'.:/Java/*.jar:/Java/lib/*.jar:/Java/rpgmail.jar' +

q +

')');



Exec_Command('ADDENVVAR ENVVAR(JAVA_HOME) REPLACE(*YES) ' +

'VALUE('+ q + '/QOpenSys/QIBM/ProdData/JavaVM/jdk60/32bit'

+ q + ')');

return;



/end-free

P e



Is supposed to set the JAVA_HOME ENVVAR and the CLASSPATH ENVVAR for the
JVM before using the Java Mail API.

It does this:

CLASSPATH '.:/Java/*.jar:/Java/lib/*.jar:/Jav' >

JAVA_HOME '/QOpenSys/QIBM/ProdData/JavaVM/jdk' >



But this is what I get in the Job Log:



Message ID . . . . . . : RNX0301 Severity . . . . . . . : 50


Message type . . . . . : Escape


Date sent . . . . . . : 09/27/12 Time sent . . . . . . :
12:06:09




Message . . . . : Java exception received when calling Java method.


Cause . . . . . : RPG procedure RPGMAIL_NE in program
SONINIKO/RPGMAILSV

received Java exception "java.lang.NoClassDefFoundError:
javax.mail.Address"

when calling method "<init>" with signature "()V" in class


"com.mowyourlawn.rpgmail.RPGMail".




According to Oracle in Java 6 specifying the directory or *.jar in the
classpath is supposed search all of the jar files in the directory.
Obviously I am doing something wrong or IBM did not get the message.

What am I doing wrong?

Thanks in advance for your time and effort.



Nick Sonin





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


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

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


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

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



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.