Can I run the code in another project?

I use Jdeveloper v903.
I have three projects.
Can I run a project's code from other project within the same workspace?
Stephen

Stephen, before I [try to] answer your question I think that you need to adjust a bit more to the paradigm shift between a form based application and the true oop metaphor.
Ok. Now, to accomplish what you want is simple. Suppose you have BC4j, Client1, and Client2 projects. Within Client2 you want to instantiate classes in Client1. Besides making Client2 dependant on Client1 in the settings, which by the way only simply ensures proper [re]build of projects, also make sure that your classes within each project are inside a package, then in the client2 code import the client1 package. Thats it.
In case you did not package your existing code, be ready for some jDev glitches in renaming/moving classes into a new package. You can use the refactor feature, but you should manually make absolutely sure your old classes are not still sitting around in the old hierarchy. Due to the hassle involved, if your jclient projects are relatively small (and again only if you did not package em up in the first place), you are better off creating new client projects and creating your classes in packages from the onset.
Hope this helps;
-Nat

Similar Messages

  • Help:How can I run the J2EE Client Application? Thanks

    Help:How can I run the J2EE Client Application that will access the remote J2EE1.4 application server which runs on another host computer?
    I have developped a stateles senterprise java bean name converter and deloyed it in the j2ee1.4 application server on the host machine A. The converterbean provides the remote home interface and remote interface. At the same time I have developped the j2ee application client named convertappclient. When I access the conveter bean at host computer A through the script 'appclient.bat' as 'appclient -client convertappclient.jar', the client can access the bean sucessfully. Now I want to access the bean through the script 'appclient.bat' at host computer B,what files should I copy from host computer A to host computer B;and what the command line should be like? Thanks!
    The following are the code of the enterprise java bean and it's home interface .
    The client code is also provided.
    The enterprise java bean:
    package converter;
    import java.rmi.RemoteException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import java.math.*;
    public class ConverterBean implements SessionBean {
    BigDecimal yenRate = new BigDecimal("121.6000");
    BigDecimal euroRate = new BigDecimal("0.0077");
    public ConverterBean() {
    public BigDecimal dollarToYen(BigDecimal dollars) {
    BigDecimal result = dollars.multiply(yenRate);
    return result.setScale(2, BigDecimal.ROUND_UP);
    public BigDecimal yenToEuro(BigDecimal yen) {
    BigDecimal result = yen.multiply(euroRate);
    return result.setScale(2, BigDecimal.ROUND_UP);
    public void ejbCreate() {
    public void ejbRemove() {
    public void ejbActivate() {
    public void ejbPassivate() {
    public void setSessionContext(SessionContext sc) {
    The bean's remote home interface :
    package converter;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    import javax.ejb.EJBHome;
    public interface ConverterHome extends EJBHome {
    Converter create() throws RemoteException, CreateException;
    The bean's remote interface:
    package converter;
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    import java.math.*;
    public interface Converter extends EJBObject {
    public BigDecimal dollarToYen(BigDecimal dollars) throws RemoteException;
    public BigDecimal yenToEuro(BigDecimal yen) throws RemoteException;
    The j2ee application client:
    import converter.Converter;
    import converter.ConverterHome;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import java.math.BigDecimal;
    public class ConverterClient {
    public static void main(String[] args) {
    try {
    Context initial = new InitialContext();
    System.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
                   System.setProperty("java.naming.provider.url","jnp://10.144.97.250:3700");
    Context myEnv = (Context) initial.lookup("java:comp/env");
    Object objref = myEnv.lookup("ejb/SimpleConverter");
    ConverterHome home =
    (ConverterHome) PortableRemoteObject.narrow(objref,
    ConverterHome.class);
    Converter currencyConverter = home.create();
    BigDecimal param = new BigDecimal("100.00");
    BigDecimal amount = currencyConverter.dollarToYen(param);
    System.out.println(amount);
    amount = currencyConverter.yenToEuro(param);
    System.out.println(amount);
    System.exit(0);
    } catch (Exception ex) {
    System.err.println("Caught an unexpected exception!");
    ex.printStackTrace();
    }

    Surprisingly I find an upsurge in the number of posts with this same problem. I recently found a post which gave a nice link for this. Follow the steps and it should help:
    http://docs.sun.com/source/819-0079/dgacc.html#wp1022105

  • How  can i run this code correctly?

    hello, everybody:
        when  i run the code, i found that it dons't work,so ,i  hope somebody can help me!
        the Ball class is this :
        package {
        import flash.display.Sprite;
        [SWF(width = "550", height = "400")]
        public class Ball extends Sprite {
            private var radius:Number;
            private var color:uint;
            private var vx:Number;
            private var vy:Number;
            public function Ball(radius:Number=40, color:uint=0xff9900,
            vx:Number =0, vy:Number =0) {
                this.radius= radius;
                this.color = color;
                this.vx = vx;
                this.vy = vy;
                init();
            private function init():void {
                graphics.beginFill(color);
                graphics.drawCircle(0,0,radius);
                graphics.endFill();
    and the Chain class code is :
    package {
        import flash.display.Sprite;
        import flash.events.Event;
        [SWF(width = "550", height = "400")]
        public class Chain extends Sprite {
            private var ball0:Ball;
            private var ball1:Ball;
            private var ball2:Ball;
            private var spring:Number = 0.1;
            private var friction:Number = 0.8;
            private var gravity:Number = 5;
            //private var vx:Number =0;
            //private var vy:Number = 0;
            public function Chain() {
                init();
            public function init():void {
                ball0  = new Ball(20);
                addChild(ball0);
                ball1 = new Ball(20);
                addChild(ball1);
                ball2 = new Ball(20);
                addChild(ball2);
                addEventListener(Event.ENTER_FRAME, onEnterFrame);
            private function onEnterFrame(event:Event):void {
                moveBall(ball0, mouseX, mouseY);
                moveBall(ball1, ball0.x, ball0.y);
                moveBall(ball2, ball1.x, ball1.y);
                graphics.clear();
                graphics.lineStyle(1);
                graphics.moveTo(mouseX, mouseY);
                graphics.lineTo(ball0.x, ball0.y);
                graphics.lineTo(ball1.x, ball1.y);
                graphics.lineTo(ball2.x, ball2.y);
            private function moveBall(ball:Ball,
                                      targetX:Number,
                                      targetY:Number):void {
                ball.vx += (targetX - ball.x) * spring;
                ball.vy += (targetY - ball.y) * spring;
                ball.vy += gravity;
                ball.vx *= friction;
                ball.vy *= friction;
                ball.x += vx;
                ball.y += vy;
    thanks every body's help!

    ok, thanks for your reply ! I run this code in the Flex builder 3!and the Ball class and the Chain class are all in the same AS project!
      and i changed the ball.pv property as public in the Ball class, and  the Chain class has no wrong syntactic analysis,but the AS code don't run.so this is the problem.
    2010-04-21
    Fang
    发件人: Ned Murphy <[email protected]>
    发送时间: 2010-04-20 23:01
    主 题: how  can i run this code correctly?
    收件人: fang alvin <[email protected]>
    I don't see that the Ball class has a pv property, or that you even try to access a pv property in the Chain class.  All of the properties in your Ball class are declared as private, so you probably cannot access them directly.  They would need to be public.  Also, I still don't see where you import Ball in the chain class such that it can use it.

  • Can I use the cerficate on another plugin

    Hi
    I was having some problems with my plugin i.e. it wasn't appearing on my deployment pc.
    I copied the code from that project to another project.
    This was a slow and painful process but it worked at the end of the day.
    I got the new plugin to display the toolbar and I fixed my com dlls.
    I assumed that was the reason for my main project not displaying the toolbar, but it wasn't.
    I copied the original project to the deployment machine and the toolbar is still missing.
    Can I register the new projcet with the certificate so it works on adobe reader.
    I cannot wait for another key because by deadline is 2 days away.
    I will really really appreciate any help
    God Bless

    Can I register the new projcet with the certificate so it works on adobe reader.
    Technically, yes.
    Legally, NO!  In fact, if you do so, you are violating your license with Adobe and could potentially lead to your losing your existing license.
    >I cannot wait for another key because by deadline is 2 days away.
    Unfortunately, you should have thought about this beforehand.

  • PP Procedure is Missing, Can not Run the Preprocessor

    hi experts,
    while executing some module program through TCODE. I got this error  PP Procedure is Missing, Can not Run the Preprocessor
    can any one help me ?
    thanks,
    nag.

    Hello,
    What I thought you meant when you said "Port" was that you were using a Distribution project to move it to other machines.  Therefore you have two options to proceed.
    1)  Copy the nicppaiu.dll from the system folder on your machine to the system folder on another machine you are "Porting" to.
    2)  Add a project to your solution that is a Setup project.  Then add the output of your application to this project and add the MSM discussed earlier.  This will create a MSI that can be used to install your application on multiple machines (it still requires a NI-DAQmx install).
    There is a good topic in our help named "Deploying Measurement Studio Applications" that tells you everything you need to know.
    Regards,
    Jeff

  • After upgrading to itunes 7.3.1.3 I can't run the backup to dics anymore.

    After upgradeing to itunes 7.3.1.3.1 I can not run the backup any more. Also the CD burning runs very slow.
    The DVD burner run ok with other software.
    After it checks for file to be backed up it kept ejecting the blank DVD and asking for a blank disc.
    I have even replaced the DVD drive with drive from another computer.I also reinstalled ITUNES once-- It ran as a repair during the install.

    I have used this same DVD Burner to backup my list from within iTunes before. I did this back in June just after I purchase 30 songs. I think I was running version 7.1 or 7.2 when the DVD backup worked. If not sopport then why does their diagnostics say DVD/CD Diagnostics. Even so I have the same problem on my other PC with a CD Burner. I think Apple support sound a little like Microsoft. I once had a problem with Windows NT and had to call MS support 5 times before they said their software had a defect and issued a patch.

  • Can we Trasfer the cost from Cacital Project to Indirect Project?

    Dear Experts,
    Can we Transfer the cost from Capital Project to Indirect Projects? and If we can Transfer what are the Limitations are there to do so?
    Thanks & Regards
    Bharath
    Edited by: 983186 on Feb 15, 2013 9:35 PM

    Hi
    Any expenditure item charged to any project could be transfered to another project, assuming the Transaction Source does not restrict the adjustment in PJC.
    When you select the expenditure item to transfer, the system creates a negative EI in the original project and another related EI in the target project.
    Distributing those transactions will credit the CIP account on the capital project and debit the expense account on the indirect project.
    Dina

  • How to run the code generator

    I urgently need to know how to run the code generator using creator. Can anyone assist? I cant find any tips in the forums.

    I am following the procedure to create a new custom component (or extend an existing component) available at http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/writing_custom_components.html.
    Part of the procedure says: you need to use the JSC to run the code generator based on sun-faces-config.xml metadata.

  • On Maverick my i cloud will not change the verification phone number even though I have change the phone number in apple and on contacts and restarted the computer. Help? I can't get the code necessary to fix the keychain.

    On Maverick my i cloud will not change the verification phone number even though I have change the phone number in apple and on contacts and restarted the computer. Help? I can't get the code necessary to fix the keychain without it.

    You can change the phone number the verification code is sent to from a device or Mac that has your iCloud keychain enabled as follows:
    In iOS 8, tap Settings > iCloud > Keychain > Advanced. In iOS 7, tap Settings > iCloud > Account > Keychain. Make sure the phone number under Verification Number is correct. If not, enter another phone number.
    In OS X Mavericks v10.9, choose Apple () > System Preferences. Click iCloud, then click Account Details. Make sure the phone number under Verification number is correct. If not, enter another phone number.
    If you don't have access to a device or Mac with your iCloud keychain enabled, you'll have to contact Apple support to verify your identity and get assistance making the change: http://www.apple.com/support/icloud/contact/.

  • How can I get the code to synchronize my Iphone 5 with my Itunes?

    how can I get the code to synchronize my Iphone 5 with Itunes?

    By code, I think you are referring to the code on your iPhone.  To sync for the 1st time with iTunes you'll need to enter the code on your iPhone to unlock it.  Typically if your phone is unlocked and then connected to your computer, it will lock itself.  Just reenter the code.  Then you should get another prompt on your iPhone to "trust" your computer so you can sync with it.

  • How can i run the example programme without hardware

    Hi,
         We are using NI-9233 for our Project. We would like to run the example programme, the NI-9233 getting started(host).vi ... I would like to ask that how can i run the Programme without Hardware.& How shall i get the input signal (simulating signal)?because we would like to test it while we are waiting for the hardware to be delivered . 
    thanks
    Best regards

    As Mike indicated , " you can use MAX to simulate some (not all) DAQmx devices. There's a NI-USB-9233 device that you can probably use. Open MAX, then expand "My System", the expand "Devices and Interfaces", then right-click on "NI-DAQmx Devices" and select "Create New NI-DAQmx Device -> NI-DAQmx Simulated Device". Select the device from the list. See the online help for MAX for further help.
    If you don't see "NI-DAQmx Devices" in MAX you need to install NI-DAQmx. You can download it from NI here. "
    hi,
         the link you gave me to download is "NI-DAQmx Devices" ... There is no software to download for Labview 8.2.1. So should i use 8.1 or 8.3 instead of 8.2.1 ? If not, can you tell me the CD no. that includes the "NI-DAQmx Devices" folder of Labview 8.2.1 version? Because we can get the cd from our school's component store. Thank you so much.
    Best Regards,
    Su

  • I have to run the code twice

    I'm running a jmf class that will register a camera(attached to the computer) and show picture from the camera. My problem is that first time i run the code i get the following error:
    "java.io.IOException: java.lang.Error: Couldn't initialize capture device
    javax.media.NoDataSourceException: Error instantiating class: com.sun.media.protocol.v4l.DataSource : java.io.IOException: java.lang.Error: Couldn't initialize
    capture device"
    but the next time i run the code everything works properly.

    ok sorry
    Here comes the code:
    //package JMF;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.media.*;
    import javax.media.format.*;
    import javax.media.protocol.*;
    //import com.sun.media.protocol.v4l.*;
    public class GetVid extends Frame implements ActionListener, ItemListener, WindowListener,
    ControllerListener {
    CaptureDeviceInfo videoCDI = null;
    String videoDeviceName = null;
    Player dualPlayer;
    Format videoFormat;
    DataSource ds; //of the capture devices
    public GetVid(String title) {
    super(title);
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent we) {
    dispose();
    MenuBar mb = new MenuBar();
    setMenuBar(mb);
    Menu menuConfigure = new Menu("Configure");
    mb.add(menuConfigure);
    Menu menuAction = new Menu("Action");
    mb.add(menuAction);
    /* menu items for Configure */
    MenuItem menuItemSetting = new MenuItem("Capture Device");
    MenuItem menuItemSetting2 = new MenuItem("Register Device");
    menuItemSetting.addActionListener(this);
    menuItemSetting2.addActionListener(this);
    menuConfigure.add(menuItemSetting);
    menuConfigure.add(menuItemSetting2);
    /* menu items for Action */
    MenuItem a1 = new MenuItem("Capture");
    a1.addActionListener(this);
    menuAction.add(a1);
    MenuItem a2 = new MenuItem("Play");
    a2.addActionListener(this);
    menuAction.add(a2);
    MenuItem a3 = new MenuItem("Stop");
    a3.addActionListener(this);
    menuAction.add(a3);
    public void actionPerformed(ActionEvent ae) {
    String command = ae.getActionCommand().toString();
    if (command.equals("Register Device")) {
    registerDevices();
    else if (command.equals("Capture Device")) {
    //registerDevices();
    captureDevices();
    else if (command.equals("Play")) {
    play();
    else if (command.equals("Capture")) {
    capture();
    else if (command.equals("Stop")) {
    stop();
    void captureDevices() {
    CaptureDeviceDialog cdDialog = new
    CaptureDeviceDialog(this, "Capture Device", true);
    cdDialog.show();
    if (!cdDialog.hasConfigurationChanged())     {
    return;
    //configuration has changed, update variables.
    videoCDI = cdDialog.getVideoDevice();
    if (videoCDI!=null) {
    videoDeviceName = videoCDI.getName();
    //Get formats selected, to be used for creating DataSource
    videoFormat = cdDialog.getVideoFormat();
    void registerDevices() {
    //V4LAuto v4la = new V4LAuto();
    CaptureDeviceInfo cdi = null;
    try {
    cdi = new com.sun.media.protocol.v4l.V4LDeviceQuery(0);
    if ( cdi != null && cdi.getFormats() != null &&
    cdi.getFormats().length > 0) {
    // Commit it to disk. Its a new device
    if (CaptureDeviceManager.addDevice(cdi)) {
    System.err.println("Added device " + cdi);
    CaptureDeviceManager.commit();
    } catch (Throwable t) {
    System.err.println(t);
    if (t instanceof ThreadDeath)
    throw (ThreadDeath)t;
    void capture() {
    if (videoCDI==null)     {
    captureDevices();
    try {
    if (!(videoCDI==null)) {
    ds = Manager.createDataSource(videoCDI.getLocator());
    dualPlayer = Manager.createPlayer(ds);
    dualPlayer.addControllerListener(this);
    dualPlayer.start();
    else
    System.out.println("CDI not found.");
    catch (Exception e) {
    System.out.println(e.toString());
    void play() {
    try {
    FileDialog fd = new FileDialog(this, "Select File", FileDialog.LOAD);
    fd.show();
    String filename = fd.getDirectory() + fd.getFile();
    dualPlayer = Manager.createPlayer(new MediaLocator("file:///" + filename));
    System.out.println("Adding controller listener");
    dualPlayer.addControllerListener(this);
    System.out.println("Starting player ...");
    dualPlayer.start();
    catch (Exception e) {
    System.out.println(e.toString());
    void stop() {
    if (dualPlayer!=null) {
    dualPlayer.stop();
    dualPlayer.deallocate();
    public synchronized void controllerUpdate(ControllerEvent event) {
    System.out.println(event.toString());
    if (event instanceof RealizeCompleteEvent) {
    Component comp;
    System.out.println("Adding visual component");
    if ((comp = dualPlayer.getVisualComponent()) != null)
    add ("Center", comp);
    System.out.println("Adding control panel");
    if ((comp = dualPlayer.getControlPanelComponent()) != null)
    add("South", comp);
    validate();
    public void itemStateChanged(ItemEvent ie) {}
    public void windowActivated(WindowEvent we) {}
    public void windowClosed(WindowEvent we) {}
    public void windowClosing(WindowEvent we) {}
    public void windowDeactivated(WindowEvent we) {}
    public void windowDeiconified(WindowEvent we) {}
    public void windowIconified(WindowEvent we) {}
    public void windowOpened(WindowEvent we) {}
    public static void main(String[] argv) {
    GetVid myFrame = new GetVid("Java Media Framework Project");
    myFrame.show();
    myFrame.setSize(300, 300);

  • I created an application on a machine with Labview 6.01, can I run this application on another machine that has labview 5?

    In the development center we use Labview 6.01, in the testcenter we use labview 5.
    Additionally, in the development center we use a unix version of Labview and in the testcenter a Windows version.

    You can Save with Option to save VIs as version 5.
    Unless your VIs deal with system files in UNIX or Windows (ie. Registry...)
    then you have to develop your VI specificly on that OS, since UNIX and
    Windows have different ways to deal with system files. Mostly, LabVIEW is OS
    independent. I used to have VIs developed from LabVIEW v.3 on UNIX, I can
    still open these files from LV v.4 on Windows. Now I can still work with
    these VIs on LV 6 on Windows.
    Good luck,
    Nam.
    roybra wrote in message
    news:[email protected]..
    > I created an application on a machine with Labview 6.01, can I run
    > this application on another machine that has labview 5?
    >
    > In the development center we use Labview 6.01, in the testcenter we
    > use l
    abview 5.
    >
    > Additionally, in the development center we use a unix version of
    > Labview and in the testcenter a Windows version.

  • How can i run the java bean sample program download from OTN

    hello to all
    i have a p[roblem. i have downloaded the sample progam from oracle web site which is a java code that connect with the oracle and shows a form. how can i run the from.
    can any body help me pleaSEEE
    thanks
    kamran ahmed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi Darryl.Burke
    So your telling, we cannot run our Java Program when system shutdowns...In my application, when user has schedule for next days and he shutdown his PC. On the next day when System Started i should able to get back my schedule on the Specified time(I'm TimerTask class in Java)... How can i achieve this using Java? can u tell me clearly..

  • HT1349 I can not run the scanner in my main user, but only the second user and the same thing with updating apps! Why is this happening???

    I can not run the scanner in my main user, but only the second user and the same thing with updating apps! Why is this happening???

    Welcome to the Apple Community.
    Enter the details of her second account at system preferences> mail, contacts & calendars.

Maybe you are looking for

  • Phone not working after update

    Hi,i have 2 phones Sony Xperia T. Soon after my updates both phones go off when i try do something like :GPS,Map,using the camera,listening music and etc.I've send both phones to repair center in Ashford for Sony and still don't know what is wrong wi

  • Problem with Main Data !

    Hi abapers, iam facing a strange problem with smartform main window with my line items data while Calculating. my requirement is if the form is more than two pages i have to display two totals i,e is PREV_TOT & SUBTOTAL from second page onwards. if t

  • Lost purchased songs, etc!!!!

    I had to restore factory settings and I lost all my purchased songs and apps. How do I recover them???  Please I need HELP!! It was a lot of money wasted if I can't recover them!!!!

  • SBO_TransactionNotification and Incoming Payments

    Hello, I need to know the @object_type for Incoming Payments. What I need is to Have SBO_TransactionNotification grab all an incoming payments.  I need to check if the payment was cash, check or credit and apply certain rules depending of the method

  • Multiple Range Selection for field Material in CS14

    Hi friends , Is it possible to make multiple range selection for material field in tcode CS14 [used to compare primary and secondary BOM] i have made it ZCS14. if i make matnr2 to matnr2-low but my doubt is it feasible solution please through some li