Importing Classes

classic Classic list List threaded Threaded
35 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Importing Classes

Quique Britto
Hi all.

I have extracted the poi-bin-3.6-20091214.zip to my c: and the C:\poi-3.6\poi-3.6-20091214.jar is shown in my classpath. This set of classes allows the reading and writing of XLS files from within java.

My program shows import org.apache.poi.ss.usermodel. and program compiles ok but shows the following warning.:

<<<<  no classes found for import from package  org.apache.poi.ss.usermodel  >>>>

but this class (and more) can be seen inside the jar file. 


Am I missing something?

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Importing Classes

alansam
The dot on the end of your import statement instructs netrexx to only import classes from the org.apache.poi.ss.usermodel and nothing from it's subdirectories.  Try removing the dot.

Alan.

On 23 March 2010 08:42, Quique Britto <[hidden email]> wrote:
Hi all.

I have extracted the poi-bin-3.6-20091214.zip to my c: and the C:\poi-3.6\poi-3.6-20091214.jar is shown in my classpath. This set of classes allows the reading and writing of XLS files from within java.

My program shows import org.apache.poi.ss.usermodel. and program compiles ok but shows the following warning.:

<<<<  no classes found for import from package  org.apache.poi.ss.usermodel  >>>>

but this class (and more) can be seen inside the jar file. 


Am I missing something?

_______________________________________________
Ibm-netrexx mailing list
[hidden email]





--
Needs more cow-bell!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Alan

--
Needs more cowbell.
Reply | Threaded
Open this post in threaded view
|

Re: Importing Classes

Quique Britto
if I remove the dot compilation fails. Compilation is ok using package instead of import.
what is the difference, package imports all classes from the jar file?


On 23 March 2010 16:49, Alan Sampson <[hidden email]> wrote:
The dot on the end of your import statement instructs netrexx to only import classes from the org.apache.poi.ss.usermodel and nothing from it's subdirectories.  Try removing the dot.

Alan.

On 23 March 2010 08:42, Quique Britto <[hidden email]> wrote:
Hi all.

I have extracted the poi-bin-3.6-20091214.zip to my c: and the C:\poi-3.6\poi-3.6-20091214.jar is shown in my classpath. This set of classes allows the reading and writing of XLS files from within java.

My program shows import org.apache.poi.ss.usermodel. and program compiles ok but shows the following warning.:

<<<<  no classes found for import from package  org.apache.poi.ss.usermodel  >>>>

but this class (and more) can be seen inside the jar file. 


Am I missing something?

_______________________________________________
Ibm-netrexx mailing list
[hidden email]





--
Needs more cow-bell!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]




_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Importing Classes

David Requena
Quique,

import and package are somewhat related but very distinct instructions which serve totally different purposes.

package declares your class as belonging to a given package. This allows privileged
    access to other classes in the same package and other things.

import instructs the compiler to learn about imported classes so you can refer to them
   by their shortname instead of the fully qualified one (for instance, CellStyle as oposed
   to org.apache.poi.ss.usermodel.CellStyle). Nothing else.

That said, you probably don't want your class to be in that package but want to import
classes in it so you can save some typing. Note that using the long name one will always
work as long as the classes are in the classpath.

---
Saludos / Kind regards.
David Requena

El 23/03/2010 17:07, Quique Britto escribió:
if I remove the dot compilation fails. Compilation is ok using package instead of import.
what is the difference, package imports all classes from the jar file?


On 23 March 2010 16:49, Alan Sampson <[hidden email]> wrote:
The dot on the end of your import statement instructs netrexx to only import classes from the org.apache.poi.ss.usermodel and nothing from it's subdirectories.  Try removing the dot.

Alan.

On 23 March 2010 08:42, Quique Britto <[hidden email]> wrote:
Hi all.

I have extracted the poi-bin-3.6-20091214.zip to my c: and the C:\poi-3.6\poi-3.6-20091214.jar is shown in my classpath. This set of classes allows the reading and writing of XLS files from within java.

