Non-GUI Forte

"Keith Patterson" <[email protected]> wrote:
<snip!>
... I would like to create several 'batch' Forte programs that perform
a select all from our tables at random intervals during our testing.
Has anyone done this sort of thing?? I'm not even sure how to start
building an app that I don't want any output from and any assistance
would be sincerely appreciated. You're going to be embarassed at how easy it is. At least, I was! ;-)
Assuming that you want is to kick a couple batch, detached, daemon, or
whatever processes to bang on your database, what you need to do is:
* Create a new project. Give this project, as contributors, all the
projects needed to get the functionality you want to test.
* In this new project, create a NON-GUI object with a method that
actually performs the test you want. Make this the initial
object/method for the project.
* Make distribution on this project.
* Run your project, applying the -fcons, -fnw, and/or -fterm qualifiers
as necessary.
If you want to force the action through the same Forte service objects
(rather than just copies of them), the above WILL NOT do what you want.
In theory you can get that with the above setup by putting the SOs in a
"reference partition" (I believe that's the term), but I have no actual
experience at that.
Alternatively, you could simply put a "test" button somewhere in your
app, that creates a new instance of the test object, and does a "start
task" on the relevant method. This is not, strictly speaking, a "batch"
run, but you also don't have to make distribution to do it.
Tom Wyant
E. I. DuPont de Nemours
Richmond, VA USA

If you upgrade to 1.5 it's a little easier, for instance reading a word and then an integer is this simple:    Scanner s=Scanner.create(System.in);
    String param= s.next();
    int value=s.nextInt();For further information see
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html
http://java.sun.com/developer/technicalArticles/releases/j2se15/

Similar Messages

  • Event handling in custom Non-GUI components

    I have a class which needs to fire events to outside. These events maybe captured by several objects in outside world. How can I achieve this? In so many places I read, they always refer to AWT and Swing whereas my objects don't have any dependency to GUI.
    I simply need to fire an event from an object, and capture that event from other objects by registering event handlers.
    I have experience in .Net programming with Events and Delegates (function pointers), but cannot find something like that in Java. All it offers is various kinds of GUI related Listeners where I can't find a proper help resource using them in Non-GUI components.

    ravinsp wrote:
    I have a class which needs to fire events to outside. These events maybe captured by several objects in outside world. How can I achieve this? In so many places I read, they always refer to AWT and Swing whereas my objects don't have any dependency to GUI.
    I simply need to fire an event from an object, and capture that event from other objects by registering event handlers.
    I have experience in .Net programming with Events and Delegates (function pointers), but cannot find something like that in Java. All it offers is various kinds of GUI related Listeners where I can't find a proper help resource using them in Non-GUI components.If you want to make your own Listener make your Listener. Create an event class that encapsulates the event as you want, create a listener interface that has a method like handleMyEvent(MyEvent me) and then add addMyEventListener, removeMyEventListener methods to your original class. Add a List<MyEvent> to your original class and add the listeners to it and then when events happen
    MyEvent someEvent = new MyEvent();
    for(MyEventListener mel : eventlisteners)
       mel.handleMyEvent(someEvent);

  • How to start TestStand ApplicationMgr in a NON-GUI C# modules

    hello all,
    We used to implement our test UI in C# windows form. We put ApplicationMgr ActiveX control on the form and the ApplicationMgr can be easily accessed and started.
    Now we need to implement the UI in WPF and we have to seperate the UI and the Test Engine into different module so that the UI can call different type of Test Engines later. Therefore we have to implement the TestStand TestEngine module in a NON-GUI module. In this module we need to load a sequence file, run the sequnece file, collect test results and send back to UI to display.
    To implement this module we have a lot of questions:
    1. Is ApplicationMgr a must-have for our purpose of loading, running sequence and getting test results?
    2. Can AppliactionMgr be created in a NON-GUI module?
    3. Can we use
    NationalInstruments.TestStand.Interop.UI.Applicati
    onMgr myApplicationMgr = new NationalInstruments.TestStand.Interop.UI.ApplicationMgr();
    myApplicationMgr.Start()
    to create and start the ApplicationMgr? We have tried, but unfortunately it is not working. What did we miss?
    4. Is the ActiveX control the only way to access the ApplicationMgr? For NON-GUI module, there must be a way that we didn't find yet. Anyone have help us point to a right direction? If some example code would be great!
    Thank you very much!
    Regards,

    The ApplicationMgr makes a lot of things simpler, so I highly recommend you use it even if you aren't displaying a UI with it. You can create the control on a hidden form as follows (assuming your thread is an STA thread):
    System.Windows.Forms.Form hiddenForm = new System.Windows.Forms.Form();
    NationalInstruments.TestStand.Interop.UI.Ax.AxApplicationMgr appMgr = new NationalInstruments.TestStand.Interop.UI.Ax.AxApplicationMgr();
    ((System.ComponentModel.ISupportInitialize)(appMgr)).BeginInit();
    hiddenForm.Controls.Add(appMgr);
    ((System.ComponentModel.ISupportInitialize)(appMgr)).EndInit();
    This way you can use the ApplicationMgr without showing anything to the user.
    Hope this helps,
    -Doug

  • Oracle 11g client installation on Solaris in non GUI mode

    Hi,
    I want to know if there is a way i can install Oracle 11g client on Solaris 10 machine in non GUI mode (ie. i want to do it from a command based terminal)
    Thanks
    Anup

    Hi Anup
    You have two ways to install it
    1) Client installation without response file
    Please Refer to Doc ID 885643.1
    2) With Response file
    Refer to the document available in Document library
    Document Oracle® Database Client Installation Guide
    11g Release 2 (11.2) for Solaris Operating System
    Note: from 11gR2 onwards you can create a response file from GUI also and then use it later on for silent installation.
    Hope this is helpful for You
    Regards
    Sudhir
    Edited by: user13090769 on Sep 1, 2010 10:55 AM
    Edited by: user13090769 on Sep 1, 2010 10:56 AM

  • Non-GUI events in Java

    I was wondering how I would have to go about writing an event handling mechanism on something that is not GUI-based (non-AWT/SWING)!
    Supposing one wanted to write an event listener that would tell them when a data structure is updated - e.g: in a typical producer-consumer model, where the consumer is to be notified of fresh entries whenever a producer writes integers to some data structure...
    Does Java have classes/methods to handle such non-GUI-based 'events'? Is this a commonly found scenario in Java programming?
    Thank you!

    What you're looking for is the Observer-interface. Check out http://java.sun.com/j2se/1.4/docs/api/java/util/Observer.html
    and
    http://java.sun.com/j2se/1.4/docs/api/java/util/Observable.html

  • How to run an iPhone non-GUI application in background

    Hi All,
    While looking into the web fouond that only one application can be run at a time in iPhone. So is there any way or work around to run a non-GUI app in iPhone in Background.
    This app will continuously query certain requests to iPhone regardign some internal iPhone events.
    Thanks in advance.
    Regards.
    Amit

    No.

  • Need help writing non-gui JMF program

    I need to write a program that will convert a WAV file from a ULAW format to a GSM WAV file format. I first tried this with the Java Sound API and the WAV file format of GSM was not supported so I stumbled across JMF.
    I can use the JMStudio and Export GUI programs that come with JMF to convert the wav file as needed. But now I'm trying to write a batch program (non-gui) to convert the file on the fly.
    First, is this possible. Second, does anyone have any code samples of a batch java program using JMF in batch.
    Thanks,
    Scott

    Not exactly what I was looking for. After 2 days of beating my head against the wall this is what I got to work. Include the jmf.jar in my project. Here is my code.
    import java.io.IOException;
    import javax.media.DataSink;
    import javax.media.Manager;
    import javax.media.MediaLocator;
    import javax.media.NoDataSourceException;
    import javax.media.Processor;
    import javax.media.control.TrackControl;
    import javax.media.format.AudioFormat;
    import javax.media.protocol.DataSource;
    import javax.media.protocol.FileTypeDescriptor;
    import jmapps.util.StateHelper;
    public class TestAudio5 {
         public static void main(String[] args) {
              try {
                   Processor p = null;
                   StateHelper sh = null;
                   DataSource inSource = Manager.createDataSource(
                             new MediaLocator("file:c:\\ASSURANCE_THREE_MINUTE.wav"));
                   p = Manager.createProcessor(inSource);
                   sh = new StateHelper(p);
    //               Configure the processor
                   if (!sh.configure(10000)) {
                             System.out.println("can't configure");
                        System.exit(-1);
                   p.setContentDescriptor(new
                                       FileTypeDescriptor(FileTypeDescriptor.WAVE));
                   //AudioFormat(java.lang.String encoding, double sampleRate, int sampleSizeInBits, int channels)
                   //AudioFormat(
                   //          java.lang.String encoding,
                   //          double sampleRate,
                   //          int sampleSizeInBits,
                   //          int channels,
                   //          int endian,
                   //          int signed,
                   //          int frameSizeInBits,
                   //          double frameRate,
                   //          java.lang.Class dataType)
                   AudioFormat outputFormat = new javax.media.format.AudioFormat(
                                            AudioFormat.GSM_MS,
                                            8000.0,
                                            0,
                                            1,
                                            0,
                                            1,
                                            520,
                                            1625.0,
                                            null);
                   System.out.println("outputFormat: " + outputFormat.toString());
                   TrackControl tc[] = p.getTrackControls();
                   for ( int i = 0; i < tc.length; i++ ) {
                        tc.setEnabled(true);
                        System.out.println("before format: " + tc[i].getFormat().toString());
                        tc[i].setFormat(outputFormat);
                        System.out.println("after format: " + tc[i].getFormat().toString());
                   if (!sh.realize(10000)) {
                                       System.out.println("can't realize");
                                       System.exit(-1);
                   // get the output of the processor
                   DataSource source = p.getDataOutput();
                   // create a File protocol MediaLocator with the location
                   // of the file to which bits are to be written
                   MediaLocator dest = new MediaLocator("file://c:\\test.wav");
                   // create a datasink to do the file writing & open the
                   // sink to make sure we can write to it.
                   DataSink filewriter = null;
                   filewriter = Manager.createDataSink(source, dest);
                   filewriter.open();
                   // now start the filewriter and processor
                   filewriter.start();
                   sh.playToEndOfMedia(5000);
                   sh.close();
                   filewriter.close();
              } catch (NoDataSourceException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              catch (Exception e) {
                             // TODO Auto-generated catch block
                   e.printStackTrace();
              System.out.println("done!");
              System.exit(-1);

  • Non GUI alternative to PB10 Transaction (infpotypes 22 and 24)

    Hi guys,
    This is a java foreigner in the ABAP land.
    I hope I am asking the correct question.
    This is the situation:
    In order to send a "candidates resume" (curriculum) in to SAP, the ABAP developers made for me a RFC which uses the transaction PB10 (applicant master data).
    The RFC when tested in the SAP GUI works fine.
    I wrote a java client which calls the RFC, send the parameters and expect the results. This client uses JCO to access SAP.
    But, from the java client the RFC works PARTIALLY,
    it doesnt fill the education a qualifications (infotypes 22 and 24), and throws error message:
    "Exception condition "CNTL_ERROR" raised"
    It seem there is an GUI missed, but from JCO I cannot use GUI.
    So, I need a non-GUI alternative transaction to the PB10, which writes the data in the infotype 22 and 24.
    So, the question here is:
    Does somebody knows a non-GUI alternative to the PB10 in order to write the infotypes 22 and 24??
    Thanks in advance,
    Luis

    i do have a similar requirement ... from non sap system i am suppose to pass data which saves in table connected to pb10..can you send the RFC developed for your requirement.. it would be helpful for me..
    thank you

  • Non GUI input

    Hello again world.
    I see that to produce output in a non-GUI environment, one uses
    System.out.println(output)
    I can't seem to get the other side of the coin for input.
    As usual, thanx in advance.

    If you upgrade to 1.5 it's a little easier, for instance reading a word and then an integer is this simple:    Scanner s=Scanner.create(System.in);
        String param= s.next();
        int value=s.nextInt();For further information see
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html
    http://java.sun.com/developer/technicalArticles/releases/j2se15/

  • Javafx for console (non-gui) applications?

    Hi,
    I am interested in using the JavaFX scripting language as a general purpose language to create console (non-gui) applications. But even running the following simple program seems to initiate some sort of GUI that quickly appears and disappears. Is there anyway to run a JavaFX script in "console-only" mode?
    function run(args : String[]) {
      println("hello")
    }Thanks.

    Hi,
    Yeah, that is pretty much exactly what I did.
    I am running on Mac OS X 10.5.6, with Java 1.6.0_07 and JavaFX 1.1.0.
    When I execute the program from Terminal, everything works, however a new application appears in the menu bar while the program is executing in the console. For example, if I add a java.lang.Thread.sleep(5000) invocation to the program mentioned earlier, you will see the application in the menu bar for 5 seconds. This is not the way a normal console-based java application typically works... there should be no application in the menu bar.
    Thanks.

  • Listen for keys in non-GUI app?

    Is there a way for a non-gui application that runs in a dos-box to receive key strokes? i read about the CTRL-C shutdown hook, but i don't want to shutdown my app but just send them some key combination so that it print something to System.out. Is this possible?

    You could try jcurses or a similar library...
    http://sourceforge.net/projects/javacurses/

  • Using Xcode for non-gui C++

    I originally posted this in the wrong place, and I was told to post in here.
    I am learning standard c++ in school, and we're programming with Microsoft visual Studio on PCs. I wanted to work on my projects at home, but I don't know how to create and build non-gui C++ projects. Anyone know?

    we're programming with Microsoft visual Studio on PCs
    If you want something like "Visual Studio" on Mac, then you can use the "Xcode" application in /Developer/Applications/. (I assume you have installed Xcode Tools, which is in your Leopard DVD).
    Start Xcode, and select "New Project..." from the "File" menu. In the Assistant dialog, open "Command Line Utility" and select "C++ Tool". Enter the name of the project and where to save it, and push Finish. Double click on "main.cpp", edit it, save (cmd-S), and push "Build" or "Build and Run". Is this what you want?
    Of course the project file is not comatible with Visual Studio, but you can copy the source files (*.cpp and *.h) to Windows PCs.
    If you prefer to run C++ compiler from the command line (rather than to use Xcode application), then just open Terminal.app (in /Applications/Utilities/), cd to the directory where the source files are, and try typing "g++ xxxx.cpp".

  • GUI Exception while installing IdM 6.0 in non GUI mode

    I am trying to upgrade IdM from 5.5 to 6.0 using command "./install -nodisplay" on a unix console.
    bash-prompt$ ./install -nodisplay
    The installation goes through fine with pre process and installation. However, during the post-process it throws an exception when trying to invoke a GUI interface. The exception is at the bottom of this message. It seems that the "nodisplay" option doesn't seem to work and using a remote Xwindows session is not an option due to business and security reasons.
    Does anyone know if there is a way around this where I can run the upgrade without ever invoking a GUI? Please let me know. Any direction would be quite helpful at this point.
    Thank you
    A
    Exception duirng installation post process
    2006-xx-xxT17:13:30.361-0400 ========= Importing '/...../sample/update.xml'
    2006-xx-xxT17:13:30.807-0400 Caught exception: java.lang.NoClassDefFoundError
    2006-xx-xxT17:13:30.812-0400 java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:141)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
    at java.awt.Font.initializeFont(Font.java:308)
    at java.awt.Font.<init>(Font.java:344)
    at javax.swing.plaf.metal.DefaultMetalTheme$FontDelegate.getFont(DefaultMetalTheme.java:195)
    at javax.swing.plaf.metal.DefaultMetalTheme.getFont(DefaultMetalTheme.java:153)
    at javax.swing.plaf.metal.DefaultMetalTheme.getUserTextFont(DefaultMetalTheme.java:137)
    at javax.swing.plaf.metal.MetalLookAndFeel$FontActiveValue.createValue(MetalLookAndFeel.java:1405)
    at javax.swing.UIDefaults.getFromHashtable(UIDefaults.java:199)
    at javax.swing.UIDefaults.get(UIDefaults.java:129)
    at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:44)
    at javax.swing.UIDefaults.getFont(UIDefaults.java:349)
    at javax.swing.UIManager.getFont(UIManager.java:491)
    at javax.swing.plaf.basic.BasicTextUI.installDefaults(BasicTextUI.java:216)
    at javax.swing.plaf.basic.BasicTextUI.installUI(BasicTextUI.java:674)
    at javax.swing.JComponent.setUI(JComponent.java:449)
    at javax.swing.text.JTextComponent.setUI(JTextComponent.java:287)
    at javax.swing.text.JTextComponent.updateUI(JTextComponent.java:297)
    at javax.swing.text.JTextComponent.<init>(JTextComponent.java:271)
    at javax.swing.JTextArea.<init>(JTextArea.java:186)
    at javax.swing.JTextArea.<init>(JTextArea.java:122)
    at com.waveset.install.UpgradeProcessProgressPanel.getTextArea(UpgradeProcessProgressPanel.java:196)
    at com.waveset.install.ProgressPanelAdapter.getWriter(ProgressPanelAdapter.java:58)
    at com.waveset.install.UpgradePostProcess.importUpdateXml(UpgradePostProcess.java:737)
    at com.waveset.install.UpgradePostProcess.doUpgrade(UpgradePostProcess.java:526)
    at com.waveset.install.UpgradePostProcess.install(UpgradePostProcess.java:490)
    at com.waveset.install.UpgradeProcessProgressPanel.run(UpgradeProcessProgressPanel.java:333)
    at com.waveset.install.UpgradeProcessProgressPanel.consoleInteraction(UpgradeProcessProgressPanel.java:149)
    at com.waveset.install.UpgradePostProcessProgressPanel.consoleInteraction(UpgradePostProcessProgressPanel.java:48)
    at com.sun.wizards.core.IteratorLayout.cliConsoleInteraction(IteratorLayout.java:806)
    at com.sun.wizards.core.AutonextController.displayPanel(AutonextController.java:561)
    at com.sun.wizards.core.AutonextController.setCurrentPanel(AutonextController.java:485)
    at com.sun.wizards.core.IteratorLayout.setCurrentLeaf(IteratorLayout.java:639)
    at com.sun.wizards.core.IteratorLayout.next(IteratorLayout.java:1007)
    at com.sun.wizards.core.WizardTreeManager.actualNextButtonPressed(WizardTreeManager.java:1308)
    at com.sun.wizards.core.WizardTreeManager.nextButtonPressed(WizardTreeManager.java:1341)
    at com.sun.setup.panels.common.ProgressPanel.sequenceComplete(ProgressPanel.java:540)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.wizards.core.WizardTreeManager.callObjectMethod(WizardTreeManager.java:2377)
    at com.sun.wizards.core.WizardTreeManager.callClientObjectMethod(WizardTreeManager.java:2209)
    at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.wizards.core.ArchiveReader.callObjectMethod(ArchiveReader.java:1404)
    at com.sun.wizards.core.GenericWizardState.callClientObjectMethod(GenericWizardState.java:2827)
    at com.sun.wizards.core.Sequence.callSequenceCompleteMethod(Sequence.java:272)
    at com.sun.wizards.core.Sequence.perform(Sequence.java:364)
    at com.sun.wizards.core.SequenceManager.run(SequenceManager.java:226)
    at java.lang.Thread.run(Thread.java:534)

    [My first ever post...]
    I came across much the same problem upgrading from v5.0. In my case the cause was a non-default Configurator password, and then the inability to provide the actual password because the pop-up XWindow has no 'okay' button.
    From memory I encountered the class error you are seeing when I unset my DISPLAY env var (this is on a Solaris + AS7 install).
    The fix was to restore the default password; nothing else would work. But of course if you've upgraded your database already, then you don't really have the option of using the IdM v5.0/v5.5 install to edit Configurator directly.
    For me I found that I could use the v6.0 bin/lh console, logging in as Configurator via the command line and then importing an exchange file with Configurator set to the default password value (I obtained this string from an old dev machine). Of course bin/lh console assumes the default Configurator password as well, but this time unsetting DISPLAY allowed me to just enter the actual value from the command line.
    Laborious process but it worked. I then just ran sample/update.xml and everything was back on track...

  • For fellow linux users: non-GUI handbrake command

    hey there fellow linux users... if you happen to have a new video ipod and happen to have handbrake and happen to not want to use the GUI, or it doesnt work... your in luck!
    just enter this command:
    ./HBTest -vb 450 -w 320 -i /mnt/LodeStar/10/DVD -o gladiator.mp4
    here i have a dvd drive on windows mounted.
    to mount a network dvd drive on windows, type mount //compname/dvdsharename /mnt/mountdir
    so that command above means -vb video bitrate -w width -i inputfile -o outputfile... type ./HBTest --help to see more options.
    please post if you found this helpful!
    (i want to know if other linux users like this sorta thing or if i should keep these to myself)

    Hi. You might find this hopeful. You can search for related topics online like in Google: http://linux.about.com/od/commands/l/blcmdl1_curl.htm

  • Swing component fires an event to non-GUI code

    Hi all -- this is my first post in forums.sun.com.
    Question to get me started -
    I have a Swing component that fires an ActionEvent. I would like that ActionEvent to trigger code that does not run on the AWT Event Queue thread (some code that will take some time without impacting GUI rendering performance.)
    I know I could put that Event's action command into a synchronized Queue, and have a worker thread checking the queue and taking action when it finds a command there. Likewise, I could flag a volatile boolean as true, and have a worker thread check the flag and take action when true.
    Or (and I suspect this is best), I could create a new SwingWorker thread right in actionPerformed().
    Any opinions on what makes sense?

    pkwooster: Yep. That's what I meant.
    As for the design pattern, Observer was the pattern I was intending to use (and have already implemented). Would anyone argue that another method is more efficient or "correct"?
    My sample project is:
    Business Object -> Main Dialog -> Embedded Dialog
    The Main Dialog contains no business logic - just simple navigation events. The Embedded Dialog contains the real controls and reports any interaction using Swing events, which the Main Dialog picks up.
    I then set up the Observer pattern between the Main Dialog and the Business Object.

Maybe you are looking for

  • My iPod insists that I have no more free space when I have 10 gigs left. Help?

    After a whole slew of problems with iTunes today, including trying to get me to reset my iPod to its factory setting, getting the 42408, and it trying to delete all my apps, I am now faced with the problem of it telling me I am going over my itunes l

  • SSD in Bios and can be used as storage but not as general drive

    Hello I need some help and was pointed here by another MS Forum. The following is where I am at so far: Hello, I need some help. I have bought a SanDisk SSD and intalled it into my PC with the hope I could go from HDD to SSD but although the BIOS app

  • Apple cost of replacing water damaged iphone 4s

    I recently dropped my iphone 4s 16gb in the toilet and is now destroyed. Will apple do an out of warranty exchange and for how much

  • How do I get my android to sync?

    "manage my sync account" comes close, but I don't have a recovery key, can't get the phone to sync with the desktop, and there is nothing in the forum that addresses this issue specifically: I get the 12-digit code from the phone. I enter it into the

  • WSSERVLET11: failed to parse runtime descriptor

    Hi All Your help will be appriciated. I have created a simple hello world program. Interface: @WebService(name="HelloWorldPort",serviceName="HelloWorld" ) @SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL) public interface He