How to import a class

Hi all
I am developing two PDK projects. I have created a bean in second project. How can I use that bean i my first project. I mean how can import that bean in my first project. Note: I can't create the same bean in my first project.
Pleae help.

The path to the jar file (including the jar file name and extension) must be added to the FORMS_BUILDER_CLASSPATH registry variable for the import step. For runtime you need to have it in the default.env.

Similar Messages

  • How to import a class not in the package from a package

    how to import a class not in the package from a package?

    http://java.sun.com/docs/books/tutorial/java/interpack/usepkgs.html

  • How to import java Classes in report Builder 10g

    How to import java Classes in report Builder 10g .....
    Arshad

    Hello,
    To import the Java classes:
    Add your jar in the REPORTS_CLASSPATH
    Launch Reports Builder.
    Note:
    You must launch Reports Builder now so that the new REPORTS_CLASSPATH is used.
    Choose Program > Import Java Classes to display the Import Java Classes dialog box.
    Regards

  • How to import a class from a package at the same level

    Hello friends,
    i have a class as Plaf.java
    as
    package org.vaibhav.swing.plaf;
    import java.awt.*;
    import javax.swing.*;
    public class Plaf {
    other code
    }as you see, this is in org.vaibhav.swing.plaf package.
    I have one more class as
    package org.vaibhav.swing.frames;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class StartFrame extends JFrame implements ActionListener {
    other code
    }and this class is in package org.vaibhav.swing.frames
    Please hlp me how to use the class Plaf in StartFrame.java. Rather what import statement should i use in StartFrame.java.
    please help.
    thank you
    Message was edited by:
    vaibhavpingle

    but it then gives me this error
    StartFrame.java:11: package org.vaibhav.swing.plaf
    does not exist
    import org.vaibhav.swing.plaf.*;
    Have you first compiled Plaf.java and saved it in this directory strucuture
    /org/vaibhav/swing/plaf/
    And also have you set your classpath to the parent directory of org folder.
    Message was edited by:
    qUesT_foR_knOwLeDge

  • How to import a class, which is not in a package?

    Hi all,
    I have the following problem:
    A class A is not in a package. In another class B, which is in a package (let's say package X) I want to use the class A. Without importing the class A, I get the error "Cannot resolve symbol".
    Using the import statement import A; gives the error ". expected".
    How can I import that class?
    Best wishes to all ...
    Heiko

    > I have the following problem:
    A class A is not in a package. In another class B,
    which is in a package (let's say package X) I want to
    use the class A. Without importing the class A, I get
    the error "Cannot resolve symbol".
    I think not putting a class in a package is a bad practice. Avoid that.

  • How to import a .class in eclipse?

    I have a .class file w/ out the source, and im tiring to import that into my project.
    So I go to import->File System and check the .class file. It shows up in my project but when I try to instantiate it I get a "can not be instantiated to a type" error.
    any thoughts?
    this is happening to a lot of people in my course.
    thanks!

    Hi,
    i tried that what you sad, but my eclipse can't import that class.
    So: I have eclipse 3.1, and i would like to import a class (without source). I develop at the moment a J2ME project with eclipse.
    The class what i want to import is in a package, so i must to import like this: import net.jscience.math.kvm.MathFP;
    Can you tell me how in the hell can i this class to import?
    (I tried about 6 hours long, and i got some result, but not the really perfect.)
    When i make this subdirectory structure (what is in the import line) into my project, then in eclipse work the auto completing, 'till the class name. :-/. But the class is there. Egal i add an external class folder, i got always the same result.
    Please help me, because my brain at the moment wants to explode.
    Thanks a lot.

  • How to import a class in 10g

    I have a jar file and wanted to import the class into pl/sql
    I have saved the jar file in c:\ora10g\forms\java and have this path to my classpath in default.env file when i tried to import the class . I got an error
    Importing Class C:\ora10g\forms\java\XXX.jar...
    Exception occurred: java.lang.ClassNotFoundException: C:\ora10g\forms\java\XXX/jar
    Can anyone help me how to set the classpath correctly.

    The path to the jar file (including the jar file name and extension) must be added to the FORMS_BUILDER_CLASSPATH registry variable for the import step. For runtime you need to have it in the default.env.

  • How to import the classes?

    Hai to all,
    May I know how to import the packages in j2me that are not in the midpapi classes.
    If I had some new package and I want to import that to my application
    For example .
    The javax.mail package is with me but I don't know how can I import it to my application.How to set a classpath to it.
    (I set a classpath so that the j2me is not accepting the package but j2se is accepting is ther a special way to set a classpath to those package and where to keep those packages i.e in which folder ...)
    Awaiting for the answers ..
    Thanks to you

    for sms check i.e. http://www.simplewire.com/. i know that there were some more companies but can't recall their names now :(
    for encryption: i'd use midp 2.0 and rms, let user write their message, store it encrypted on rms and then send using some sms api. but that's just me ;)
    hth

  • How to import other class in Flex Builder2?

    I use Flex Builder2,I want to import the other class,such as
    ascb,like follows:
    package {
    import flash.display.Sprite;
    import ascb.units.Converter;
    import ascb.units.Unit;
    import flash.events.Event;
    public class ApplicationExample extends Sprite {
    private var _square:Sprite;
    private var _angle:uint;
    public function ApplicationExample() {
    _square=new Sprite();
    _square.graphics.lineStyle(0);
    _square.graphics.drawCircle(0,0,2);
    addChild(_square);
    _angle=0;
    addEventListener(Event.ENTER_FRAME,move);
    private function move(event:Event):void{
    var
    converter:Converter=Unit.DEGREE.getConverterTo(Unit.DADIAN);
    var angleRadians:Number=converter.convert(_angle);
    _square.x=Math.cos(angleRadians)*100+200;
    _square.y=Math.sin(angleRadians)*100+200;
    _angle++;
    ApplicationExample.as is locate in direcotry C:\workspace,and
    I put package ascb into directory C:\workspace too,then I run
    ApplicationExample.as ,it raise following error:
    Description:A file found in a source-path must have an
    externally visible definition. If a definition in the file is meant
    to be externally visible, please put the definition in a package.
    Resource:Converter.as
    In Folder:ApplicationExample/ascb/units
    Location:line -1
    By the way,when I write import ascb.,it should show units,but
    it only show util, I guess I may put package ascb into wrong
    director,or the ascb don't put the route of Flex Builder2. I don't
    know how to do it!
    Please give me detail steps to solve above error!
    Thanks in advance!

    when I put as
    import a;
    while compiling, it prompt : '.' expected
    how to resolve it?
    thanksIn J2SDK 1.4, you can only import a class that is in a named package. The compiler is expecting a package_name.class_name;
    You do not need to import classes that are in the same package and all classes that do not specify a package name are in the same unnamed package. However you must import classes that are in different packages.

  • How to import java Classes in report Builder

    Hi, I want to import classes from a jar file into Report Builder (10 g). I'm not able to find my JAR in -- Program --> Import Java Classes option.
    I have set the classpath pointing to my JAR.

    Hello,
    To import the Java classes:
    Add your jar in the REPORTS_CLASSPATH
    Launch Reports Builder.
    Note:
    You must launch Reports Builder now so that the new REPORTS_CLASSPATH is used.
    Choose Program > Import Java Classes to display the Import Java Classes dialog box.
    Regards

  • How to import custom classes from model to view controller in adf?

    hi...
    i have some custom classes in model layer in adf.
    i want to use them in view controller but i cannot import them.
    how is this possible?
    my jdev version is 11.1.1.5

    You normally don't have to do anything special. The view controller project has a dependency to the model project. So simply typing the class name should show you hte option to generate the need import statement for the class.
    However, not all classes which reside in the model project should be imported into the view Controller as it might break the MVC pattern.
    Timo

  • Surprise! How to import my class?

    I used java1.2.2 to compile my files before. No problem. But I want to use StringBuffer class, indexOf method, which supported by 1.4. So I update my java then compile my files. It is said that '.' not found, import xxxx, what is mean?

    Thanks, just I am not familiar with 1.4 version. JDK1.4 didnt specify any new ways to import classes, they have always been the same.
    How
    can I do to avoid the error? It is the only way to
    package all my files? Do you have any way to import a
    single class? For example:
    import java.lang.String;
    import MyBean; //this is a class named MyBean.
    declare in MyBean.java
    //And it have been compiled
    ave been compiled successfully.
    SiriusIf the class MyBean lies in the same folder u dont need to import it as classes in the same package are visible to each other. Else u will have to import it using the package import format, there is no other way.
    Always,
    Leo.

  • How to import API classes in JSP?

    hi,
    What is the syntax for importing Java API classes in JSP (like in .java files)?
    I've tried,
    <% import java.util.*; %>
    <%! import java.util.*; %>
    <%@ import java.util.*; %>
    <%@ page import java.util.*; %>
    ...all don't compile!
    Please help. Thanks very much!
    Gerald.

    <%@ page import="java.util.*" %>
    Look at these resources:
    http://java.sun.com/products/jsp/pdf/card11.pdf
    http://java.sun.com/products/jsp/pdf/syntaxref.pdf

  • How to import a class that is in the database?

    Here's the picture: I have a server running on a machine and the client side is a stored procedure located in the database. Instead of writing multiple parameters on the stream, I send a Map of parameters. Therefore, both sides of the server needs to "know" the keys of my parameters in the Map. So I end up declaring constants in both the client and server class.
    Is there a way for the server to import the static content of the client class that's in the database? ( Or vice-versa )
    Thanks in advance!

    Is this a JDBC question?
    Meta data solutions mean that you will only find problems at runtime that would be obvious at compile time with a non-metadata solution. Code generation makes production of large numbers of these easy.
    But if you want metadata then you create a seperate class in a seperate package which holds the constants. The specifics depend on the implementation but you will typically have one class for each 'type' that is supported.
    That package is used by both the server and the client code.
    You can of course put other common functionality in the package (like a wrappers for the collections themselves, validation of names, etc.)

  • How to import a class that have no package

    I have .class archive that i need to use in a web aplication on Tomcat. I put the class in the directory: <webapp>/WEB-INF/classes/.
    The class doesn�t have a package, so when i tried to import (..page Import=".....") it, tomcat gave me an error because is looking for a package instead of the class.
    then i try to use it without the import and tomcat gave another error because it can�t find the class.
    Any ideas??
    by the way.. I don�t have the source code, I just have the .class archive..
    thank you....

    Also, I already found that the class had no package. Then you are out of luck.
    As of java 1.4 you can no longer import classes that are not in a package. [url http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=c85f07c1ce8f344d787b7a5146d68:WuuT?bug_id=4361575 ] Full details here
    The only solutions I can think of
    1 - get the people who originally gave you the class to package it properly.
    2 - Decompile it to java code, Change the java code to put it in a package and recompile it. Depending on the complexity of the class this may or may not be a trivial operation.
    Good luck,
    evnafets

Maybe you are looking for

  • Oracle 8i (8.1.7) Personal Edition on Windows Millenium wont install

    I try to install Oracle 8i (8.1.7) Personal Edition on my Windows Millenium laptop (PIII, 256MB, 30GB). When running universal installer, after first initial screen when installer has loaded G:\stage\products.jar (G drive is my CD drive), I got the f

  • Information about activation-statistics from a DSO.

    Hello, after activating a request in an DSO, I can see the three key-figures in the log-window: 1) Number of inserted Records 2) Number of updates Records 3) Number of deleted Records Unfortunately I see this information for each Data-Package, but I

  • Problems with Westell 7500 Gateway

    Hi guys I have a problem with a westell 7500 series wireless gateway. Having recently upgraded to the gateway from an old 6100 series modem, I am having some issues keeping computers synced with the gateway. Every time I restart my computer connected

  • No matching record found when creating Incoming Payment...

    Hi, I'm starting a transaction, creating a invoice and then creating a incoming payment. The invoice is created successfuly in memory I can see the next DocEntry and DocNum and passing it to the incoming payment as usual but I'm getting the error : N

  • Running weblogic server and workshop on 2 different machines

    hi all, My computer cannot handle both the server and workshop running on it, at the same time. 1) installed weblgic server, created domain on computer A. 2) mapped the domain\source code(working in dev mode) on computer A to computer B. 3) I open up