My program shows import org.apache.poi.ss.usermodel. and program compiles ok but shows the following warning.:

<<<<  no classes found for import from package  org.apache.poi.ss.usermodel  >>>>

but this class (and more) can be seen inside the jar file. 


Am I missing something?

_______________________________________________
Ibm-netrexx mailing list
[hidden email]





--
Needs more cow-bell!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________ Ibm-netrexx mailing list [hidden email]

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Importing Classes

Quique Britto
Thks David, you are right what I need is the import not the package instrucction.
does the actual class to import need to be in the classpath or just the jar file which holds the class?

are u spanish?



On 23 March 2010 21:34, David Requena <[hidden email]> wrote:
Quique,

import and package are somewhat related but very distinct instructions which serve totally different purposes.

package declares your class as belonging to a given package. This allows privileged
    access to other classes in the same package and other things.

import instructs the compiler to learn about imported classes so you can refer to them
   by their shortname instead of the fully qualified one (for instance, CellStyle as oposed
   to org.apache.poi.ss.usermodel.CellStyle). Nothing else.

That said, you probably don't want your class to be in that package but want to import
classes in it so you can save some typing. Note that using the long name one will always
work as long as the classes are in the classpath.

---
Saludos / Kind regards.
David Requena

El 23/03/2010 17:07, Quique Britto escribió:
if I remove the dot compilation fails. Compilation is ok using package instead of import.
what is the difference, package imports all classes from the jar file?


On 23 March 2010 16:49, Alan Sampson <[hidden email]> wrote:
The dot on the end of your import statement instructs netrexx to only import classes from the org.apache.poi.ss.usermodel and nothing from it's subdirectories.  Try removing the dot.

Alan.

On 23 March 2010 08:42, Quique Britto <[hidden email]> wrote:
Hi all.

I have extracted the poi-bin-3.6-20091214.zip to my c: and the C:\poi-3.6\poi-3.6-20091214.jar is shown in my classpath. This set of classes allows the reading and writing of XLS files from within java.

My program shows import org.apache.poi.ss.usermodel. and program compiles ok but shows the following warning.:

<<<<  no classes found for import from package  org.apache.poi.ss.usermodel  >>>>

but this class (and more) can be seen inside the jar file. 


Am I missing something?

_______________________________________________
Ibm-netrexx mailing list
[hidden email]





--
Needs more cow-bell!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________ Ibm-netrexx mailing list [hidden email]

_______________________________________________
Ibm-netrexx mailing list
[hidden email]




_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Importing Classes

Thomas.Schneider.Wien
Hi  Quique,

    David is *for sure*  **Espaniol**

In NetRexx, you will have to use...

import abc.def.

(not abc.def*, as in Java)

Thomas

Saludos....
=========================================================
quicko
Quique Britto schrieb:

