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



Ramprasad,

Joe and Kelly are right in what they say.  I'd just like to add a few
notes.

Much of the work you want to do may be accomplished with iSeries
Navigator, if you have that.  I'll discuss getting a basic program set
up with this tool to help you.

>From the iSeries Navigator, expand your system from My Connections
(click the [+]), then choose File Systems, then Integrated File System,
then Root.  Right click on Root and choose New Folder, and name it
"java".  Click on the new java folder to open it, there will be no
information in the right hand pane.

On your desktop, create a new file in explorer or on your desktop,
called "helloworld.java".  Add this content to that file.  You cannot
create a new item in the IFS via the iSeries Navigator, or I cannot, at
least.

class HelloWorld {                             
   public static void main (String args[]) {   
      System.out.println("Hello World");       
   }                                           
}                                              

Save your file, and right click on your new file icon, and choose Copy.

Back in iSeries Navigator, right click in the empty right hand side, and
choose paste.  You should get a file transfer bar briefly, then
"helloworld.java" should appear in the directory listing for java.
Right click this file and choose Compile Java File..., then fill out the
dialog box that appears.  Note that you may adjust the CLASSPATH here.
Click OK.

You should now have a .class file, so right click that, and choose
Associated Java Program -> then Run, this brings up a new dialog where
you may enter runtime parameters.  Click OK.  You should see output
similar to this:
RUNJVA CLASS('HelloWorld') PARM(*NONE) CLASSPATH('/java/')
CHKPATH(*WARN) OPTIMIZE(10) INTERPRET(*OPTIMIZE) PROP((java.version
'1.4') ) GCHINL(2000) GCHMAX(*NOMAX) OPTION(*NONE) JOB(QJVACMDSRV)

Hello World
Java program completed.

Now that you have your source file and class file, you may log onto the
iSeries via 5250 terminal, enter STRQSH, then type "cd /java".  From
here, all of your basic java commands will work (javac helloworld.java,
java helloworld, javadoc, etc.)  I have not found any editors within
QSHELL, so you cannot use "vi" to create or modify source.  If someone
else on this list knows different, please illuminate both Ramprasad and
myself.

Good luck!

-Todd Dominik 
Bass Pro Shops

date: Tue, 21 Feb 2006 18:53:09 +0530
from: "Ramprasad" <ramprasad.varadarajan@xxxxxxxxx>
subject: Newbie query for JAVA on AS400

Hi,

Where should I store the source .java file on the system and how to
compile
it to get the .CLASS file...?

I would also like to know, the location of the existing class files on
the
AS400. 

I would like to know how to retrive the classpath on the existing AS400
setup.

Thanks in Advance.

Thanks & Regards,

Ramprasad V




The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.
 
www.wipro.com

------------------------------

message: 7
date: Tue, 21 Feb 2006 08:36:07 -0600
from: "Joe Pluta" <joepluta@xxxxxxxxxxxxxxxxx>
subject: RE: Newbie query for JAVA on AS400

Howdy!

Getting started with Java on the iSeries is always interesting.  There
are
two things I would stress at the very beginning.

First, you don't have to compile on the iSeries!  Class files are
platform
independent, so you can compile a class on your workstation and simply
copy
it to the iSeries.

Second, the IFS on the iSeries is very much like the standard
hierarchical
file system of a PC or a Unix workstation.  You have directories and
subdirectories just like any other file system.  There are many ways to
access the IFS; the one most often used is QShell.  From an iSeries
command
line, simply type the command STRQSH and you will be presented with a
command line that is very similar to a DOS/Unix command line.  It has
most
of the standard Unix commands, and you can use this shell to compile and
run
Java code just like you would in any other environment.

Joe


> From: Ramprasad
> 
> Hi,
> 
> Where should I store the source .java file on the system and how to
> compile
> it to get the .CLASS file...?
> 
> I would also like to know, the location of the existing class files on
the
> AS400.
> 
> I would like to know how to retrive the classpath on the existing
AS400
> setup.




------------------------------

message: 8
date: Tue, 21 Feb 2006 08:53:03 -0600
from: "Kelly Cookson" <KCookson@xxxxxxxxxxxx>
subject: RE: Newbie query for JAVA on AS400

Most of the time we run IBM Toolbox for Java classes to access iSeries
resources from a PeopleSoft application server. All our Java classes are
being executed by the PeopleSoft application server. We typically store
our .java source files on a shared network drive. We check out the .java
source files to develop on local workstations using the Eclipse
development environment. 

If you plan to run Java on the iSeries, you may want to store .java
source files in the IFS so you can run iSeries optimizations when you
compile them into classes. I believe IBM has already optimized parts of
the Toolbox for Java for use on the iSeries, though I am not familiar
with running Toolbox for Java classes on the iSeries.

Good Luck!
Kelly


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx]On Behalf Of Ramprasad
Sent: Tuesday, February 21, 2006 7:23 AM
To: java400-l@xxxxxxxxxxxx
Subject: Newbie query for JAVA on AS400



Hi,

Where should I store the source .java file on the system and how to
compile
it to get the .CLASS file...?

I would also like to know, the location of the existing class files on
the
AS400. 

I would like to know how to retrive the classpath on the existing AS400
setup.

Thanks in Advance.

Thanks & Regards,

Ramprasad V




The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.
 
www.wipro.com

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