Simple webservise with terminal

can anyone point to a simple exmple of web-services that uses a terminal?
public static void main(String args[])
thanks

zergu wrote:pacman -S yakuake?
madhatter wrote:I wrote it because I don't like the available standalone solutions
bender02 wrote:I need to put "sleep 1" after running the terminal and before calling wmctrl, since otherwise when wmctrl is called, the window doesn't exist yet.
Ah, didn't thought about that - my PC is too fast
bender02 wrote:The second thing is more serious: the window manager (tried with kwin and e16) seems to ignore the hidden flag - the window never hides.
Maybe they don't support that, I don't know how much they are EWMH compatible - works with openbox though

Similar Messages

  • Java mysql OK with Terminal but not OK with Apache local web server

    With terminal I have :
    CLASSPATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/:/Library/Java/Extensions/:./
    SUDO_GID=20
    SECURITYSESSIONID=210800
    _=/usr/bin/printenv
    127:/Library/WebServer/Documents/Java root# java TestMySQL
    2006-05-21 13:39:00.0 ************************************************** = OK
    127:/Library/WebServer/Documents/Java root#
    import java.sql.*;
    * mysql-connector-java-3.1.12-bin.jar
    *   % javac /Library/WebServer/Documents/Java/TestMySQL.java
    *   % java TestMySQL
    public class TestMySQL {
            public static void main(String argv[]) throws Exception {
                    // Load the driver class
                    Class.forName("org.gjt.mm.mysql.Driver");
    1                //Class theClass = null;
    2               //try {
    3                //    theClass = Thread.currentThread().getContextClassLoader().loadClass("org.gjt.mm.mysql.Driver");
    4                //}
    5                //catch (ClassNotFoundException e) {
    6                //    theClass = getClass().getClassLoader().loadClass("org.gjt.mm.mysql.Driver");
    7                //}
                    Connection conn = DriverManager.getConnection(
                            "jdbc:mysql:///test",
                    Statement stmt = conn.createStatement();
                    ResultSet rset = stmt.executeQuery("SELECT now();");
                    while (rset.next()) {
                            System.out.println(rset.getString(1));
                    // Close result set, statement and DB connection
                    rset.close();
                    stmt.close();
                    conn.close();
    }I have a simple TestMySQL.html file with applet TestMySQL.class in it.
    Nothing but "Applet TestMySQL not inited"
    When I uncomment the try/catch lines (lines 1 to 7) , java compiler generate an error... near getClass().getClassLoader().loadClass("org.gjt.mm.mysql.Driver");
    With "Class.forName("org.gjt.mm.mysql.Driver");" no problem.
    Running MacOS X 10.3.9, Apache/1.3.33 (Darwin) PHP/4.4.1 mod_ssl/2.8.24 OpenSSL/0.9.7i and JVM 1.4.2_09
    Thanks for help.
    P.S. This my first approach to java/mysql but I would like to see this short program running on my local web server ...
    Thanks.

    hi :-)
    can you post the stack trace?
    im not sure what is causing the error because of less info,
    but have you tried to copy the driver of mysql to tomcat lib folder?
    regards,

  • Issue with Terminating Event - Reg

    hi Gurus,
    This might be a simple issue, but am not getting hold on a simple solution for my issue.
    I'm working on ECC 6.0.
    I have a custom workflow in which I have step1(A dialog task - Asynch) with a terminating event "COMPLETED" and then step 2 (A background task). once step1 is completed by user A, i am sending this WIACTUAL_AGENT to the step 2 in modifying some custom table data.
    My issue is if user A finished the task(step 1) manually, then also the Term. event COMPLETED is getting triggered and hence the work item in user A's Inbox is disappearing. And then it's picking up user A as WIACTUAL_AGENT and sending to step 2. But, i need to distinguish or some how find out if the Termin. event occurred thru' execution of the workitem or manually performing the job. I looked into the workflow log for both the cases, and i don't find any clue with which i can differentiate that the Termin. event occurred thru' executing witem Vs. performing manually.
    Anybody has any idea on how to find this out. Coz, depending on whether the action is done manually or thru' witem, i 'll be modifying the custom table data accordingly. Currently, for both the cases, when the Term. event occurs, the WIACTUAL_AGENT is same user A and hence it always is treating that the action is done thru' witem only, even though its done manually. This is because, when executed manually also, the step1 witem is ending with container element WIACTUAL_AGENT filled with user A and hence its proceeding with background task in step 2.
    Any thoughts on how to tackle this issue. Your suggestions / input is really appreciated.
    Thank you in advance. Pl let m

    Hi Venu,
    I have quickly created a sample workflow in my system.
    Here is what I did:
    1) Workflow will tigger to my inbox whenever Change master is created.
    2) Created a custom task with object type ECM and method 'EDIT' with termination event 'Deleted'.
    3) created fork step type with 2 branches and necessary branches 01.
    4) one branch will execute  the task created above
    5) another branch will wait for the event "Deleted" of ECM
    6) I have created a container element flag ( of type XFELD ).
    7) In the wait event binding I am passing X to worklfow container element flag.
    7) I have created change master from transaction CC01.
    8) Received the worklfow and deleted the document via worklfow.
    9) I checked the worklfow log and found that the flag container element is not populated
    10) I have created one more change master from transaction CC01.
    11) Received the worklfow but deleted the document outside the workflow.
    12) I checked the worklfow log and found that the flag container element is populated with 'X' this time.
    I think you can use that flag to differntiate whether the transaction was done outside worklfow or within the workflow.
    Hope this helps.
    Thanks.
    Krishna.

  • Problem with Terminal on launch

    All right, I guess this best fits into UNIX discussions, though it's more of a problem with the terminal itself.
    Recently, I wrote a relatively simple application with Xcode. I wanted to see the output of the app, and since I was too lazy to open up Xcode or browse around for the file and I knew that I only had to use the up arrow in terminal to launch it, that being the last command, I did so. Everything worked as expected. Until the next launch of terminal, that is.
    When I next launched, Terminal seemed to have automatically entered that command. As a result, the app executed immediately without any input from me, and then Terminal displayed Process Completed. I relaunched. Same thing. I used shiftcmdn to enter a new command. I did only cd, hoping that it at least wouldn't bother to display the application's output (rather long) on next launch. So now, when I launch terminal, it immediately enters "cd; exit".
    What I see is exactly as follows:
    Last login: (Date) (time) on ttyp1
    cd; exit (this is sporadic. It's sometimes here, and sometimes...not.)
    Welcome to Darwin!
    benls-computer-2:~ benl$ cd; exit
    logout
    [[Process completed]]
    Again, this all happens immediately without any input from me.
    I can't really do anything useful in terminal at present. I've tried opening new terminal windows, relaunching, logging out and in, rebooting, resetting, ctrl-c...the works, and I don't know what else to try.
    Any suggestions?
    Message was edited by: Benjamin Lehmann

    This is common? How does it happen?
    I don't recall exactly how it happens - something to so with how you launch the app, or save a window setting or something. What I do know is that if you search these (and other) boards you'll find a lot of people reporting the same thing - of course 'a lot' is a relative term, but it happens often enough that I knew the solution even though I've never been affected myself, either.

  • Allow a simple form with "data" to be saved by the user.

    Back in version -x, it used to be so simple.  You created a form that could be read in a web browser.  Users could could fill out the form and save the form to their computers with their data.  Since that first version that allowed that, Acrobat has not progressed in logical fashion.  In a later version, you couldn't save the data.  Then in another version, you could again save the data.  Now you have some nice interactive features. I appreciate the new developments and see where they could be a godsend.  However, the simple thing that I used to be able to do in version -x, and the thing I most want to do,  I can no longer do and it is frustrating.
    Here's the situation:  we have an announcement on the web for Vacation Bible School.  We want to have a pdf with a form that people can fill out online and save to their disk (as their copy of the registration form) and then print out one copy of the form so that they can send it along with their check for the registration fee.  Why should that be so difficult?
    If it weren't for the fact that people have to send in checks, one of the fancy new options would work.  But it is not applicable in this situation.
    Here are my current options:
    I can "distribute" an emailable form (which I don't want to do) and then explain to the user that they should not hit the "submit" button but save the file to their disk.  (First rule of public relations - Don't confuse the public!)  It works in the last version of REader 8+ and in Reader 9.
    I can save the form without distributing it. But the user can't save it with the data!
    Please, PLEASE, PLEASE.  Allow a simple form with "data" to be saved by the user.
    Peace and blessings
    Barbara

    Thanks for a quick response.
    In Acrobat *8 or 9 Professional you can enable a form to be activated with the save feature.
    How do you do this.  When I saved the form without distributing it, and opened the form up in Acrobat Reader, the header said specifically that the data could not be saved in the form.  And when I went to save it, I got the message in a popup that said "Data in this form will not be saved. Reader can only save a blank copy of this form."  Then a second message (with a light bulb) said:  "Please print your completed form if you would like a copy for your records."
    So, if in fact I can have the form (without "distributing" it) so that the user can save the form with the data, how do I do that?  Are there commands I use, options?  Please let me know.  I will be eternally grateful.
    Also, if you edit form fields, you may remove the submit button.
    The edit form fields does not offer any access to the submit button.
    Best,
    Barbara

  • How to reset password with Terminal?

    I've just had a new HD fitted and rebooted my system from time machine, the password to access my user account does not seem to work any more. I've been advised that the thing to do is to reset it with 'terminal'
    Can anyone help me wi this?

    This is how for Snow Leopard, which is what your profile says you have:
    http://support.apple.com/kb/ht1274

  • Out your mac to sleep with terminal

    Hi I just configure my OS X Server 10.4. Now I can connect on it over ssh. How can I put it to sleep with terminal.
    thx

    Use this command:
    osascript -e 'tell application "System Events" to sleep'
    Hope this helps...

  • A simple list with seven time buckets starting from the date report is run.

    Hi All,
    I am new to ABAP.Recently i have planned to write a progam which will help in planning the delivery of scheduled items.For a given sales Org. it will display all the undelivered,delivered items in a simple list and sort them with delivery dates.it will also provide a summary report at material group.For that i have used selection screen(LIKP-VKORG-Obligatory).when i enter VKORG Details i should get all the delivery docs for which delivery is not done or partially done.For this i have taken one more table LIPS
    (LIPS-MATKL,LIPS-MATNR,LIPS-VBELN,LIPS-POSNR,LIPS-WERKS,LIPS-LFIMG,LIPS-MEINS) for tables LIKP and LIPS VBELN is the key field.when i enter VKORG Data in the selection screen ,how can i get the data from LIPS Table.Please explain?
    Also report should be simple list with seven time buckets starting from the date when the report is run.The amount of quantity to be delivered should be displayed under appropriate bucket i.e within the bucket where its delivery date falls in.for ex:If the report is run on Tuesday 15th march 2010 then the start date 1 should be starting date of the week which is Monday 14th March.
    The report will be summarized at Material Group and Material Number.
    Appreciate your help
    Thanks and Regards,
    Shakeer Hussain

    Sorry, sounds too much like a complete requirement you want done for you by the community.
    Please work on it yourself and search for available information before posting specific problems only.
    Thread locked.
    Thomas

  • On Yosemite, pasteboard/clipboard no longer works with Terminal.

    After upgrading to Yosemite, I can no longer copy text from other apps and then paste into Terminal. Nor can I drag a file from Finder to Terminal and get its path shown. With Terminal, clipboard/pasteboard now only works within its own sandbox.
    Am I missing any new default options?

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Please take this step regardless of the results of Step 1.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • Simple SLB with the ACE Module

    Hello,
    i have some problems with a ACE module i am currently tesing.
    I have a simple Serverfarm with two Servers.
    But there seems to be some Problems with the Loadbalancing i not understand:
    1) I use Round Robin, but the ACE seems to put me serval times to the same server. I notice this, because i have different content on both servers, also different URLs.
    2) withz the show serverfarm statement the total connects do not increment.
    switch/slb-c1# show serverfarm webfarm
    serverfarm : webfarm, type: HOST
    total rservers : 2
    ----------connections-----------
    real weight state current total
    ---+---------------------+------+------------+----------+--------------------
    rserver: web1
    10.0.33.201:0 8 OPERATIONAL 0 0
    rserver: web2
    10.0.33.200:0 8 OPERATIONAL 0 0
    switch/slb-c1# show service-policy L4_LB_VIP
    Status : ACTIVE
    Interface: vlan 300
    service-policy: L4_LB_VIP
    class: L4_VIP_CLASS
    loadbalance:
    L7 loadbalance policy: L7_SLB_POLICY
    VIP Route Metric : 77
    VIP Route Advertise : DISABLED
    VIP ICMP Reply : ENABLED
    VIP State: INSERVICE
    curr conns : 0 , hit count : 15
    dropped conns : 0
    client pkt count : 10198 , client byte count: 420991
    server pkt count : 23367 , server byte count: 34915173
    I have attatched the Config.
    Any Idea what is going on?

    what version do you have ?
    I would recommend to run the very recent A1.4.
    This is something that really should work.
    Gilles.

  • How to run a simple program with main?

    I have a simple class with main, something like the following:
    public static void main(String[] args) {
    Is it possible to run / execute this main from within workshop?

    In SP2 we've made it very easy to automatically set the main class name
    when you first try to run a class in a Java project that doesn't have
    already have debugging configured.
    More generalized ways to easily run a class with a main method are
    already on the list for the next release.
    Thanks for the feedback,
    Josh
    Carl wrote:
    Thanks, that worked:)
    Workshop should consider dealing with simple classes with main much
    simpler...
    "Josh Eckels" <[email protected]> wrote in message
    news:3f96f8c1$[email protected]..
    Yes, you can run and debug it, but it needs to be in a Java project. If
    it's not already in one, create a new Java project and copy in the
    source. Go to the Project Properties, and select the Debugger settings.
    Enter the class that contains the main method. If you'd like, you can
    set the checkbox for Build before Debugging so that you are always
    running off the current source code.
    You should then be able to run the project after building it.
    Josh
    Carl wrote:
    I have a simple class with main, something like the following:
    public static void main(String[] args) {
    Is it possible to run / execute this main from within workshop?

  • Phtoshop with Terminal Server

    Hello.
    We are using different products:
    Photoshop
    6.01
    Photoshop CS
    2.0
    Photoshop CS
    4.0
    Photoshop   Elements
    1.0
    Photoshop   Elements
    2.0
    First question: Is it possible to run all of them with a terminal server? With terminal server I mean every user starts it's own session on the server when starting the programm. It doesn't matter on which kind of server (Windows, Citrix). We just want to know, if it is possible.
    If we change our running systems to Windows 7 we have to change our products, too.
    Adobe   Photoshop CS5
    Adobe   Photoshop CS5
    Adobe   Photoshop CS5
    Adobe   Photoshop Elements 9
    Adobe   Photoshop Elements 9
    Can these programms be used with a terminal server?
    Thanks a lot for the answer and the heldp.
    David

    I don't have Elements 1.0, so I can't answer for that version, though as I recall it was pretty closely related to Photoshop 6.0 or 7.0, so it should work.
    For all other versions of Photoshop, I have brought them up over RDP and tested them, and they do run.
    Note that OpenGL cannot be enabled over an RDP connection for Photoshop CS4 and CS5.x (not even with W7 SP1 and Server 2008 R2), so people expecting to use the several good features ONLY available when OpenGL is enabled may miss them.  As with the other versions, the interactivity is generally diminished by remoting the relatively high bandwidth graphics operations across a link, because no matter how fast a link is it's nowhere near as direct as the PCIe buss to a local graphics card.
    Generally speaking, Photoshop can be both extremely compute-intensive and put a lot of data out to the UI, so it's not a very good fit to running via Terminal Services.  I certainly would prefer running it locally.
    I do hope you have a good, responsive LAN between your terminal server and your clients, and a very healthy server.
    -Noel

  • Problem with Terminal.app - unable to input '^' (Shift + 6)

    Hello everyone,
    I'm experiencing a strange problem with Terminal since this morning: I'm not able to input symbol '^' (Shift + 6) in any terminal application. Both Terminal.app and iTerm.app show the same problem. I'm able to input '^' in all other applications, as you can see, without any problem. Is it something related to key bindings? Anybody with similar problems?
    Thanks,
    Luca

    What terminal emulation are you using? Which shell? I suggest you look into whatever terminal emulation you are using. Try googling for the type of terminal emulation you are using to see if that sheds any light on this issue.

  • [Q] simple page with calculations

    Hi everybody,
    i'm completly new to Oracle APEX and i tested some things with a very simple Applikation at first.
    I can view, edit, delete my data. I tested simple reporting with Diagrams. Everything is working fine.
    Now i thought about a simple Page with some Calculations. I want to select my Data through Comboboxes
    and then doing some simple calculations with a button press.
    Like..
    Selecting a Country -> showing me some values for that contry.. (sales, whatever) -> entering 5% in a textbox
    ->pressing calculate -> and its showing me the result on the screen
    Now I'm completly lost on "How to start"... Is this even possible? I dont want a complete walkthrough..
    Maybe someone can give me just a hint "How to start"..
    Greetings

    Consider placing a LOV to select Country codes and a Text item to capture your percentage within your Report region.
    Then your code would mimic this code where p1_letter would be your Text item and p1_state would be your LOV.
    SELECT a.state_name
      FROM demo_states a
    WHERE     a.state_name LIKE '%' || UPPER (:p1_letter) || '%'
           AND a.st LIKE '%' || UPPER (:p1_state) || '%'Jeff

  • Change user type with terminal

    Hi all,
    I am trying to find the commands' to be able to change a 'Service' user from an Admin user to a standard user. I have found ways to do it via single user mode however i would like to be able to do this with terminal as i will be using remote desktop to change all the service users in my company. Any help would be great
    Cheers

    I can't take full credit for this. I found it at:
    http://farbflash.de/cgi-bin/blosxom.cgi/?find=snippets
    I did, however, know the command to look for.
    The commands necessary to create an admin user are as follows:
    sudo -s
    niutil -create . /users/username
    niutil -createprop . /users/username passwd \"\"
    niutil -createprop . /users/username home /Users/username
    niutil -createprop . /users/username shell /bin/tcsh
    niutil -createprop . /users/username uid 520
    niutil -createprop . /users/username gid 20
    niutil -createprop . /users/username realname \"First Last\" - if this property is not created, the user won't appear in the loginwindow!
    niutil -appendprop . /groups/admin users username - only for admin users!
    These below are optional:
    niutil -createprop . /users/username hint \"password hint\"
    niutil -createprop . /users/username writerspassword username
    niutil -createprop . /users/username writershint \"\"
    niutil -createprop . /users/username writerspicture username
    niutil -createprop . /users/username sharedDir Public
    exit
    There needs to be a valid home directory, shell, and/or SharedDir for the user. A home directory can be created as easily as:
    sudo mkdir /Users/username
    sudo chown username:staff /Users/username
    Or if you want the default OS X user directory structure:
    sudo cp -rp /System/Library/User Template/English.lproj /Users/username
    sudo chown -R username:staff /Users/username
    (/System/Library/User Template also has other localized language templates)
    Additional info:
    To change an admin user back to an ordinary user:
    sudo niutil -destroyval . /groups/admin users username
    Be careful to leave at least one accessible admin user, otherwise you will lock yourself out of your machine.
    after changing netinfo:
    sudo niutil -resync .
    log out and in the user you changed.

Maybe you are looking for