> Thks David, you are right what I need is the import not the package
> instrucction.
> does the actual class to import need to be in the classpath or just
> the jar file which holds the class?
>
> are u spanish?
>
>
>
> On 23 March 2010 21:34, David Requena <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Quique,
>
>     import and package are somewhat related but very distinct
>     instructions which serve totally different purposes.
>
>     package declares your class as belonging to a given package. This
>     allows privileged
>         access to other classes in the same package and other things.
>
>     import instructs the compiler to learn about imported classes so
>     you can refer to them
>        by their shortname instead of the fully qualified one (for
>     instance, CellStyle as oposed
>        to org.apache.poi.ss.usermodel.CellStyle). Nothing else.
>
>     That said, you probably don't want your class to be in that
>     package but want to import
>     classes in it so you can save some typing. Note that using the
>     long name one will always
>     work as long as the classes are in the classpath.
>
>     ---
>     Saludos / Kind regards.
>     David Requena
>
>
>     El 23/03/2010 17:07, Quique Britto escribió:
>>     if I remove the dot compilation fails. Compilation is ok using
>>     package instead of import.
>>     what is the difference, package imports all classes from the jar
>>     file?
>>
>>
>>     On 23 March 2010 16:49, Alan Sampson <[hidden email]
>>     <mailto:[hidden email]>> wrote:
>>
>>         The dot on the end of your import statement instructs netrexx
>>         to only import classes from the /org.apache.poi.ss.usermodel/
>>         and nothing from it's subdirectories.  Try removing the dot.
>>
>>         Alan.
>>
>>         On 23 March 2010 08:42, Quique Britto <[hidden email]
>>         <mailto:[hidden email]>> wrote:
>>
>>             Hi all.
>>
>>             I have extracted the poi-bin-3.6-20091214.zip
>>             <http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.6-20091214.zip>
>>             to my c: and the C:\poi-3.6\poi-3.6-20091214.jar is shown
>>             in my classpath. This set of classes allows the reading
>>             and writing of XLS files from within java.
>>
>>             My program shows /import org.apache.poi.ss.usermodel.
>>             /and program compiles ok but shows the following warning.:
>>
>>             <<<<  no classes found for import from package
>>             org.apache.poi.ss.usermodel  >>>>
>>
>>             but this class (and more) can be seen inside the jar file.
>>
>>
>>             Am I missing something?
>>
>>             _______________________________________________
>>             Ibm-netrexx mailing list
>>             [hidden email]
>>             <mailto:[hidden email]>
>>
>>
>>
>>
>>
>>         --
>>         Needs more cow-bell!
>>
>>         _______________________________________________
>>         Ibm-netrexx mailing list
>>         [hidden email] <mailto:[hidden email]>
>>
>>
>>
>>
>>     _______________________________________________
>>     Ibm-netrexx mailing list
>>     [hidden email] <mailto:[hidden email]>
>>
>>      
>
>     _______________________________________________
>     Ibm-netrexx mailing list
>     [hidden email] <mailto:[hidden email]>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>  

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Tom. (ths@db-123.com)
Reply | Threaded
Open this post in threaded view
|

Re: Importing Classes

David Requena
In reply to this post by Quique Britto
El 23/03/2010 22:05, Quique Britto escribió:
> Thks David, you are right what I need is the import not the package
> instrucction.
> does the actual class to import need to be in the classpath or just
> the jar file which holds the class?
>

Well, adding the jar ought to be enough. When you add a jar or zip file
to the classpath, java treats it
just as a regular directory in you disk.

Are you actually using any poi classes in your code? It's a bit odd that
the compiler complains it can not
find any classes in the package for import but but then it actually
finds them for processing.

> are u spanish?

Yes I am
_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Importing Classes

Quique Britto
where?, I currently live in Valencia but born in London. (spanish parents)

ok going back to this problem, the flwg line (I believe) will import all classes from the usermodel

   import org.apache.poi.ss.usermodel.

but after compilation the compiler warns me no classes found. this jar file is shown (double checked name path etc...) in the classpath.

any help?



On 24 March 2010 08:16, David Requena <[hidden email]> wrote:
El 23/03/2010 22:05, Quique Britto escribió:

Thks David, you are right what I need is the import not the package instrucction.
does the actual class to import need to be in the classpath or just the jar file which holds the class?


Well, adding the jar ought to be enough. When you add a jar or zip file to the classpath, java treats it
just as a regular directory in you disk.

Are you actually using any poi classes in your code? It's a bit odd that the compiler complains it can not
find any classes in the package for import but but then it actually finds them for processing.

are u spanish?

Yes I am

_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Importing Classes

David Requena
Quique,

The import line seems to be ok, this will import all classes in that package.

The warning is telling you that the import is recognized but the classes could
not be found so the problem must be in the classpath.

Which command are you using for the compilation?

If you send me your code I'll try on my box as the whole issue is a bit strange.

