|
If your class was in package com.whatever, then the java command would need to be: java com.whatever.GetIndexService 2005-04-01 2005-04-30 dg you also need to be at the root of the package structure - i.e. if you type the command ls, you should see the com folder listed, not the java .class file - remmember that in the java the folders the classes are in are part of the structure. Hope this helps, Chris. -----Original Message----- From: Anand, Rajesh [mailto:Rajesh_Anand@xxxxxx] Sent: 22 June 2005 11:23 To: Java Programming on and around the iSeries / AS400 Subject: RE: No Class definition found ERROR Chris, You are spot on, the class is in a package. So, how to I specify the package in the call statement. I've already specified "." in the classpath. regards, Rajesh Anand Email:Rajesh_anand@xxxxxx -----Original Message----- From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Price, Chris Sent: 22 June 2005 11:18 To: 'Java Programming on and around the iSeries / AS400' Subject: RE: No Class definition found ERROR Rajesh, Couple of suggestions: You haven't specified a package name on the java call. This will only work if the class isn't within a package. Check your classpath - you musy include a "." if you want the current folder to be included. Hope this helps, Chris. -----Original Message----- From: Anand, Rajesh [mailto:Rajesh_Anand@xxxxxx] Sent: 22 June 2005 11:12 To: java400-l@xxxxxxxxxxxx Subject: No Class definition found ERROR Folks, I've a project designed using Eclipse and tested on PC and works well. I then moved all .class files to IFS on AS400 and tried calling it from qshell after setting classpath. Cmd ran.... java GetIndexService 2005-04-01 2005-04-30 dg But it gave me the following error.... java.lang.NoClassDefFoundError java/lang/Error.<init>()V+1 (Error.java:41) java/lang/NoClassDefFoundError.<init>()V+1 (NoClassDefFoundError.java:37) java/lang/ClassLoader.defineClass(Ljava/lang/String;^BIILjava/security/Prote ctionDomain;)Ljava/lang/Class;+29 (ClassLoader java:476) java/security/SecureClassLoader.defineClass(Ljava/lang/String;^BIILjava/secu rity/CodeSource;)Ljava/lang/Class;+27 (SecureC assLoader.java:101) java/net/URLClassLoader.defineClass(Ljava/lang/String;Lsun/misc/Resource;)Lj ava/lang/Class;+176 (URLClassLoader.java:287) java/net/URLClassLoader.access£1(Ljava/net/URLClassLoader;Ljava/lang/String; Lsun/misc/Resource;)Ljava/lang/Class;+1 (URLCl ssLoader.java:231) Can someone help pls. Thanks in advance. Rajesh Anand Email:Rajesh_anand@xxxxxx -------------------------------------------------------- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. http://www.ml.com/email_terms/ --------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.
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.