Executing from Console

Hi =)
I've just written a program with eclipse and running it from inside Eclipse works. But outside from console does not.
flaab@Debian ~/Desarrollo/Conexion/principal\ $ java Start
Exception in thread "main" java.lang.NoClassDefFoundError: Start (wrong name: principal/Start)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)What might this be?

Hi flaab,
Just to clarify a bit, if running the program from the command line (terminal, bash, etc.), you either have to be within the directory the program was saved in; the said directory must be on your Java class path; or, you must specify the path when compiling and running the program like so:
javac -classpath .;C:\users\dac\classes;C:\tools\java\classes ...(which I 'stole' from http://manticore.2y.net/doc/jdk1.1.8/docs/tooldocs/win32/javac.html)
Setting the path is OS specific, so take a look at Google and you should be able to set it up pretty quickly. That is, assuming that's what you want.
Kevin

Similar Messages

  • Calling DOS executable from TestStand

    I have read the forum under TestStand.  I have version 3.0-- I am unable to get a DOS executable tool to work when I call it.  I can create a seperate seq file and call Notepad fine but when in that seperate and unique seq file I put the call to my tool and try and pipe (>) the results to a screen it doesn't work-I've tried what seems like every option for threading etc .  So I even put my DOS program under a directory and naming structure that conforms to the old 8.3 DOS standard.  I try to pipe(>) information to a text file and it doesn't work.  It also doesn't wait the 30 seconds that I tell it to either despite trying every option etc.  I've done everything I've seen in the help but have had no luck.  Do I need to create a VB or C++ DLL wrapper, if I do then what challenges do I face?  I am close to telling my manager that TestStand is not a tool that we can use.
    Thanks
    JL

    I got it working.  Thanks for you input.  I believe I simply was missing a command on the command line (it takes about 5 parameters).  It was falling through and I wasn't able to catch what was going on.  I thought it was a thread issue within teststand that I needed to set.  I also didn't realize the default location that it executes from any my paths were explicit.  I also wasn't clear on some other details but have now figured them out pretty much.
    Thanks again
    Jim
    ~~~~~~~~~~~
    Are you using the call executable step type? If so please provide more informations about how you have it configured, if not please explain what you are doing. By DOS executeable do you mean an old 8-bit DOS program (what version of windows are you running this on?)? Or do you mean a windows console application? Are you getting any error messages? How are you verifying that your executeable isn't being called? Or is the problem just with the IO redirection?
    -Doug

  • Not able to see that particular query which is executed from application

    Hi Friends,
    I have one application which is executing a number of queries in the current session. I want to know which query is taking how much time?
    So I have executed following query in Toad for this purpose, but this is giving details of those queries only which are executed from either Toad or SQL developer.
    I am not able to see that particular query which is executed from application. Please suggest me if I am missing something.
    select ss.schemaname,ss.machine,ss.program,ss.logon_time,ss.sql_exec_start,ss.wait_time,
    sa.first_load_time,sa.application_wait_time,sa.plsql_exec_time,sa.cpu_time,sa.elapsed_time,sa.sql_fulltext
    from v$session ss, v$sqlarea sa
    where sa.hash_value=ss.sql_hash_value
    order by sa.first_load_time desc;
    Oracle Version - Release 11.2.0.1.0 Production
    Toad Version - 9.5.0.31
    Regards,
    Sachin

    Dear Friends,
    is there any option for this through Oracle Enterprise Manager 11g?
    Actually I have done little bit research on EM console and go through SQL Monitoring Executions page but did not get the particular query details executed through the application.
    I have also checked the link - AWR Baseline but not get any result.
    As I am new in database administration activities, Please help me regarding this. You can also suggest me other solution except Oracle EM console.
    Thanks.
    Sachin Jaiswal

  • Telnet traffic intiated from console and other traffic

    I have got this scenario :
    hostname R1
    interface Ethernet 0/1
    ip address 192.168.10.10 255.255.255.0
    ip policy-may APPLYPOLICY
    ip local policy route-map REDIRECT
    ip access list extended CONTROL
    Permit tcp any 172.18.1.0 0.0.0.255 eq 23
    route-map REDIRECT permit 10
    match ip address CONTROL
    set ip next-hop 192.168.10.220
    As we know that packets that originate from the router are policy routed according to the local policy.
    Does the telnet traffic to a destination on the 172.18.1.0/24 network, that is initiated from console connection on the router, will be policy routed as well ?

    Hi,
    all traffic locally generated should be treated the same, it should not matter, if you access the router through console or vty. The main point is, that the telnet packets are created locally, no matter how the command is executed.
    Regards, Martin

  • Problem with getting unicode values from console

    Hi,
    In my application I am passing unicode value like \u00DF from console. and writing this string value to a utf8 file. But in the file the value is printed not the actual unicode character.
    Where the things are getting wrong.
    I have declared a string in java like ;
    String abc = "\u00DF";
    and printed this to a utf8 file, it works fine and the corresponding unicode character for \u00DF is printed.
    Why the unicode value passes from console is not working property. How can i resolve this ?
    Thanks in advance...
    <!--Session data-->

    And how are you putting it into the console in the first place?

  • Can I use SubPanels to display and run multiple executables from the same GUI?

    I have two Labview executables that performs some A/D I/O, each using an independent USB-6008.  I would like to run both of these executables from a single UI.  Is this possible usin SubPanels?  Or some other method?
    I found KB regarding exe's and VI Server but can't seem to get the suggested workarounds implemented.
    http://digital.ni.com/public.nsf/allkb/8545726A00272EB0862571DA005B896C?OpenDocument
    I am using Labview2009
    Thanks
    Dan
    Solved!
    Go to Solution.

    DBerry wrote:
    No, of course I am not sure yet.  I have only begun testing this method. 
    Not sharing common hardware (separate USM-6008s).
    Here is the whole picture:
    I have developed a top-level VI that performs Daqmx IO using a single USB-6008.  The top-level VI references a Project Daqmx Task that points to the desired 6008.  I would like to create a single UI that uses this top-level VI to control twoUSB-6008s simultaneously.  I thought I could build the top-level VI into 2 separate exes, where the only difference between the exes is the hardware it points to (one exe to each of the 6008s).  But I have been unsuccessful at running these two exes within a single UI.  I attempted use subpanels on a tab control to do this but I am unable to obtain a reference to the top-level vis once they have been built into an exe.  I have also tried building a dll and exporting the top-level vi from the dll build but i can't seem to get that to work either.  In both of these cases my Open VI reference function returns errors (Error 1445).  I am aware of the changes in referencing VIs from within an exe/dll since LV8.2 - http://digital.ni.com/public.nsf/allkb/8545726A00272EB0862571DA005B896C
    The link seems to suggest that I should be able to obtain a reference to the top-level vi within the dll but I can't get it to work.
    So I then moved on to the above method (making all the subvis reentrant).  I just haven't figured this all out yet.
    If you have suggestions on other problems I may run into please share.  I think I can eliminate my FGs but haven't gotten back to this yet.
    Thanks
    Dan
    When I am designing apps of the type you described I have kept the ned goal in mind from the begining since of the issue you are mentioning. I also don't want to tell you to throw it all away and start over. So with that in mind I have been looking at your posts and only offering the least destrutive ideas first. With that in mind I would like to invite yo uto look at the code i posted in this thread (reply #18 has a zip).
    That code shows how to realize un-dockable GUI regions but it passes the ref of the top level VI to a reentrant VI it instanciate for each undockable region. It may have enough hints and technique to give you some ideas that will work for you.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Is it possible to call a VI that is inside a LabVIEW executable from a TestStand sequence?

    I have created a custom TestStand operator interface and have modified the default sequential process model to display a UUT information dialog that prompts for more information than just the UUT serial number.  This UUT information dialog is a LabVIEW VI.  To distribute the operator interface, I build it into an executable.  As part of the build process, I make a copy of the UUT information dialog VI (which is part of my operator interface project) and place it in the same folder as the executable.  I have then configured the sequential process model to call the dialog VI from this location.  It would be really nice if I could embed the UUT information dialog VI inside the operator interface executable so that I could distribute just an executable instead of an executable and separate VIs.  Is this possible?  In other words, is it possible to call a VI that is inside a LabVIEW executable from a TestStand sequence just like a standard LabVIEW VI call?

    Ryan,
    The dialog that you've created isn't being directly called by the OI at all and shouldn't need to be included in the same directory as the OI for distribution. Since you are modifying the PreUUT of the default process model, you will give the path to the VI in that step, create a deployment and then manually copy the VI to the directory referenced in the step. The VI is considered a support file for the process model and is not related to the OI at all.
    Test Engineer - CTA

  • How can I call a LabVIEW executable from within another LabVIEW executable?

    I have a customer requirement for two LabVIEW executables. Based on their current setup, they need to run executable "A" or "B", both of which are under independent revision control. I have created a third "selection" executable that allows the operator to choose between one of the two, but I am receiving errors when I attempt to call a LabVIEW executable from within a LabVIEW executable using either the "System exec" VI or the "Run Application" VI. If I call a non-LabVIEW executable (such as Windows Explorer) everything works fine.

    > I have a customer requirement for two LabVIEW executables. Based on
    > their current setup, they need to run executable "A" or "B", both of
    > which are under independent revision control. I have created a third
    > "selection" executable that allows the operator to choose between one
    > of the two, but I am receiving errors when I attempt to call a LabVIEW
    > executable from within a LabVIEW executable using either the "System
    > exec" VI or the "Run Application" VI. If I call a non-LabVIEW
    > executable (such as Windows Explorer) everything works fine.
    As with the other poster, I suspect a path problem. You might try the
    path out in a shell window, and if it works, copy the complete absolute
    path to LV to see if that works. LV is basically passing the comma
    nd to
    the OS and doesn't even know what is in it, so you should be able to get
    it to work.
    The other poster commented on subpanels, which is a good suggestion, but
    without going to LV7, an EXE can have open more than one VI. You can
    use the VI Server and the Run method to fire up another top-level VI.
    The decision is whether you want both to be in unique processes.
    Greg McKaskle

  • How to create a .par file from console apart from tools like eclipse,studio

    Plz reply me if any body knows how to create .par file from Console i.e command prompt.just like creation of .jar & .war file in java.I have created some iViews and making .par files from tool Eclipse/Netweave rstudio etc..I waqnt to create from console..How it is possible?
    Regards
    Sridhar Raju

    Hi Sridhar,
    I'm unsure for what you'd need this, but in general there are at least two possibilities:
    - manually pack everything into the dir structure needed (documented here: http://help.sap.com/saphelp_nw04/helpdata/en/f9/561140d72dc442e10000000a1550b0/frameset.htm ), than create a ZIP with some command line tool (e.g. JAR), naming it to .par.
    - use ANT to do this; with this, you can even deploy the file, see PAR-File deployment with ANT (EP6)
    Hope it helps
    Detlev

  • Read Input from console !!!

    Im am very new to java and trying to learn java ..
    Now the problem i have is, I have to read input from console without using the BufferReader method..
    Please tell me how to go about it..
    I have a assignment to complete and im not able to figure out the way out.
    Help ..

    http://java.sun.com/j2se/1.4.1/docs/api/java/lang/System.html
    Read first about the System class provided by Java.
    Select the 'in' method of System class and it will take
    you to the InputStream.
    http://java.sun.com/j2se/1.4.1/docs/api/java/io/InputStream.html
    An essay way of reading input is:
    "value?"=System.in.read();
    Try and see if this works. It will not use the
    BufferReader portion, but it gives you another way
    of reading from the console.

  • Read characters from console.

    Hii
    I'm trying for 2 days to read characters from console on the fly, but it didn't work.
    I want to read each char that user press on line and without waiting for the Enter button. It's like an keyboard event but there is no GUI.
    I will appreciate any help.
    Thanks.

    I don't understund what you really want to do.it is possible mesure the time between each char type using the last code :
    char charPressed='\0';
    String line="";
    while(charPressed != '\n')
    try
    // start time
    charPressed =(char) System.in.read();
    line += charPressed;
    // end time
    // want to get out
    if(...) break;
    catch(IOException ioex) {ioex.printStackTrace();}
    Sorry, but your code doesn't measure the time between each char type.
    The function read waits for the "enter" key, and just after pressing enter your code will start to read all the chars you typed before "enter", so it won't do it.
    Read function will not help in this subject.

  • PO Response approval Work item is not executing from approver inbox.

    Hi,
    PO Response approval Work item is not executing from approver inbox. After click the approve button system is not showing any error and also work item is not clearing from user inbox. When we checked the status of the work item in SWI1 Transaction is still READY.
    Standard Task: TS14508055 - Transfer purchase order response data to purchase order
    Business Object: BUS2209
    Scenario:
    1. Create PO in SRM System, Vendor belongs to SUS System Vendor
    2. SUS Vendor creates the PO Response SUS system, POR Value is greater Than PO Value
    3. Approval Work item will go to Buyers of purchasing group
    4. Buyer trying to approving The PO Response from his approval inbox
    Regards,
    Surya Sankar

    what all buttons do you see when you open the workitem in the approval inbox.
    as far as i know , there will only button 'transfer response to purchase order'..
    what happens if you click the above button.

  • How to retrieve User Description for a particular MDM User from Console ?

    In my Application i  have to retrieve User Descripton(a field) for the MDM Users  from Console. I am using MDM Java Api 1(MDM4j) in my application. Is there any way i can retrieve MDM User Description from Console without using MDM Admin API?

    Hi Namrata,
    Sorry, I have a different perspective from you (I don't work with the Java API). So, you can ignore what I said about the protocols. That's lower-level than what you would care about.
    The correct thing to do is to use the Admin API to get the users, as you are doing. If you have to log in twice, it might be because you're using the old Java API.
    Please verify that you're using these packages:
    mdm-core.jar, mdm-common.jar, mdm-protocol.jar, mdm-data.jar, mdm-admin.jar
    versus the old API, which was called mdm4.jar.
    Thanks,
    Cleopatra

  • Linux net command showing incorrect output if executing from java.

    I am trying to execute a net rpc registry on red hat linux box from java using Runtime. I have stored the command in a String variable. When the execute the command from java it throws an error saying that "Invalid registry path" however the same command works fine when executed from linux command terminal.
    CODE
    import java.io.*;
    public class ChkBpower {
         public static void main(String[] args) {
         checkBpower(128);
         public static void checkBpower (int TTL){
              int ttl = TTL;
              System.out.println("Hello3");
              String ip = "20.198.36.28";
              String[] reg={"\\","HKLM","\\","SOFTWARE","\\","Marimba"};
              System.out.println(reg);
              String credentials ="bpwrlab/Administrator%Confmgmt1";//"asiapac/gjagdeosingh%M@nu2281";
              String chkBcmd = "net rpc registry enumerate '\\HKLM\\SOFTWARE\\Marimba' -I " + ip + " -U " + credentials ;
              String chkBstatus = "net rpc service status cscmarimba -I " + ip + " -U " + credentials + "| grep -b 'service' | awk '{print $4}'";
              String startBpower = "net rpc service start cscmarimba -I " + ip + " -U " + credentials;
              if (ttl>=100 && ttl<=128){
              System.out.println(ttl);     
              System.out.println(chkBcmd);
              try {
                   Runtime r = Runtime.getRuntime();
                   Process p = r.exec(chkBcmd);
                   InputStream stderr = p.getErrorStream();
         InputStreamReader isr = new InputStreamReader(stderr);
         BufferedReader br = new BufferedReader(isr);
         String line = null;
         System.out.println("<ERROR>");
         System.out.println(br.readLine());
         while ( (line = br.readLine()) != null)
         System.out.println(line);
              System.out.println("</ERROR>");
              int exitVal = p.waitFor();
              System.out.println("Process exitValue: " + exitVal);
              catch (Throwable t)
         t.printStackTrace();
    }

    Use exec(String[]), not exec(String), whenever you have argue,nets. Saves all that mucking around and second-guessing and escaping ...

  • Code source works fine from console application but not from SharePoint interface

    Hi;
    Please can you help
    me to understand why my code below works fine from console application (VS 2010) and not working from interface of my SharePoint collection site :
    From console application : the subsite is created and I can to open without any problem
    From Sharepoint GUI : the subsite is created but impossible
    to open subsite : error 404 page not found ?
    The subsite creation is very long (2 minutes) and in concole application When I try to open the subsite just after its creation I have page not found and I must waits (several refresh) more time to open the subsite correctly.
    Can be I must to display a PoPup to show the progress creation ?
    using System;
    using System.Security.Permissions;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Security;
    using Microsoft.SharePoint.Utilities;
    using Microsoft.SharePoint.Workflow;
    namespace CreateSubSiteClients.EventReceiver1
        public class EventReceiver1 : SPItemEventReceiver
            public override void ItemAdded(SPItemEventProperties properties)
                     base.ItemAdded(properties);
                     try
                         SPWeb web = properties.OpenWeb();
                         if (properties.List.Title == "REFCLIENTS")
                             SPListItem curItem = properties.ListItem;
                             string name = properties.ListItem["SITE"].ToString();
                             curItem["SiteUrl"] = web.Url + "/" + name;
                             SPWeb rootWeb = web.Site.RootWeb;
                             SPWebTemplateCollection webTemplates = rootWeb.GetAvailableWebTemplates(1036);
                             SPWebTemplate webTemplate = null;
                             String webTemplateName = "ModeleSiteCourrier";
                             String webTemplateSearchName = "";
                             for (int i = 0; i < webTemplates.Count; i++)
                                 webTemplateSearchName = webTemplates[i].Name.ToString();
                                 if (webTemplateSearchName.Contains(webTemplateName))
                                     webTemplate = webTemplates[webTemplateSearchName];
                                     break;
                           SPWeb newSite = web.Webs.Add(name, name, name, Convert.ToUInt16(1036), webTemplate, false, false);
                            newSite.Navigation.UseShared = true;
                            newSite.Update();
                            newSite.Close();
                            Console.WriteLine("Le site suivant a été crée", name);
                     catch (Exception ex)
                         properties.Status = SPEventReceiverStatus.CancelWithError;
                         properties.ErrorMessage = ex.Message.ToString();
                         properties.Cancel = true;
    Regards

    Hi,
    To create subsite using event receiver in SharePoint Empty Project, you can refer to:
    Sharepoint 2010 event handler to create subsites
    To display a PoPup to show the progress creation, you can use:  MessageBox.Show("Hello, world.");
    More information:
    MessageBox.Show Method (String)
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

Maybe you are looking for

  • How to find out the tables that will be affected using a transaction

    Hi, How to find out the list of database tables that will be affected when we use a standard transaction(ex. VA01, MM01..)...?(like When we create a salesorder, which tables and which fields will be affected..?) Is there any transaction or a simple w

  • Passing parameter to Function in select clause BIP 11g

    Hi, I am developing a dataset where i ahave to pass Parameter to a function which retrives the cursor in BIP 11g below is the SQL: select cizcompfn(:P_USER_ID) COMPANY_INFO, cizinstfn(:P_REPORT_CD, :P_USER_ID) CURRENCY_INFO, sysdate AS PRINT_DATE_TIM

  • Special GL

    Hello How do we deal with Letter of credit, Bills of exchange, Post date checks and Guarantees. I understand that we use the special gl transactions and statistical postings to take care of these. What I want to understand is how the accounting proce

  • Transferrring from Imac to Ibook

    I just got an Ibook, and would like to transfer everything in my Itunes to my Ibook. What is the easiest way to do this? Do I have to move it to an external harddrive (IPOD) or is there a way to connect them directly and sync them up? Thanks Kent

  • [SOLVED] RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911 won't compile

    Everytime I attempt to compile this driver that I downloaded from RealTek's website I run into a problem. Here's my make install output: http://pastebin.com/rQWGKYxK Anybody know of a solution? Last edited by eattheapple (2014-07-22 18:33:34)