I've seen this warning before when the actual directory structure of the package
existed on disk but contained no compiled classes in it (there were just the
source files at the time).

But you tell us that you get a successful compilation (warning aside), which
I can not understand why since you're presumably using classes which could
not be found.

BTW, I'm located at Tarragona. hmm.. Britto sounds more like Portuguese or
Italian to me. Never heard that surname before :-)
---
Saludos / Kind regards.
David Requena

El 24/03/2010 10:41, Quique Britto escribió:
where?, I currently live in Valencia but born in London. (spanish parents)

ok going back to this problem, the flwg line (I believe) will import all classes from the usermodel

   import org.apache.poi.ss.usermodel.

but after compilation the compiler warns me no classes found. this jar file is shown (double checked name path etc...) in the classpath.

any help?



On 24 March 2010 08:16, David Requena <[hidden email]> wrote:
El 23/03/2010 22:05, Quique Britto escribió:

Thks David, you are right what I need is the import not the package instrucction.
does the actual class to import need to be in the classpath or just the jar file which holds the class?


Well, adding the jar ought to be enough. When you add a jar or zip file to the classpath, java treats it
just as a regular directory in you disk.

Are you actually using any poi classes in your code? It's a bit odd that the compiler complains it can not
find any classes in the package for import but but then it actually finds them for processing.

are u spanish?

Yes I am

_______________________________________________
Ibm-netrexx mailing list
[hidden email]


_______________________________________________ Ibm-netrexx mailing list [hidden email]

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Importing Classes

Quique Britto
Hi again,

the compilation is successful because I have not tried to access the classes, I want to get rid of this warning.
here is a cut down version of my program which reproduces this warning.

the poi package is located at C:\POI-3.6\poi-3.6-20091214.jar and the classpath shows (using copy n paste)
.;C:\Program Files\Java\jdk1.6.0_10\lib\tools.jar;C:\poi-3.6\poi-3.6-20091214.jar;

import javax.swing.
import org.apache.poi.ss.usermodel.

class myxls
method main( args=String[] ) static
  mainwindow = JFrame( "Excel Example" )
  mainwindow.setLayout( GridLayout( 1,1 ))

  -- create label
  txtlabel   = JLabel( "excel contents will be shown here", Jlabel.CENTER )
  mainwindow.add( txtlabel )
 
  -- open excel file
 
  -- read contents & show in label

  -- set default operation for the Frame
  mainwindow.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE )

  -- set frame size and make visible
  mainwindow.setSize( 600,100 )
  mainwindow.setVisible( 1 )


thanks again o muchas gracias.

PS: el apellido Britto es portuges, parece ser el abuelo de mi abuelo etc.. era de alli.



On 24 March 2010 11:29, David Requena <[hidden email]> wrote:
Quique,

The import line seems to be ok, this will import all classes in that package.

The warning is telling you that the import is recognized but the classes could
not be found so the problem must be in the classpath.

Which command are you using for the compilation?

If you send me your code I'll try on my box as the whole issue is a bit strange.

I've seen this warning before when the actual directory structure of the package
existed on disk but contained no compiled classes in it (there were just the
source files at the time).

But you tell us that you get a successful compilation (warning aside), which
I can not understand why since you're presumably using classes which could
not be found.

BTW, I'm located at Tarragona. hmm.. Britto sounds more like Portuguese or
Italian to me. Never heard that surname before :-)

---
Saludos / Kind regards.
David Requena

El 24/03/2010 10:41, Quique Britto escribió:
where?, I currently live in Valencia but born in London. (spanish parents)

ok going back to this problem, the flwg line (I believe) will import all classes from the usermodel

   import org.apache.poi.ss.usermodel.

but after compilation the compiler warns me no classes found. this jar file is shown (double checked name path etc...) in the classpath.

any help?



On 24 March 2010 08:16, David Requena <[hidden email]> wrote:
El 23/03/2010 22:05, Quique Britto escribió:

