JSP/beans classpath problems

I'm runnning Tomcat 3.3 on Solaris 8. I'm writing a JSP application which uses a JavaBean that I wrote. The beans class name is testbeans.CalendarBean. I'm getting ClassNotFoundExceptions when I try to import the bean. My JSP is located at TOMCAT_HOME/webapps/test/jsp/
My bean is located at TOMCAT_HOME/webapps/test/WEB-INF/classes/testbeans/
I made sure to put the proper include statement in my jsp file as well. Finally, I put my bean in TOMCAT_HOME/lib/ and modified the CLASSPATH variable in tomcat.sh. This worked, but what do I have to do so I can leave the bean in its original location? Thanks.
John

Add the following to your JSP file:
<%@ page
import = "testbeans.*"
%>
Then you can do this:
<% testbeans.CalendarBean myCB = new CalendarBean();%>
also, CalendarBean needs a package statement like:
package testbeans;

Similar Messages

  • Jsp bean:setvalue problem

    i use bean in my jsp page.but the problem is that i didn't get the value.i doubt whether the value actully passed to data.my bean is follows:
    package abc;
    public class hai
    private int a;
    public void sethai(int x)
    a=x;
    public int gethai()
         return a;
    my files are as follows
    1) simple.html
    <html>
    <head>
    </head>
    <body>
    <form action="simple1.jsp" method="post" name="form1" target="_self">
    Number:<input name="num" type="text"><br>
    <input name="sub" type="submit" value="sub"></form>
    </body>
    </html>
    2)simple1.jsp
    <html>
    <head></head>
    <%@ page import="abc.*" errorPage="" %>
    <jsp:useBean id="obj" class="abc.hai" scope="session">
    <jsp:setProperty name="obj" property="*"/>
    </jsp:useBean>
    <% out.println(request.getParameter("num"));%>
    <body>number:
    <jsp:getProperty name="obj" property="hai" />
    </body>
    </html>
    the output i got is the value 0
    pls replay me

    Hi Marty,
    Here is my portalapp.xml file:
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
        <property name="SharingReference" value="htmlb"/>
      </application-config>
      <components>
        <component name="DynPageOne">
          <component-config>
            <property name="ClassName" value="com.mycompany.basicexample.DynPageOne"/>
            <property name="SecurityZone" value="com.mycompany.basicexample.DynPageOne/low_safety"/>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
            <property name="com.sap.portal.reserved.iview.IsolationMode" value="URL"/>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>
    I also created a getter method in my bean to return a static value and that value is returned correctly.  Any more ideas?

  • URGENT: sp6 and JSP compiling/classpath problem?

    Hi,
              We installed sp6 on our production site a little over a week and started
              seeing this problem on our logs with regards to any JSP with an include tag,
              such as:
              <%@ include file="/inc/insideHeadTag.jsp" %>
              INTERMITTENTLY, we will get the following error in the page on the client
              side at runtime:
              < ! -- cannot include file '/inc/insideHeadTag.jsp', resource not
              found -- >
              I grepped this newsgroup and noticed a previous unanswered post of the same
              nature, "Static compiles do not seem to include JSP's". Except in our case,
              this problem also manifest for dynamic JSP compiles, happens sporatically,
              and only started with sp6.
              Bug???
              Gene Chuang
              Join Kiko.com!
              

              Just to clarify - I'm not from BEA, I'm from EA - short a letter.
              As far as I know, there is no synchronization between WL instances in a cluster regarding the
              the compiling of JSPs. So when you start up two WL instances that share the same workingDir,
              and each WL instances gets a hit on your shiny new index.jsp, they both need to compile it. So the first
              one compiles it and writes index.class, the second does the same, overwriting the first _index.class,
              possibly at the same time that the first instance is trying to load _index.class into memory. And you
              get a mysterious 'class not found' error. Not likely, but possible.
              "Gene Chuang" <[email protected]> wrote:
              >Hmm, interesting... I thought Weblogic strongly recommends clustered
              >servers sharing the same file system?
              >
              >So you're saying the system-wide, cluster and node specific directories can
              >reside on the shared drive, but workingDirs should reside on local drives?
              >
              >--
              >Gene Chuang
              >Join Kiko.com!
              >
              >"Mike Reiche" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Make sure that your WLS instances are NOT sharing the workingDir. If two
              >instances
              >> try to compile the same JSP at the same time, bad things can happen.
              >>
              >> Mike
              >>
              >> "Gene Chuang" <[email protected]> wrote:
              >> >Hi Jong,
              >> >
              >> >Thanks for the reply; but I wish the solution is as simple as that.
              >Yes,
              >> >my .jsps are in the proper directory. They have been working properly
              >for
              >> >the past 6 months, since we were running WL 4.5.1. Only when I switched
              >to
              >> >WL 5.1 sp6 did this bug start showing up. Plus, like I said in my
              >original
              >> >post, this bug is sporatic. SOMETIMES the included jsp is found by
              >Weblogic
              >> >and the includer jsp compiles correctly; other times it isn't found and
              >the
              >> >includer jsp leaves a gap! What's going on?
              >> >
              >> >We are running clustered web servers in Solaris 2.7 with a shared file
              >> >system. This sporatic behavior may be because some nodes aren't working
              >> >properly???
              >> >
              >> >--
              >> >Gene Chuang
              >> >Join Kiko.com!
              >> >
              >> >"Jong Lee" <[email protected]> wrote in message
              >> >news:[email protected]...
              >> >>
              >> >> "Gene Chuang" <[email protected]> wrote:
              >> >> >Hi,
              >> >> >
              >> >> >We installed sp6 on our production site a little over a week and
              >started
              >> >> >seeing this problem on our logs with regards to any JSP with an
              >include
              >> >tag,
              >> >> >such as:
              >> >> I assumed insideHeadTag.jsp is in
              >> >> YOUR_DOCUMENT_ROOT/inc/insideHeadTag.jsp
              >> >>
              >> >> if you haven't read the spec of relative URI please do so:
              >> >> jsp spec 1.1 - section 2.5.2
              >> >>
              >> >> Jong
              >> >>
              >> >> >
              >> >> > <%@ include file="/inc/insideHeadTag.jsp" %>
              >> >> >
              >> >> >INTERMITTENTLY, we will get the following error in the page on the
              >client
              >> >> >side at runtime:
              >> >> >
              >> >> > < ! -- cannot include file '/inc/insideHeadTag.jsp', resource not
              >> >> >found -- >
              >> >> >
              >> >> >I grepped this newsgroup and noticed a previous unanswered post of the
              >> >same
              >> >> >nature, "Static compiles do not seem to include JSP's". Except in our
              >> >case,
              >> >> >this problem also manifest for dynamic JSP compiles, happens
              >> >sporatically,
              >> >> >and only started with sp6.
              >> >> >
              >> >> >Bug???
              >> >> >
              >> >> >Gene Chuang
              >> >> >Join Kiko.com!
              >> >> >
              >> >> >
              >> >> >
              >> >>
              >> >
              >> >
              >>
              >
              >
              

  • Classpath problems in EAR packaging?

    I try to access an EJB from a JSP. The JSP resides in web.war and the bean is in ejb.jar, and both of these are packaged together in an ear.
    I get a compile error when I try opening a JSP. I've had this problem in all my attempts to use my bean classes from JSP.
    My browser reports that the compiler cannot find the beans package. I have servlets within the war-file that are able to find the beans package, but the JSPs aren't.
    My ear-file contains 3 files
    ejb.jar
    web.war
    META-INF\MANIFEST.MF
    The manifest classpath points to ejb.jar and web.war
    My guess is that this has something to do with the way this is deployed by GlassFish.
    The application is deployed in the
    domains\mydomain\applications\j2ee-apps\myear\
    This directory contains the expanded files:
    ejb_jar\
    web_war\
    META-INF
    So the Java classes under web_war\ are able to see the Java classes under ejb_jar\ (i.e. my servlets)
    However; when GlassFish creates Java files from the JSPs and then tries to compile them, these files are placed under
    domains\mydomain\generated\jsp\j2ee-apps\myear\web_war\org\apache\jsp\jsp
    This might be correct for all I know, but apparently the compiler is unable to find the Java classes located under the mydomain\applications\.. directory when compiling classes located under the mydomain\generated\.. directory. There are no other files from my ear anywhere in the "generated" directory.
    So to me this seems to be some kind of classpath problem, as the compiler cannot find the needed files.
    Does this make any sense to anyone?
    PS
    In my ear, the JSPs are placed in the web.war. The war file looks like this:
    jsp\
       myjsp.jsp
    META-INF
       MANIFEST.MF
    WEB-INF
       web.xml
       lib\
          mylib.jarThanks
    \\Marius

    Marius,
    If you want communicate the bean you have to do following things.
    . Create a factory for the correct protocol
    . Obtain a Home
    . Use the Home to create stubs to the remote object
    So you want to call the Home and Remote interfaces to access the bean. When you run the client program, it will create the remote object that time it has to search the Home and Remote interfaces. So you have included those files for references in following location
    WEB-INF/classes
         -- <Home Interface File Name>.class
         -- <Remote Interface File Name>.class
    Or
    WEB-INF/lib
         -- <Bean Jar file name>.jar
    I think you will understand.
    -Mani

  • NEWBIE SUPER EASY JSP / BEAN

    With about half a dozen books sitting around my desk, I can't get a REAL basic jsp to work. I FINALLY got tomcat to NOT give run time errors, however the web page simply outputs "This is output:" I know I am an idiot, but this JSP / bean stuff is upsetting. Any help on the following code would be great.
    basic.jsp is as follows:
    <jsp:useBean id="myBean" class="basic.basicbean" scope="session"/>
    <html>
    <head>
    <title>
    A Simple JSP
    </title>
    </head>
    <body>
    <%
    myBean.setBasicName("Michelle");
    %>
    This is output: <% myBean.getBasicName();%>
    </body>
    </html>
    basicbean.java is as follows:
    package basic;
    import java.beans.*;
    public class basicbean {
    private String BasicName=null;
    /** Creates new basicbean */
    public basicbean() {}
    public String getBasicName() {
    return this.BasicName;
    public void setBasicName(String value) {
    this.BasicName = value;
    Made the .java into the class put it in the basic directory under the classes/basic directory of the WEB-INF. The JSP page loads, but only output is: "This is output:" I am using Tomcat as the JSP server. "Core JSP" "Core Servlets and JavaServer Pages" "Advanced JavaServer Pages" "JSP, Servlets, and MySQL", and "Java Server Pages for Dummies" and I still can't get it. Thanks for helping out an idiot.
    -Jim

    You are very close; just a small error in the line:
    This is output: <% myBean.getBasicName();%>
    The problem is your just simply calling the method and tossing the return value. You have three ways of outputing the bean property:
    This is output: <% out.print(myBean.getBasicName();%>
    or
    This is output: <%=myBean.getBasicName()%>
    or
    This is output: <jsp:getProperty name="myBean" property="BasicName" />
    If you use the <jsp:getProperty> approach, then you must have a <jsp:useBean> somewhere above the getProperty tag.
    - Chris

  • Create jsp/bean webapp deploy fine...  add JSTL library wont deploy!

    winxp
    SJSE8
    PROBLEM:
    Using the new project wizard, I create a simple jsp/bean webapp using the embedded tomcat 5.5.7 as server... It deploys and runs with now issue
    Then, I right-click on project name (in project tree)... click properties... add library... select "JSTL 1.1".... do clean/build.... do deploy - which fails!
    message is: "Failed to deploy application at context path /bcd" (where bcd is my project name)
    Why does this happen?
    --------------simple app---------------
    ***jsp1.jsp****
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
        <h1>JSP Page</h1>
        <h1>get stuff JSP Page</h1>
        <jsp:useBean id="a" class="bcdpkg.IndexBean" scope="request"/>
        <h3>after1...</h3>
        <!--jsp:setProperty name="a" property="stuff" value="xxx" /-->
        <jsp:getProperty name="a" property="stuff" />
        </body>
    </html>***IndexBean.java***
    package bcdpkg;
    public class IndexBean
        /** Creates a new instance of IndexBean */
        public IndexBean()
        private String stuff = "this is stuff";
        public String getStuff()
            return this.stuff;
        public void setStuff(String s)
            this.stuff = s;
    }

    well.... I restarted SJSE8 (and tomcat 5.5.7) and now I can right-click on the project and click deploy...successfully.
    (Apologies for the "hair trigger" posting)
    I'll reply once more if it happens again.
    thanx

  • Redirect from jsp bean to jsp or html page

    I am facing a problem in redirecting to a jsp page from jsp bean
    How do i redirect from jsp bean to any other page like jsp or html.
    [email protected]

    Hi
    The solution you suggested we tried it long before only but it is not feasible for us as we have to implement it in all web pages which are in thousands.
    My need is like this.
    We have given specific time to each of our registered user , as user logs to our portal we calculate session time in bean and as he logs out is new time gets updated. (its like dial up connection)
    Now what happens consider user has left only 10 minutes balance, I can calculate and keep track for his time in bean.Now as the time becomes zero I want to redirect him to home page.
    As u said i can get return value zero for bean and can do it ,but our webpages are near about thousands.

  • Prob with running jsp Bean

    Hi,
    I am trying to run a bean through a jsp but its giving error at useBean tag of jsp:
    The error is :
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /Quadratic.jsp(7,0) The value for the useBean class attribute com.brainysoftware.Quadratic is invalid.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150)
         org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1227)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Generator.generate(Generator.java:3272)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    My jsp is:
    <HTML>
    <HEAD>
    <TITLE> JSP BEAN Quadratic Example </TITLE>
    </HEAD>
    <BODY>
    <%@ page language="java" %>
    <jsp:useBean id="quadratic" scope="session" class="com.brainysoftware.Quadratic" />
    <jsp:setProperty name="quadratic" property="ia" param="a" />
    <jsp:setProperty name="quadratic" property="ib" param="b" />
    <jsp:setProperty name="quadratic" property="ic" param="c" />
    X1= <%= quad.getDx1( ) %>
    X2= <%= quad.getDx2( ) %>
    End of program
    </BODY>
    </HTML>my bean is:
    package com.brainysoftware;
    import java.io.*;
    class Quadratic{
    int ia;
    int ib;
    int ic;
    String dx1;
    String dx2;
    public int getIa( ) {
    return ia;
    public void setIa( int ii) {
    ia=ii;
    public int getIb( ) {
    return ib;
    public void setIb(int ii) {
    ib=ii;
    public int getIc( ) {
    return ic;
    public void setIc(int ii) {
    ic=ii;
    public String getDx1( ) {
    double detA;
    double result;
    detA= ib*ib -4*ia*ic;
    if(detA<0.0)
    return "Real Roots not possible";
    else {
    result= -ib - Math.sqrt(detA/(2 * ia));
    Double Dresult=new Double (result);
    return Dresult.toString( );
    public String getDx2( ) {
    double detA;
    double result;
    detA= ib*ib -4*ia*ic;
    if(detA<0.0)
    return "Real Roots not possible";
    else {
    result= -ib + Math.sqrt(detA/(2 * ia));
    Double Dresult=new Double (result);
    return Dresult.toString( );
    my directory structure is given below:
    C:\tomcat-5.0.28\jakarta-tomcat-5.0.28\webapps\jsp-examples\WEB-INF\classes\com\
    brainysoftware>dir
    Volume in drive C has no label.
    Volume Serial Number is 4C50-9542
    Directory of C:\tomcat-5.0.28\jakarta-tomcat-5.0.28\webapps\jsp-examples\WEB-IN
    F\classes\com\brainysoftware
    05/22/2005 11:15 PM <DIR> .
    05/22/2005 11:15 PM <DIR> ..
    05/22/2005 11:18 PM 134 CalculatorBean.java
    05/23/2005 12:12 AM 216 Counter.java
    05/24/2005 10:48 PM 358 SimpleJavaBean.java
    06/14/2005 11:16 PM 1,205 Calculator.java
    06/14/2005 11:16 PM 1,323 Calculator.class
    06/16/2005 06:44 PM 534 CalculatorBean2.java
    06/17/2005 08:53 AM 703 CalculatorBean2.class
    06/16/2005 07:00 PM 352 CalculatorBean2.html
    06/17/2005 08:51 AM 588 CalculatorBean2.jsp
    06/17/2005 04:29 PM 97 UploadBean.java
    06/17/2005 04:43 PM 527 FileUploadBean.java
    06/17/2005 04:43 PM 834 FileUploadBean.class
    06/18/2005 12:21 PM 863 Quadratic.java
    06/18/2005 12:21 PM 1,093 Quadratic.class
    14 File(s) 8,827 bytes
    2 Dir(s) 8,615,821,312 bytes free
    C:\tomcat-5.0.28\jakarta-tomcat-5.0.28\webapps\jsp-examples\WEB-INF\classes\com\
    brainysoftware>
    The above clearly shows the presence of Bean in the reqd directory but still I am getting an error. Can somebody help me:
    Zulfi.

    class QuadraticThe class is not public. It is only visible to other classes in the same package as itself, so the servlet (JSP) trying to instantiate and reference it can't see it.
    Make it public.

  • Classpath problem

    i am here stuck..
    my dir structure is
    c:\my\xxx\yyy\zzz
    i have a code ...
    package xxx.yyy.zzz;
    class A
    // some code
    }i have compiled sucessfully and put the clsss file into c:\my\xxx\yyy\zzz folder.
    now i want to import it in another class
    like...
    package xxx.yyy; // note this
    import xxx.yyy.zzz.*; // note this
    class B
    // some code
    // creating instance of class A here
    }question is how do i compile and run it ?
    i am at c:\my---> what should be the command to compile and run the above code?
    plz give me the explicit command so that i can test and verify . i have given the dir structure.
    i have tried several ways but got class not found exception and errors . i know its a classpath problem but i could not figure out what should i type at the c:\my prompt.
    can u give exact command to run and compile the above code in steps ?
    thanx

    question is how do i compile and run it ?You don't with that code. You've defined class A to have "package visibility," meaning it can't be used from outside its package. You should declare it with public visibility instead, like "public class A {...".
    Once you change that, use these commands to compile and run:c:\my\>javac xxx/yyy/zzz/A.java
    c:\my\>javac xxx/yyy/B.java
    c:\my\>java xxx.yyy.B

  • Classpath Problem (Using JSAPI)

    Hi,
    I using IBM Via Voice as a the implementation of the JSAPI on my system. I've downloaded the speech for java pack from IBM Alphaworks and put it in the directory of
    c:\ibmjs
    This gives you access to the speech packages for utilisation in your programs so I should be able to import javax.speech in my programs. However the system doesn't see these classes.
    Heres my Autoexec...
    path=%path%;c:\jdk1.3.1_01\bin;c:\ibmjs\lib;
    CLASSPATH=%CLASSPATH%;c:\ibmjs\lib\ibmjs.jar;
    I presume the whole thing is just a classpath problem, does anybody have any idea from the above paths where I am going wrong?

    i guess you have to put some of ibm's dll files coming with speech for java in the path (not classpath). it's not sufficient to have the directories in the path.
    anyway, there come's an installation manual with speech for java which explaines all that.

  • Fragment Bundle Classpath problems

    Does anyone have any tips for solving classpath problems in fragment bundles? I'm getting a no-class-def that I can't explain.
    I've used maven to create a fragment, hosted by com.day.crx.sling.server, to create a custom login. It needs to call a web service, so I've included httpclient-4.2.3.jar. I can see this jar listed on the deployed fragment's Bundle-ClassPath, via the osgi>bundle console. When I inspect the bundle that maven created, I can find this jar contained in the bundle jar, in the directory specified in the Bundle-ClassPath. I even oppened the httpclient jar to ensure that the offending class (org/apache/http/client/HttpClient) is there.
    This is the first fragment that I've tried to build. Is there something I don't know about how they load classes?
    Does anyone have any tips or tricks on solving osgi classpath problems? I read that felix has some tools, but I haven't found any documentation about them.

    I'm still not sure why the classes didn't load, but I have a solution to my problem - don't try to include the jars in the fragment bundle. I tracked down osgi-ready versions of the libraries that I needed and and installed them.

  • Another simple classpath problem question

    Hi All
    Yes I know, there are a lots of questions about this matter, but I couldn't found a solution to my problem.
    I have a simple program:
    public class prueba {
            public static void main(String[] args) {
                    System.out.println("Ahi va...");
    }placed in /tmp/javier/prueba.java
    After compiled, I've tried to run it from / and then problems started:
    cd /
    java /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    I said, ok...it could be a classpath problem...then:
    java -cp /tmp/javier/ /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba
    Damn, another try...
    java -cp .:/tmp/javier/ /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    Jesus Christ....may be the last slash....
    java -cp .:/tmp/javier /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    Oh...no.... may be classpath to java classes..
    java -cp .:/usr/java/j2sdk1.4.2_01/lib/jre/:/tmp/javier/ /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    Well, I don't know why this error happens....
    Please, could somebody help me !!!
    Thanks in advance...
    <jl>

    It's not too early to start following the Sun coding
    conventions for Java:
    http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.
    tmlHi
    thanks for your reply.
    Yes, I agree. I use conventions with my programs. But my real problem was with a real application and then I did quickly this simple code to help others to understand the problem and give a fast reply...
    Let me know if that works. (It was fine on my
    machine.) - MODYes it works fine, thanks.... and Damn...Murphys law again, the only option I didn't tried is the solution to my problem... :)
    Thanks again...

  • Again classpath problem

    again classpath problem.... i have tried to solve it in many ways but all failed. here is one
    instance of my effort which did not give me success.
    i have a FOLDER > c:/com/abc/def/ijk
    and files......
    MyClass.java
    ==============
    package com.abc.def.ijk
    class MyClass
    // blah
    // blah
    }c:\com\abc\def\ijk>javac MyClass.java ===>compiled fine and created a class file.
    and also one more file.....
    OneMoreClass.java
    =================
    import com.abc.def.ijk.MyClass
    class OneMoreClass
    // blah
    // blah
    }c:\com\abc\def\ijk>javac OneMoreClass.java ===> Error!!! package com.abc.def.ijk does not exist !!!!
    how can i solve it ?

    yea, this works....eariler i also usued to do this
    way. but this time i forgot.
    by the way, why individually it did not work !!!.Because you were in the package directory itself, and the classpath was set to the cwd, so java was looking for package directories at this level.
    and also when i specify directly by
    c:\com\abc\def\ijk
    javac  -classpath c:\com\abc\def\ijk\MyClass
    OneMoreClass.java ...it does not work!!.
    STRANGE! why ?Because by stating the package directory as classpath, you do the same as explained above. Stay out of package directories, stay one level above them, don't regard them as common directories. When declaring classpaths, don't mention package directories but the directories that contain them.

  • Jelly Bean Update Problems on Xperia S Tablet

    I think we need a new topic for Jelly Bean update problems and fixes.
    Solved!
    Go to Solution.

    small fonts and icons blurry pixelated in notification or google agenda widget
    browser crashes a lot.
    Missing jelly bean home launcher
    Wifi disconnecting for no reason.
    Animations aren't smooth tough tablet is more responsive then android 4.0.3 release6b

  • JDBC and Classpath problems on OpenVMS

    Hello,
    I'm working on an OpenVMS server and I got a simpler Java application that needs to establish a connection to an Oracle database, the application works perfectly well on Windows but when I moved to OpenVMS I got some problems with the oracle driver.
    I believe I�m using the correct driver, I already checked on the oracle site according to my java version (1.4.2) and my database version (oracle 9i 9.2.0.7.0)
    This is the error:
    $java -jar miss.jar "DnBProcess"
    About to start loading parameters for the MISS Proxy.
    Successfully load parameters for the MISS Proxy.
    About to load interface settings for DnBProcess
    Settings for DnBProcess succesffully loaded.
    About to load interface DnBProcess
    About to start loading parameters for DnB Interface.
    Successfully load parameters for DnB Interface.
    Interface DnBProcess succesffully loaded.
    About to execute interface DnBProcess
    Connecting to the database...
    java.lang.NoClassDefFoundError: oracle/jdbc/OracleDriver
    at miss.DnBProcess.ExecuteQueryToFile(DnBProcess.java:85)
    at miss.DnBProcess.Execute(DnBProcess.java:178)
    at miss.Proxy.ExecuteInterface(Proxy.java:160)
    at miss.Proxy.main(Proxy.java:207)
    I know is a classpath problem, and my classpath on VMS looks like this:
    define JAVA$CLASSPATH .,SYS$COMMON:[JAVA$142.LIB]TOOLS.JAR,SYS$COMMON:[JAVA$142.LIB]DT.JAR,SYS$COMMON:[JAVA$142.JRE.LIB]RT.JAR, USER1:[MONTEALEGRE.TEST.LIBS]OJDBC14.JAR,USER1:[MONTEALEGRE.TEST.MISS.LIBS]OJDBC14.JAR,[]
    As you can see I added the �ojdbc14.jar� in different folders but my application seems not to find it.
    Does anyone know how to set the classpath properly on VMS? Or maybe give me some tips that could lead me to find a solution to this problem.
    Thanks.
    Ileana.

    I would try googling for OpenVMS classpath. Unfortunatley the first result is this thread but there are a bunch of resources from IBM and HP listed and maybe they can help you.

Maybe you are looking for

  • Comparison in hexadecimal - help needed

    hello, i am basically using VISA read and write. There is infor sent to my computer using RS232. Only when i recieve that infor I need to send out some data.  so I open up visa and start "VISA Read". the information coming in is: "01,\n\r" or in hexa

  • "Unauthorized" error for SOAP receiver channel

    Hi all, I have a scenario in which I am calling a .NET web service from a UDF in which the XML payload is constructed manually. I have configured a SOAP receiver channel. Also, since the web service needs certificate authentication, I have checked th

  • URL iview issue for intranet sites

    Hi Guys, I am creating a simple url iview for one of our Sharepoint site. when I preview the iview it works fine. but when I assign it to some Role, it doesn't load. "Page cann't be displayed" error comes. Some prefix with the text  "res://ieframe.dl

  • END dated resoponsibilities doesn't display after activate in apps 11i

    Hi All, When i activate the end dated responsibilities, its not displaying of the end dated responsibilities in the responsibilities menu after applying the 11i.FIN_PF.G. Any inputs on this issue us appreciated. REgards, OrAc

  • Sga_max_size dynamic?

    Hi we are using oracle std edition how can we enable sga_max_size to be dynamic thanx kedar