JSPC Compiler gives FileNotFound Exception from command line

I have problem running jspc from command line
          From the browser, the jsp pages compile fine.
          I have tested this on NT 4.0 and on HP UX 10.0 with Weblogic Server
          4.5.1 and SP 9.
          The command I typed in as follows:
          $java weblogic.jspc -d /opt/b2berp/jspclassfiles/ - docroot
          /opt/b2berp/web -keepgenerated true -classpath
          /opt/jdk/1.2.2/lib/classes.zip:/opt/weblogic/weblogicaux.jar:/opt/b2berp/lib
          I get the following exception:
          I checked the file is in PATH and I am also specifying the absolute path
          and filename.
          My document directory is /opt/b2berp/web/auctions/
          All of my jsp pages are under /opt/b2berp/web
          This is also my web folder.
          Gives error unable to find file
          (FileNotFoundException)
          Does anyone know what is going on.
          Rauf
          

Hi,
          did you place setWLSEnv in your path ?
          ----Anilkumar kari

Similar Messages

  • To run an application on iAS6sp1 on HP-Unix, while starting the kjs from command line, it gives a GDS error and crashes. Subsequently, after stopping all services and restarting iAS wouldnot come up.

     

    Hi,
    Not a problem, please post the KJS error logs for me to hunt the
    exact reason for the error.
    Thanks & Regards
    Raj
    Neel John wrote:
    To run an application on iAS6sp1 on HP-Unix, while starting the kjs
    from command line, it gives a GDS error and crashes. Subsequently,
    after stopping all services and restarting iAS wouldnot come up.
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • [solved]can't run java apps from command line

    Every Java program that i've tried to run from command line gives me a error message like this:
    augusto java% java Test
    Exception in thread "main" java.lang.NoClassDefFoundError: Test
    Caused by: java.lang.ClassNotFoundException: Test
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    Could not find the main class: Test. Program will exit.
    `java Test.class` doesn't work too.
    but, the exact same code work from eclipse, am I missing something?
    Some info:
    % ls Test*
    Test.class Test.java Test.java~
    % cat Test.java
    public class Test{
    public static void main(String[] args){
    System.out.println("doesn't work");
    % echo $PATH
    /home/augusto/.bin:/home/augusto/.bin:/home/augusto/GNUstep/Tools:/opt/GNUstep/Local/Tools:/opt/GNUstep/System/Tools:/bin:/usr/bin:/sbin:/usr/sbin:/opt/java/bin:/opt/java/jre/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin
    Last edited by hack.augusto (2009-10-27 00:57:53)

    also make sure that you current directory is in your classpath.
    eg
    export CLASSPATH=".:$CLASSPATH"
    java Test
    your issue is more likely to be classpath related, as java doesn't read the path variable, and the java executable is found
    Last edited by bruce (2009-10-27 01:02:51)

  • Work from command line but did not work from JSP call

    I have a test class that should perform Triple DES. When I run it from command line work ok, but when runs from JSP it give me an error:
    Exception:
    ======================================
    javax.crypto.IllegalBlockSizeException: Input length not multiple of 8 bytes
    put 3 check points inside the code, and run it from command line and here is the result:
    C:\Documents and Settings\salasadi\Desktop\DigitalMailer>java TDESStringEncrypto
    r 123456781234567812345678 "CID=103&A
    this is pass 3
    this is pass 1
    this is pass 2
    here is the class:
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import java.security.*;
    import java.io.*;
    public class TDESStringEncryptor
    static final int DATA_STRING_LENGTH = 64;
    public static void main(String[] args)
    try
    TDESStringEncryptor enc = new TDESStringEncryptor();
    String value = enc.Encrypt(args[0], args[1]);
    System.err.println(value);
    catch (Exception ex)
    System.err.println(ex);
    public String Encrypt(String inkey, String data)
    throws Exception
    // convert key to byte array and get it into a key object
    byte[] rawkey = inkey.getBytes();
    DESedeKeySpec keyspec = new DESedeKeySpec(rawkey);
    SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("DESede");
    SecretKey key = keyfactory.generateSecret(keyspec);
    Cipher cipher = Cipher.getInstance("DESede/ECB/NoPadding");
    cipher.init(Cipher.ENCRYPT_MODE, key);
    byte[] out = cipher.doFinal( padString(data).getBytes( ) );
    System.out.println("this is pass 1");
    return byteArrayToHexString( out );
    private String byteArrayToHexString(byte in[])
    byte ch = 0x00;
    int i = 0;
    if ( in == null || in.length <= 0 )
    return null;
    String pseudo[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8",
    "9", "A", "B", "C", "D", "E", "F"};
    StringBuffer out = new StringBuffer( in.length * 2 );
    while ( i < in.length )
    ch = (byte) ( in[i] & 0xF0 );
    ch = (byte) ( ch >>> 4 );
    ch = (byte) ( ch & 0x0F );
    out.append( pseudo[ (int) ch] );
    ch = (byte) ( in[i] & 0x0F );
    out.append( pseudo[ (int) ch] );
    i++;
    String rslt = new String( out );
    System.out.println("this is pass 2");
    return rslt;
    private String padString( String s )
    StringBuffer str = new StringBuffer( s );
    int strLength = str.length();
    for ( int i = 0; i <= DATA_STRING_LENGTH ; i ++ )
    if ( i > strLength ) str.append( ' ' );
    System.out.println("this is pass 3");
    return str.toString();
    And here is the JSP call:
    TDESStringEncryptor encryptz = new TDESStringEncryptor();
    String cryptodata1 = encryptz.Encrypt(Keyz,cryptodata);
    Thanks

    Please use [ code ] tags when posting code.
    Please indicate the line that causes the exception.
    Please indicate what Keyz and cryptodata is.

  • I can not uninstall Office 2013 from command line

    Hi, I have been stuck for a while trying to uninstall Office 2013 via command line. Installation file was downloaded from Volume Licensing Service Center, Uninstall.xml file for silent uninstallation looks like this:
    <Configuration Product=”ProPlus”>
    <Display Level=”basic” CompletionNotice=”yes” SuppressModal=”yes” AcceptEula=”yes” />
    </Configuration>
    From command line the following will not work:
    setup /uninstall ProPlus /config .\ProPlus.ww\Uninstall.xml
    Error: Setup can not find or validate an installation file. Please try reinstalling Office . . .
    setup /uninstall ProPlus gives me GUI to continue process - it seems /config .\ProPlus.ww\Uninstall.xml part does not work as it should be
    This is very important to me since I used above command line in SCCM 2012 R2 to allow user to uninstall Office 2013 by itself via Software Center. When this failed I tried locally but the error was the same. This should have been trivial task - silent uninstallation
    using .xml file. It is not a rocket science. I am very angry because losing time for something like this is unacceptable for system engineers working with SCCM 2012 R2.

    Hi,
    This error might occurs due to lots of reasons. Where is the installation file stored? If it's stored on a network share, please copy it to your local disk, and then manually run the command again. This way, we'll see if the installation file is the
    problem.
    If issue persists in this case, then this generally means that something wrong with the installation file. Please try to redownload it and then try again.
    Please also make sure that you're executing the command with elevated privileges (run as administrator).
    Regards,
    Ethan Hua
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • Why not all jars picked up by ojdeloy and how to generate build.xml from command line and not JDEV GUI - quick question

    Hi All
    We have 11.1.1.7 ojdeploy to compile our app.
    We notice in the log that not all jars are used in classpath arguments when we explicitly set them up for compilation.
    eg:
      <path id="classpath">
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/commons-el.jar"/>
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/jsp-el-api.jar"/>
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/oracle-el.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/a.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/b.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/c.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/d.jar"/>
    </path>
    Log Output -
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/bin/javac
    [ora:ojdeploy] -g
      [ora:ojdeploy] -Xlint:all
      [ora:ojdeploy] -Xlint:-cast
    [ora:ojdeploy] -Xlint:-empty
      [ora:ojdeploy] -Xlint:-fallthrough
      [ora:ojdeploy] -Xlint:-path
      [ora:ojdeploy] -Xlint:-serial
      [ora:ojdeploy] -Xlint:-unchecked
      [ora:ojdeploy] -source 1.6
      [ora:ojdeploy] -target 1.6
      [ora:ojdeploy] -verbose
      [ora:ojdeploy] -encoding Cp1252
      [ora:ojdeploy] -classpath
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/resources.jar:
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/rt.jar:
      [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/jsse.jar:
        [ora:ojdeploy] /path/to/interface/public_html/WEB-INF/lib/a.jar"/>
        [ora:ojdeploy] /path/to/interface/public_html/WEB-INF/lib/c.jar"/>
    1- Is it because it depends on how jpr or jws are configured ?
    2- How can we automatically generate a build file of the application from command-line (as opposed to using Jdev IDE to click to generate a build.xml) ?

    The first  warning is happening because you're stating drivers for input devices without need. You haven't disabled hotplug so evdev gets used instead of kbd. This is normal, and you should change the driver line from kbd to evdev so that whatever options (if any) you've specified for the keyboard get parsed.
    The second warning is about you not installing acpid.
    The third I have no idea about, but look at the synaptics wiki. None of the (WW) are related to your video card.
    And every card that has 2 or more output ports show up as "two cards". You also don't need to specify the pci port in xorg.conf. edit: this is the general case with laptops, might be different for desktops.
    When I do lspci -v I get:
    00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03) (prog-if 00 [VGA controller])
    Subsystem: Micro-Star International Co., Ltd. Device 0110
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at dfe80000 (32-bit, non-prefetchable) [size=512K]
    I/O ports at d0f0 [size=8]
    Memory at c0000000 (32-bit, prefetchable) [size=256M]
    Memory at dff00000 (32-bit, non-prefetchable) [size=256K]
    Expansion ROM at <unassigned> [disabled]
    Capabilities: <access denied>
    00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
    Subsystem: Micro-Star International Co., Ltd. Device 0110
    Flags: bus master, fast devsel, latency 0
    Memory at dfe00000 (32-bit, non-prefetchable) [size=512K]
    Capabilities: <access denied>
    And it doesn't matter if it errs in trying to sli up with it self. That's just not a possibility.
    Last edited by gog (2009-10-15 23:59:49)

  • How to restore or backup Apex application from Command line ? URGENT

    We have Oracle apex 4.1 installed in Oracle 11g R2 database (windows 64-bit) 2008 R2
    For some reason our database dictionary objects are corrupted.
    We wanted to backup our Apex applications in some workspaces ASAP.
    We are not able to access apex from http://localhost:7777/pls/apex/htmldb_login
    We have an underlying database schema export (expdp).
    1) Is there a way to export or backup the apex application without logging into the apex URL ? if yes how ?
    2) Does Oracle has any of its own native tool to backup and restore from command line ?
    Thanks in advance

    My (MS Windows) experience, if I may; perhaps you'll find something useful.
    You'll find the README.TXT file in /apex/utilities directory. Read it.
    In order to use APEXExport, you need JDK version 1.5 or higher. Check your version by typing (and viewing the result):
    C:\>java –version
    java version "1.6.0_06"
    Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
    Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)Its directory should be part of the PATH environment variable: on my computer, directory name isC:\Program Files\Java\jre1.6.0_06\binFurthermore, Oracle JDBC class libraries must be part of the CLASSPATH environment variable. Check whether it exists (in Control Panel - System - Advanced - Environment Variables). For my 10gXE, it is here:C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jarI couldn't make it work; didn't know that ".\" directory must be entered into CLASSPATH as well (found that information in Arie Geller's book). Therefore, my final CLASSPATH version is:.\;C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jarOK, setup is done. Now, go to your /apex/utilities directory and, from the command prompt, run (mind the upper case!)java oracle.apex.APEXExportwhich will show a short help.
    I chose to export the whole workspace. In order to do that, I need the workspace ID (got it from Apex's SQL Workshop; that might be a problem as you can't get there, can you? I can't tell how to find that information apart from SQL Workshop, but I'm pretty sure someone, who is much more experienced than me, will know it). OK, here's how you find it:select v('WORKSPACE_ID') from dual;Finally, here's the final step - export:C:\apex\utilities>java oracle.apex.APEXExport -db localhost:1521:xe -user scott -password tiger -workspaceid 1038408092496568The result are fxxx.sql files (where "xxx" represents application number).
    I hope you'll manage to export your applications; basically, nothing special here (except that ".\" directory in the CLASSPATH variable).
    Best of luck!

  • Problem with tokenized  input from command line

    I am trying to take an input from the command line, parse it to tokens and perform whatever operation is needed depending on the name of the token, on a binary tree of stacks for example, if i type 1 2 1 3 printLevelOrder, then the root of the tree should have 3, 2,1 in the stack, the left child should have 1 and the right child should be empty. and then a level order print of the tree should be performed.
    however what is happening when i run this code is the numbers are being put into the right stacks of the tree, but any commands such as printLevelOrder or PrintPopRoot are entering the code that is for placing numbers onto the stack instead of executing that command and skipping past this piece of code.
    so my question is, why is the if statement if (word =="printLevelOrder") not being executed when thats whats in the word ?
    example input and output shown below code fragment.
              try {
                  BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                 String line = "";
                 while (line != "***") {
                      System.out.print("> prompt ");
                      line = in.readLine();
                      StringTokenizer tokenizer = new StringTokenizer(line," ");
                      String word = new String();
                      while (tokenizer.hasMoreTokens()) {
                             word = tokenizer.nextToken();
                             boolean notCommand = true;
                             if (word =="printLevelOrder") {
                                  theTree.printLevelOrder();
                                  System.out.println("(word ==printLevelOrder)");
                                  notCommand=false;
                             if (word == "printPopLevelOrder") {
                                  theTree.printPopLevelOrder();
                                  notCommand=false;
                             if (word == "printPopInorder") {
                                  theTree.printPopInorder();
                                  notCommand=false;
                             if (word == "printPopPreorder") {
                                  theTree.printPopPreorder();
                                  notCommand=false;
                             if (word == "printPopRoot") {
                                  theTree.printPopRoot();
                                  notCommand=false;
                             if (word == "***") {
                                  notCommand=false;
                             if (notCommand == true) {
                                  System.out.println("(notCommand == true)");
                                  boolean notPlaced = true;
                                  int v = 1;
                                  while ((notPlaced==true) && (v < theTree.size())) {
                                       if (theTree.element(v).isEmpty()) {
                                            theTree.element(v).push(Integer.valueOf(word));
                                            System.out.println("Inserting"+word);
                                            System.out.println("in empty stack at location: "+v);
                                            notPlaced=false;
                                       if (notPlaced==true) {
                                            if (  Integer.valueOf(word) >= Integer.valueOf( theTree.element(v).top().toString() )  ) {
                                                 theTree.element(v).push(Integer.valueOf(word));
                                                 System.out.println("Inserting"+word);
                                                 System.out.println("in stack at location: "+v);
                                                 notPlaced=false;
                                       v++;
              }valid inputs: int value, printLevelOrder, printPopLevelOrder, printPopInorder, p
    rintPopPreorder, printPopRoot, *** to quit
    prompt 1 3 2 4 2 printLevelOrder(notCommand == true)
    Inserting1
    in empty stack at location: 1
    (notCommand == true)
    Inserting3
    in stack at location: 1
    (notCommand == true)
    Inserting2
    in empty stack at location: 2
    (notCommand == true)
    Inserting4
    in stack at location: 1
    (notCommand == true)
    Inserting2
    in stack at location: 2
    (notCommand == true)
    Exception in thread "main" java.lang.NumberFormatException: For input string: "printLevelOrder"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:447)
    at java.lang.Integer.valueOf(Integer.java:553)
    at TreeStack.main(TreeStack.java:73)
    Press any key to continue . . .

    lol aww, shame that you forgot to do that. i had 10 / 10 for mine, and seing as the deadline is now well and trully over,
    here is the entire source for anybody who was following the discussion or whatever and wanted to experiment.
    additional files needed >
    http://users.cs.cf.ac.uk/Paul.Rosin/CM0212/Stack.java
    http://users.cs.cf.ac.uk/Paul.Rosin/CM0212/ArrayStack.java
    http://users.cs.cf.ac.uk/Paul.Rosin/CM0212/StackEmptyException.java
    http://users.cs.cf.ac.uk/Paul.Rosin/CM0212/StackFullException.java
    /*TreeStack.java - reads command line input of values and assigns them to stacks in a  binary tree and performs
    operations on the ADT. valid inputs: <int>,   printLevelOrder,   printPopLevelOrder,
    printPopInorder,   printPopPreOrder,   printPopRoot.         Terminates on invalid input.
    Written by George St. Clair.
    S/N:0208456         22/11/2005
    import java.util.Vector;
    import java.io.*;
    import java.util.StringTokenizer;
    public class TreeStack {
         private final int TREE_CAPACITY = 7 + 1;
         private final int STACK_CAPACITY = 10;
         Vector tree = new Vector(TREE_CAPACITY) ;
         //collect input from command line, add values to stacks at nodes of the teee
         //and perform required operations on the treestack
         public static void main (String [] args) {
              //create a tree of stacks
              TreeStack theTree = new TreeStack ();
              try {
                   //collect standard input
                  BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                 String line = "";
                 while (line != null) {
                        System.out.print("");
                      line = in.readLine();
                      //tokenise input
                      StringTokenizer tokenizer = new StringTokenizer(line," ");
                      String word = new String();
                      while (tokenizer.hasMoreTokens()) {
                             //assign word to the token
                             word = tokenizer.nextToken();
                             boolean notCommand = true;
                             //perform operation on treestack depending on what word is
                             if (word.equals("printLevelOrder"))  {
                                  System.out.println("printLevelOrder");
                                  theTree.printLevelOrder();
                                  notCommand=false;
                             if (word.equals("printPopLevelOrder"))  {
                                  System.out.println("printPopLevelOrder");
                                  theTree.printPopLevelOrder();
                                  notCommand=false;
                             if (word.equals("printPopInorder"))  {
                                  System.out.println("printPopInorder");
                                  theTree.printPopInorder();
                                  notCommand=false;
                             if (word.equals("printPopPreorder"))  {
                                  System.out.println("printPopPreorder");
                                  theTree.printPopPreorder();
                                  notCommand=false;
                             if (word.equals("printPopRoot"))  {
                                  System.out.println("printPopRoot");
                                  theTree.printPopRoot();
                                  notCommand=false;
                             //if word was not a command it must be a number
                             if (notCommand == true) {
                                  boolean notPlaced = true;
                                  int v = 1;
                                  //starting at the root, find suitable place for number
                                  while ((notPlaced==true) && (v < theTree.size())) {
                                       //if the stack at v is empty, number goes here
                                       if (theTree.element(v).isEmpty()) {
                                            theTree.element(v).push(Integer.valueOf(word));
                                            System.out.println("inserting: "+word);
                                            System.out.println("in empty stack at location: "+(v-1));
                                            notPlaced=false;
                                       //if the stack is not empty
                                       if (notPlaced==true) {
                                            //if the value on the top of the stack is smaller than number, number goes onto the stack
                                            if (  Integer.valueOf(word) > Integer.valueOf( theTree.element(v).top().toString() )  ) {
                                                 theTree.element(v).push(Integer.valueOf(word));
                                                 System.out.println("inserting: "+word);
                                                 System.out.println("in stack at location: "+(v-1));
                                                 notPlaced=false;
                                       //if that node was no good, check the next one for suitability
                                       v++;
              catch (Exception e) {
                   //occurs when user inputs something that is neither a command, or a number, or upon EOF, or stack is full
         public TreeStack () {
              //create the TreeStack ADT by adding stacks in the vector, note vector 0 is instantiated but not used.
              for (int i = 1;i<=TREE_CAPACITY;i++)
                   tree.add(new ArrayStack(STACK_CAPACITY));
         public int size() {
              //return the size of the tree +1 (as 0 is not used)
              return tree.size();
         public ArrayStack element (int v) {
              //return the ArrayStack at v
              return (ArrayStack)tree.get(v);
         public int leftChild (int v ) {
              //return left child of v
              return v*2;
         public int rightChild (int v ) {
              //return the right child of v
              return v*2+1;
         public boolean children (int v ) {
              //search for children of v and return true if one exists
              for (int i =v;i<size();i++) {
                   if (i/2==v ) {
                         //left child found at i
                         return true;
                   if ((i-1)/2==v ) {
                        //right child found at i
                        return true;
              //no children found
              return false;
         public boolean isInternal (int v ) {
              //test whether node v is internal (has children)
              if (children (v)== true) {
                   //has children
                   return true;
              return false;
         //print the top value in each stack encountered on a level-order traversal of tree
         public void printLevelOrder() {
              //for every node of tree v
              for (int v = 1;v<size();v++) {
                   if (!element(v).isEmpty() ) {
                        //print the top value in stack v
                        System.out.println(" "+element(v).top());
                   else {
                        //stack at v is empty
                        System.out.println(" -");
         //pop off and print the top value in each stack encountered on a level-order traversal of tree
         public void printPopLevelOrder () {
              //pop off and print the top value in stack v
              for (int v = 1;v<size();v++) {
              //for each node of tree v
                   if (!element(v).isEmpty() ) {
                        //if v isnt empty print the top value in stack v
                        System.out.println(" "+element(v).top());
                        //pop the top value in the stack at v
                        element(v).pop();
                   else {
                        //stack at v is empty
                        System.out.println(" -");
         //pop off and print the top value in each stack encountered on an in-order traversal of tree
         public void printPopInorder () {
              printPopInorder (1);
         public void printPopInorder (int v) {
              boolean isInternal = false;
              if (isInternal (v)) {
                   //use a boolean for isInternal to save on running the method twice
                   isInternal = true;
                   //recursively search left subtree
                   printPopInorder (leftChild(v));
              //pop off and print the top value at v
              if (element(v).isEmpty() ) {
                   //stack at v is empty
                   System.out.println(" -");
              else {
                   //if v isnt empty print the top value in stack v then pop
                   System.out.println(" "+element(v).top());
                   element(v).pop();
              if (isInternal ) {
                   //recursively search right subtree
                   printPopInorder (rightChild(v));
         //pop off and print the top value in each stack encountered on an pre-order traversal of tree
         public void printPopPreorder() {
              printPopPreorder(1);
         public void printPopPreorder(int v) {
              //pop off and print the top value at v
              if (!element(v).isEmpty() ) {
                   //if v isnt empty print the top value in stack v then pop
                   System.out.println(" "+element(v).top());
                   element(v).pop();
              else {
                   //stack at v is empty
                   System.out.println(" -");
              if (isInternal (v)) {
                   //recursively search left and right subtrees
                   printPopPreorder (leftChild(v));
                   printPopPreorder (rightChild(v));
         //pop off and print all values from the stack at the root
         public void printPopRoot (){
              //while the root stack has values left
              while (!element(1).isEmpty()) {
                   //print, then pop
                   System.out.println(" "+element(1).top());
                   element(1).pop();
    }

  • Restart/start/stop network from command line

    Hi all...
    How do I restart/start or stop my network from command line? I red somewhere about using netstart, but I guess the article was refering to OpenBSD and not OS X...
    So.. any hints?
    Thanks.

    Hey You are right there...
    OKK..To my knowledge, you can start an application, from the servlet in a thread. But stopping a thread from outside is not safe and even sun doesn't advice.
    1. Starting a thread : you can start your program using an Runtime class. But your client program can see if the server port is open or not. So after starting the server program, through servlet, execute the client program. OR you can log every command/step in to a log file, and start the server program and see the log, where currently the program is waiting, so you can check, if the server program has exited.
    2. Stoping an application i.e a thread is a tricky thing. One i would suggest is, send data to the server socket with your pass code and the command "Shutdown" with a sequence which will not repeat in the data communication. If the first command is your passcode and "Shutdown" you can kill the server thread from inside the server application. To make this possible, every thing the new connection is accepted, you have to validate the first line is this your command to shutdown.
    and repeat the step 1.
    Hope this gives you a little idea to proceed. if not let me know...
    Cheers
    Venkat

  • Calling this simple servlet from command line -- ERRORS!

    Below is my servlet. I call from command line via:
    java BatchServlet
    and I get:
    Exception in thread "main" java.lang.NoClassDefFoundError: BatchServlet
    IS there a reason for this
    import java.io.IOException;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class BatchServlet extends HttpServlet implements Runnable{
    static Thread t = null;
    public void init(ServletConfig c) throws ServletException{
    super.init(c);
    if (t==null){
    t = new Thread(this);
    t.start();
    public void run(){
    while (true){
    try{
    Thread.sleep(5000);
    }catch (InterruptedException ie){
    ie.printStackTrace();
    System.out.println("Wake up");

    Same error with this little prog.....
    Notice main method
    package wch.util;
    import java.io.IOException;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class test {
    public void main(){
    System.out.println("test");

  • How to run a Servlet Project's .war from Command Line??

    Hi there,,
    Can anybody help me with how to run a Servlet Project's .war file from command line??In fact I tried it using the following command,
    java -jar TestServProj.war
    but I get the following error,,,
    Failed to load Main-Class manifest attribute
    I can't find the project''s manifest file in the META-INF folder.
    Moreover,plz help me about know how to execute a single servlet class from command line...
    Thanks in advance...

    you cant run a .war file from command prompt
    .war files should be executed in a server
    how to execute a single servlet class
    do you mean to run the servlet or compile the servlet?
    any way you need a server and if you are a beginner Apache tocat will be the best server to start with you can down load it from
    http://tomcat.apache.org/

  • How to run Ant from command line in Tarantella env?

    I am getting Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.tools.ant.launch.Launcher error message when I run Ant from tarantella command line. Is this Ant version issue? I can only find Ant with version 1.4.2. Where can I find the correct Ant version (1.6.5) and what class path do I need to specify if I want to run Ant from command line. This works if I run Ant inside of Jdeveloper 11g.
    thanks

    Hi
    What is the correct Java version? What are the steps to rectify the problem?

  • Unable to build and run Javapetstore using  Sun SDK from Command Line

    Hi,
    Here is a problem I?ve come across building and running JavaPetstore from Command Line using Ant.
    It shows that Build is successful but there is an error message in very beginning:
    ?Unable to locate tools. jar. Expected to find it in C:\Program Files\Java\jre 1.5.0_11\lib\tools.jar?
    But there is no such a file in jre-1.5.0_11 or previous versions.
    The only place where the file with such name can be found is jdk\lib.
    All attempts to run end up with:
    ? BUILD FAILED.
    C:\<PETSTORE_HOME>\bp-project\command-line-ant-task.xml:77;unable to find javac compiler;com.sun.tools.javac.Main is not on the class path.
    Perhaps JAVA_HOME does not point to JDK."
    Directories C:\Sun\SDK\bin and C:\Sun\SDK\jdk are in the PATH.
    JAVA_HOME as a System variable is set up to C:\Sun\SDK\jdk.
    Building and running other applications like a BluePrints or Samples bring to same result.
    I will post more information if needed.
    Thank you in advance for help.

    If you are using Windows XP:
    1. Right click on my computer
    2. Select Properties from the popup dialog
    3. Click on the "Advanced" tab
    4. Click the button towards the bottom that says "Environment Variables"
    5. In the dialog that pops up, look in both the User variables and the System variables for a variable named CLASSPATH
    6. If its not there, you need to create it. If you want to make it available to all users of your computer, create it as a System variable. If you only want it to be available to the current user, add it as a User variable.
    7. If it is there, or if you just created it, it needs to contain the following values: the current directory (symbolically abbreviated as a period: "."), any class libraries you want to be available to the java compiler (javac) or the java interpreter (java). By default, jre/lib and jre/lib/ext are searched for classes, so you don't need to include anything located in one of these folders on the classpath.

  • Grant and revoke privilages from command line interface

    hi all,
    I have a lot of users that I need to give them a set of privileges to folders and containers of the repository, i thought that using the command line interface should help in loading a script.
    i checked the manual for the syntax for such a command (i.e. to grant privileges) but i couldn't, searched the net and i didn't find anything.
    So can we grant privileges from the command line interface and how ?
    by the way is there anyway to create users from command line interface as well ?\
    thanks in advance and have a good one

    The granting of access rights cannot be done with a CLI script in Designer. Instead you have to use the Designer API Pl/Sql packages.
    For detailed information, refer to the "API and Model Reference Guide", which is
    installed with the Designer Repository Documentation, or can be found on OTN > Doco > Designer site.
    Scroll through that document to the Reference section. You will need to read up on two topics at least: Workarea and Container Context, Privileges and Access Rights.
    To grant rights, the easiest way is to grant them "just like some existing ones".
    To do this, you'll need a Pl/Sql procedure with 5 input parameters:
    1) the workarea context
    2) the container to look at
    3) the user to look like
    4) the container to grant access to
    5) the user to grant access for
    The Pl/Sql procedure then needs to make a series of Repository API package calls to set context and get container IRIDs:
    JR_CONTEXT.Set_Workarea (workareaname) - to set the context workarea
    JR_CONTEXT.Set_Working_Folder (sourcefoldername) - to specify the source container
    JR_CONTEXT.Working_Folder (sourcefolderid) - to get the ID of the source container
    JR_CONTEXT.Set_Working_Folder (targetfoldername) - to specify the target container
    JR_CONTEXT.Working_Folder (targetfolderid) - to get the ID of the target container
    OR you can just do a couple queries after you set the WA CONTEXT such as ...
    Select IRID from CI_Application_Systems where NAME = <sourcefoldername>
    Select IRID from CI_Application_Systems where NAME = <targetfoldername>
    Then you get the list of rights desired, and grant them back to the target user.
    JR_ACC_RIGHTS.Get_Acc_Rights (sourcefolderid, sourceusername) > AccessList
    [gets list of existing rights for some user on a container]
    JR_ACC_RIGHTS.Grant_Priv_List (targetfolderid, targetusername, AccessList, Cascade? = TRUE)
    [to set the list of rights for a user against the target container and its subcontainers]
    There are other ACC_RIGHTS packages, like Grant_Priv, Revoke_Prive, Revoke_Priv_List, etc that you can use as well to build up a set of access management scripts.
    Hope this helps

  • Running Unit Test from test manager that run bat file from command line

    Hi ,
    I am trying to run Jsystem (java framewotk) from command line using runScenario.bat thru unit test that i associated to test in test manager.
    the idea is that when i ran the automated test  from MTM - it will run the the unit test that will run the appropriate test case in java.
    i wrote the code like this : 
    using System;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    namespace UnitTestProject3
    [TestClass]
    public class UnitTest1
    [TestMethod]
    public void TestMethod1()
    try
    String command = "c:\\JSYSTEM\\runner\\runScenario.bat
    c:\\Users\\ryeshua\\Source\\Workspaces\\Auto1\\my-tests-project\\target\\classes scenarios\\feature1 RoeySetup.xml ";
    System.Diagnostics.ProcessStartInfo procStartInfo =
    new System.Diagnostics.ProcessStartInfo("cmd", "/c " + command);
    procStartInfo.RedirectStandardOutput = true;
    procStartInfo.UseShellExecute = false;
    //procStartInfo.CreateNoWindow = true;
    System.Diagnostics.Process proc = new System.Diagnostics.Process();
    proc.StartInfo = procStartInfo;
    proc.Start();
    string result = proc.StandardOutput.ReadToEnd();
    Console.WriteLine(result);
    catch (Exception objException)
    // Log the exception
    and when i ran it from visual studio it worked perfect. and update  the Jsystem logs of the junit test in the jsystem/runner/log folder.
    but when i added it to associated test and ran it from MTM - it pass but it does not update  the logs in jsystem folder.
    the problem that i dont know what is not working. i cant see the output of it when i ran from mtm but can see when i ran from VS.
    i am using VS 2013 Pro with MTM 2013.
    please advice
    Roey

    Hi Roey,
    Thank you for posting in MSDN forum.
    Based on your issue, could you please tell me how you generate the log file under the jsystem folder?
    Generally, I know that when we run unit test from VS IDE, the file will be saved into the local machine. But when we run unit test from MTM, the unit test method will be run on the test agent machine, so the file will be saved into the test agent machine.
    Therefore, I suggest you could check if you did not see the updated logs file in jsystem folder on the test agent machine.
    In addition, I suggest you could try to copy this unit test project on this test agent machine and then run the unit test method using mstest.exe in command line and then check if you can update the logs file.
    https://msdn.microsoft.com/en-us/library/ms182489.aspx?f=255&MSPPError=-2147217396
    If you have any updated message about this issue, please tell me.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • "Nothing Captured--Aborting OneStep DVD Creation"

    I'm trying to use iDVD 6's OneStep DVD to convert Digital 8 tapes from a Sony camcorder directly to DVD. Sometimes this works flawlessly and other times I get the message that nothing was captured on the tape (although the tapes work fine) and that t

  • Table or report for customer, g/l account and chart of account together

    Hi All. I am looking for any table or report where one can see the followings; Chart of account and customer together or chart of account, g/l account and customer together or cutomer and g/l account I am aware of the all the FI table like KNB1, SKA1

  • User exit during creation and saving of Produciton order

    Hi folks, I need to append a row in the material component of transaction code COR1. This needs to be triggerd when an order is created and saved in COR1. Please help me out........... thanks in advance

  • USER_DEPENDENCIES view in oracle 11g and oracle 10g are different?

    I have tested oracle 10g and oracle 11g. And I found some different behavior in the user_dependencies view between two oracle version. In the oracle 10g, whatever referenced object is populated in the user_dependencies view. In the oracle 11g, howeve

  • How to check which table is used

    After creating RFQ , i want to check which table is used  in creating RFQ. how can i see that data has gone or not into the database table.