Thks David, you are right what I need is the import not the package instrucction.
does the actual class to import need to be in the classpath or just the jar file which holds the class?


Well, adding the jar ought to be enough. When you add a jar or zip file to the classpath, java treats it
just as a regular directory in you disk.

Are you actually using any poi classes in your code? It's a bit odd that the compiler complains it can not
find any classes in the package for import but but then it actually finds them for processing.

are u spanish?

Yes I am

_______________________________________________
Ibm-netrexx mailing list
[hidden email]


_______________________________________________ Ibm-netrexx mailing list [hidden email]

_______________________________________________
Ibm-netrexx mailing list
[hidden email]




_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Importing Classes

David Requena
Quique,

Oh I see, that's why you get the warning but no compilation error.

The classpath shows? You have this on a CLASSPATH environment variable?

Tried your code and could not reproduce the behaviour. It compiled ok with:

 java -cp ".;C:\home\drequena\dev\NetRexx\lib\NetRexxC.jar;C:\Java\jdk1.6.0_16\lib\tools.jar;.\poi-3.6-20091214.jar" COM.ibm.netrexx.process.NetRexxC myxls.nrx

Note that 'Program Files' includes a space. Did you use quotes when adding it to classpath?
I would expect a ClassNotFoundException if this was the culprit but you never know.
---
Saludos / Kind regards.
David Requena

El 24/03/2010 11:59, Quique Britto escribió:
Hi again,

the compilation is successful because I have not tried to access the classes, I want to get rid of this warning.
here is a cut down version of my program which reproduces this warning.

the poi package is located at C:\POI-3.6\poi-3.6-20091214.jar and the classpath shows (using copy n paste)
.;C:\Program Files\Java\jdk1.6.0_10\lib\tools.jar;C:\poi-3.6\poi-3.6-20091214.jar;

import javax.swing.
import org.apache.poi.ss.usermodel.

class myxls
method main( args=String[] ) static
  mainwindow = JFrame( "Excel Example" )
  mainwindow.setLayout( GridLayout( 1,1 ))

  -- create label
  txtlabel   = JLabel( "excel contents will be shown here", Jlabel.CENTER )
  mainwindow.add( txtlabel )
 
  -- open excel file
 
  -- read contents & show in label

  -- set default operation for the Frame
  mainwindow.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE )

  -- set frame size and make visible
  mainwindow.setSize( 600,100 )
  mainwindow.setVisible( 1 )

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Importing Classes

measel

Quique, in your example the directory is uppercase but on the classpath it is lower ?  Java is case sensitive even though windows is not.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of David Requena
Sent: Wednesday, March 24, 2010 8:04 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Importing Classes

 

Quique,

Oh I see, that's why you get the warning but no compilation error.

The classpath shows? You have this on a CLASSPATH environment variable?

Tried your code and could not reproduce the behaviour. It compiled ok with:

 java -cp ".;C:\home\drequena\dev\NetRexx\lib\NetRexxC.jar;C:\Java\jdk1.6.0_16\lib\tools.jar;.\poi-3.6-20091214.jar" COM.ibm.netrexx.process.NetRexxC myxls.nrx

Note that 'Program Files' includes a space. Did you use quotes when adding it to classpath?
I would expect a ClassNotFoundException if this was the culprit but you never know.

---
Saludos / Kind regards.
David Requena


El 24/03/2010 11:59, Quique Britto escribió:

Hi again,

the compilation is successful because I have not tried to access the classes, I want to get rid of this warning.
here is a cut down version of my program which reproduces this warning.

the poi package is located at C:\POI-3.6\poi-3.6-20091214.jar and the classpath shows (using copy n paste)
.;C:\Program Files\Java\jdk1.6.0_10\lib\tools.jar;C:\poi-3.6\poi-3.6-20091214.jar;

import javax.swing.
import org.apache.poi.ss.usermodel.

class myxls
method main( args=String[] ) static
  mainwindow = JFrame( "Excel Example" )
  mainwindow.setLayout( GridLayout( 1,1 ))

  -- create label
  txtlabel   = JLabel( "excel contents will be shown here", Jlabel.CENTER )
  mainwindow.add( txtlabel )
 
  -- open excel file
 
  -- read contents & show in label

  -- set default operation for the Frame
  mainwindow.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE )

  -- set frame size and make visible
  mainwindow.setSize( 600,100 )
  mainwindow.setVisible( 1 )


_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Error Message Guide (was Importing Classes)

Kermit Kiser
NetRexx needs a comprehensive guide to all error and warning messages with detailed descriptions of meanings and possible causes. It seems like a good idea to create one for the open source release. Anyone else agree?

BTW, I think this warning message is easy to reproduce by importing a bogus package name.

-- Kermit

Measel, Mike wrote:

Quique, in your example the directory is uppercase but on the classpath it is lower ?  Java is case sensitive even though windows is not.

 

From: [hidden email] [[hidden email]] On Behalf Of David Requena
Sent: Wednesday, March 24, 2010 8:04 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Importing Classes

 

Quique,

Oh I see, that's why you get the warning but no compilation error.

The classpath shows? You have this on a CLASSPATH environment variable?

Tried your code and could not reproduce the behaviour. It compiled ok with:

 java -cp ".;C:\home\drequena\dev\NetRexx\lib\NetRexxC.jar;C:\Java\jdk1.6.0_16\lib\tools.jar;.\poi-3.6-20091214.jar" COM.ibm.netrexx.process.NetRexxC myxls.nrx

Note that 'Program Files' includes a space. Did you use quotes when adding it to classpath?
I would expect a ClassNotFoundException if this was the culprit but you never know.

---
Saludos / Kind regards.
David Requena


El 24/03/2010 11:59, Quique Britto escribió:

Hi again,

the compilation is successful because I have not tried to access the classes, I want to get rid of this warning.
here is a cut down version of my program which reproduces this warning.

the poi package is located at C:\POI-3.6\poi-3.6-20091214.jar and the classpath shows (using copy n paste)
.;C:\Program Files\Java\jdk1.6.0_10\lib\tools.jar;C:\poi-3.6\poi-3.6-20091214.jar;

import javax.swing.
import org.apache.poi.ss.usermodel.

class myxls
method main( args=String[] ) static
  mainwindow = JFrame( "Excel Example" )
  mainwindow.setLayout( GridLayout( 1,1 ))

  -- create label
  txtlabel   = JLabel( "excel contents will be shown here", Jlabel.CENTER )
  mainwindow.add( txtlabel )
 
  -- open excel file
 
  -- read contents & show in label

  -- set default operation for the Frame
  mainwindow.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE )

  -- set frame size and make visible
  mainwindow.setSize( 600,100 )
  mainwindow.setVisible( 1 )


_______________________________________________ Ibm-netrexx mailing list [hidden email]

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Error Message Guide (was Importing Classes)

David Requena
Kermit,

I fully agree with your proposal.

Regarding the case at hand, you also get this warning when the package exists but contains no classes.

This instance seems perfectly right to me while importing a bogus package sounds more as an actual error IMHO.

BlackBerry de movistar, allí donde estés está tu oficin@

-----Original Message-----
From: Kermit Kiser <[hidden email]>
Date: Wed, 24 Mar 2010 08:07:43
To: IBM Netrexx<[hidden email]>
Subject: Re: [Ibm-netrexx] Error Message Guide (was Importing Classes)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Error Message Guide (was Importing Classes)

Mike Cowlishaw
In reply to this post by Kermit Kiser
Looks like I missed a post .. what was the error/warning message?
 
FWIW, when you have the code you'll find that all the messages are in a single file (so they can be easily translated).
 
Also, if the message was weird/obscure, it could well have come from Java  [which is still a NetRexxC problem, as NetRexxC should prevent anything bad getting to Java, specifically to avoid the horrible Java messages ... :-) ].
 
Mike
 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Kermit Kiser
Sent: 24 March 2010 15:08
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Error Message Guide (was Importing Classes)

NetRexx needs a comprehensive guide to all error and warning messages with detailed descriptions of meanings and possible causes. It seems like a good idea to create one for the open source release. Anyone else agree?

BTW, I think this warning message is easy to reproduce by importing a bogus package name.

-- Kermit

Measel, Mike wrote:

Quique, in your example the directory is uppercase but on the classpath it is lower ?  Java is case sensitive even though windows is not.

From: [hidden email] [[hidden email]] On Behalf Of David Requena
Sent: Wednesday, March 24, 2010 8:04 AM
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Importing Classes

Quique,

Oh I see, that's why you get the warning but no compilation error.

The classpath shows? You have this on a CLASSPATH environment variable?

Tried your code and could not reproduce the behaviour. It compiled ok with:

 java -cp ".;C:\home\drequena\dev\NetRexx\lib\NetRexxC.jar;C:\Java\jdk1.6.0_16\lib\tools.jar;.\poi-3.6-20091214.jar" COM.ibm.netrexx.process.NetRexxC myxls.nrx

Note that 'Program Files' includes a space. Did you use quotes when adding it to classpath?
I would expect a ClassNotFoundException if this was the culprit but you never know.

---
Saludos / Kind regards.
David Requena


El 24/03/2010 11:59, Quique Britto escribió:

Hi again,

the compilation is successful because I have not tried to access the classes, I want to get rid of this warning.
here is a cut down version of my program which reproduces this warning.

the poi package is located at C:\POI-3.6\poi-3.6-20091214.jar and the classpath shows (using copy n paste)
.;C:\Program Files\Java\jdk1.6.0_10\lib\tools.jar;C:\poi-3.6\poi-3.6-20091214.jar;

import javax.swing.
import org.apache.poi.ss.usermodel.

class myxls
method main( args=String[] ) static
  mainwindow = JFrame( "Excel Example" )
  mainwindow.setLayout( GridLayout( 1,1 ))

  -- create label
  txtlabel   = JLabel( "excel contents will be shown here", Jlabel.CENTER )
  mainwindow.add( txtlabel )
 
  -- open excel file
 
  -- read contents & show in label

  -- set default operation for the Frame
  mainwindow.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE )

  -- set frame size and make visible
  mainwindow.setSize( 600,100 )
  mainwindow.setVisible( 1 )


_______________________________________________ Ibm-netrexx mailing list [hidden email]

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Error Message Guide (was Importing Classes)

Aviatrexx
It would be a considerable challenge to make NetRexx smart enough to prevent
Java execution error messages, wouldn't it? :-)

However, a comprehensive explanation of NetRexx error messages sounds like a
great stand-alone project for someone.  As would national language translations.

-Chip-

On 3/24/10 16:38 Mike Cowlishaw said:

> Also, if the message was weird/obscure, it could well have come from
> Java  [which is still a NetRexxC problem, as NetRexxC should prevent
> anything bad getting to Java, specifically to avoid the horrible Java
> messages ... :-) ].
>
>     ------------------------------------------------------------------------
>     *From:* Kermit Kiser
>
>     NetRexx needs a comprehensive guide to all error and warning
>     messages with detailed descriptions of meanings and possible causes.
>     It seems like a good idea to create one for the open source release.
>     Anyone else agree?

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Error Message Guide (was Importing Classes)

Jeff Hennick
In reply to this post by Kermit Kiser
On 3/24/2010 11:07 AM, Kermit Kiser wrote:
NetRexx needs a comprehensive guide to all error and warning messages with detailed descriptions of meanings and possible causes. It seems like a good idea to create one for the open source release. Anyone else agree?
Let's get a Wiki started soonest. 

Messages, list of causes, possible solutions / workarounds.  (The "old" IBM manuals I was familiar with were good on the first, weak on the second, and never thought of the third.)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Error Message Guide (was Importing Classes)

Mike Cowlishaw
In reply to this post by Aviatrexx
Note my careful use of 'NetRexxC' .. yes, runtime messages outside of scope
:-).  (Still no idea if the message in question was runtime or
compiletime).

Mike

   

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Chip Davis
> Sent: 24 March 2010 17:49
> To: IBM Netrexx
> Subject: Re: [Ibm-netrexx] Error Message Guide (was Importing Classes)
>
> It would be a considerable challenge to make NetRexx smart
> enough to prevent Java execution error messages, wouldn't it? :-)
>
> However, a comprehensive explanation of NetRexx error
> messages sounds like a great stand-alone project for someone.
>  As would national language translations.
>
> -Chip-
>
> On 3/24/10 16:38 Mike Cowlishaw said:
> > Also, if the message was weird/obscure, it could well have
> come from
> > Java  [which is still a NetRexxC problem, as NetRexxC
> should prevent
> > anything bad getting to Java, specifically to avoid the
> horrible Java
> > messages ... :-) ].
> >
> >    
> --------------------------------------------------------------
> ----------
> >     *From:* Kermit Kiser
> >
> >     NetRexx needs a comprehensive guide to all error and warning
> >     messages with detailed descriptions of meanings and
> possible causes.
> >     It seems like a good idea to create one for the open
> source release.
> >     Anyone else agree?
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Error Message Guide (was Importing Classes)

Kermit Kiser
Hi Mike ;

Quique's original message was the following:


Quique Britto wrote:
Hi all.

I have extracted the poi-bin-3.6-20091214.zip to my c: and the C:\poi-3.6\poi-3.6-20091214.jar is shown in my classpath. This set of classes allows the reading and writing of XLS files from within java.

My program shows import org.apache.poi.ss.usermodel. and program compiles ok but shows the following warning.:

<<<<  no classes found for import from package  org.apache.poi.ss.usermodel  >>>>

but this class (and more) can be seen inside the jar file. 


Am I missing something?
  
I have no idea what is in the jar file he mentioned.

My question is this:  If an import ends with a period as in "a.b.c." will class "a.b.c" be imported along with anything that begins with "a.b.c."?

-- Kermit



Mike Cowlishaw wrote:
Note my careful use of 'NetRexxC' .. yes, runtime messages outside of scope
:-).  (Still no idea if the message in question was runtime or
compiletime).

Mike

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Error Message Guide (was Importing Classes)

Mike Cowlishaw
OK, thanks.  Pretty sure anything starting '<<<<' is not a NetRexxC message.
 
Mike


From: [hidden email] [mailto:[hidden email]] On Behalf Of Kermit Kiser
Sent: 24 March 2010 20:02
To: IBM Netrexx
Subject: Re: [Ibm-netrexx] Error Message Guide (was Importing Classes)

Hi Mike ;

Quique's original message was the following:


Quique Britto wrote:
Hi all.

I have extracted the poi-bin-3.6-20091214.zip to my c: and the C:\poi-3.6\poi-3.6-20091214.jar is shown in my classpath. This set of classes allows the reading and writing of XLS files from within java.

My program shows import org.apache.poi.ss.usermodel. and program compiles ok but shows the following warning.:

<<<<  no classes found for import from package  org.apache.poi.ss.usermodel  >>>>

but this class (and more) can be seen inside the jar file. 


Am I missing something?
  
I have no idea what is in the jar file he mentioned.

My question is this:  If an import ends with a period as in "a.b.c." will class "a.b.c" be imported along with anything that begins with "a.b.c."?

-- Kermit



Mike Cowlishaw wrote:
Note my careful use of 'NetRexxC' .. yes, runtime messages outside of scope
:-).  (Still no idea if the message in question was runtime or
compiletime).

Mike

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

12