Proble regarding running a java application

hi guys
i'm new to java environment .
when i'm running a java application in a console ,
it is not able to give output in other directories.it is working only in c:\j2sdk\bin.
i think its the problem of setting classpath.
can any one help me hw to run java program in any folder.

You need to add that directory to your PATH. Follow
the installation instructions more completely.Howdy sheriff Warnerja! How's life in the Schmuckville Home of the Ball-less? Any leads regarding the dot flasher case? I see you're on the PATH.
Sheriff Warnerja of Schmuckville sensed an indecency plot.
Here was someone exposing her private dot.
He went on the trail,
but of no avail:
He didn't know where to find that intimate spot!

Similar Messages

  • How can I run a java-application on starting of Windows 2000

    How can I run a java-application without any user on starting of Windows 2000?
    For example, if the computer is restarted and nobody enter into it yet, my java-application should run anyway.
    How can I do that?

    Hi, you have to put it in a Windows service.
    To do this you have a program, Srvany.exe that allow to insert a .exe or .bat program in a Windows service.
    For example, i develop a program, TomcatGuardian and i put it in a service because i need to run it in a server without Administrator logged in.
    Regards,
    Ivan.

  • Is it possible to run a java application within a web browser?

    Hello everyone here! I have a question about running a java application within a web browser and I would appreciate it very much if anyone here can give me some answers.
    I have a standalone java application written with AWT. Basically this free application lets users to select spectral lines from a big file based on some criteria and plot those selected lines. Yes, it is a very simple application. Now I want to run this application within a web browser so that users don't need to download the application from the ftp site and thus don't need to install in their machine. Is it possible to run this application within browser? If yes, can we get the same plotting function as we run the application separately and where should I start out?
    Thanks in advance!
    kuilian

    Please see the signed applet discussion group for details of how to avoid the applet security restrictions. You can sign the applet, or use the policy file containing {AllPermission} for testing purposes (though not suitable for widespread deployment).
    Regards
    Matthew

  • I want to run a java application once only.Pl help.

    i want to run a java application once only.
    i.e. if some application is running on Win NT OS then that
    particular appliaction again should not run,but other java application can run.
    Pl help with some sample code.
    Thanx.

    Hi,
    I if understood your question then your requirement is to run the application when the system is on.If this is the case then you can configure your OS schdular to do the job an let the OS do it.You can
    write the java code for this but that will require to run on the OS layer,so better to configure the schedular setting.....But then for some other requirement it cannot be useful....
    think...
    regards vicky

  • How do i run a java application in jdk1.3

    im trying to run a java application in jdk 1.3. I created it in jbuilder and i was trying to use the applet viewer.

    http://java.sun.com/j2se/1.3/docs/tooldocs/win32/appletviewer.html
    Jesper

  • Running a java application from a java application

    hello ,
    please who knows how i can run a java application 'B' from inside another java application 'A' and get the error messages (if any) from the application 'B'

    how are you executing application B from application A? Please explain the java code you are using?

  • Running a Java application from a Swing GUI

    Hi,
    I was wondering if there is a simple way to run a Java application from a GUI built with Swing. I would presume there would be, because the Swing GUI is a Java application itself, technically.
    So, I want a user to click a button on my GUI, and then have another Java application, which is in the same package with the same classpaths and stuff, run.
    Is there a simple way to do this? Do any tutorials exist on this? If someone could give me any advice, or even a simple "yes this is possible, and it is simple" or "this is possible, but difficult" or "no this is not possible" answer, I would appreciate it. If anyone needs more information, I'll be happy to provide it.
    Thanks,
    Dan

    I don't know if it is possible to run the main method from another Java app by simply calling it...
    But you could just copy and paste the stuff from your main method into a new static method called something like runDBQuery and have all the execution run from there.
    How does that sound? Is it possible?
    What I'm suggeting is:
    Original
    public class DBQuery{
    public static void methodA(){
    public static void doQuery(){
    methodA();
    public static void main(String[] args){
    // Your method calls
    //Your initializing
    doQuery();
    }Revised:
    public class DBQuery{
    public static void methodA(){
    public static void doQuery(){
    methodA();
    public static void doMyQuery(){
    // Your method calls
    //Your initializing
    doQuery();
    // No main needed!!
    //public static void main(String[] args){
    // Your method calls
    //doQuery();
    //}

  • Running a java application in command prompt

    hi, I'm new to this forum.
    I would like to know what exactly needs to be specified to run a java application in a normal DOS command prompt.
    I know it is something like:
    javaw -classpath .\class GUI.applicationGUI
    where applicationGUI is the main class, right? What else do I need to do, since I have some other non-GUI classes that I need, inside the class folder ?
    Thanks for your time.

    You need to import those classes. And you need to make packages.
    In classes 1, 2 and 3 put:
    package class;
    In class 4 put;
    package class.GUI;
    Then you need to make the connection:
    In classes 1,2 and 3 put:
    import class.GUI.*;
    In class 4 put:
    import class.*;
    Compile each directory separately while in the respective directory. javac *.java
    Then go back to the directory above the directory "class" and run
    java class/GUI/name_of_file_containing_main_method

  • Can we run a java application using Runtime.exec()?

    Can we run a java application using Runtime.exec()?
    If yes what should i use "java" or "javaw", and which way?
    r.exec("java","xyz.class");

    The best way to run the java application would be to dynamiically load it within the same JVM. Look thru the class "ClassLoader" and the "Class", "Method" etc...clases.
    The problem with exec is that it starts another JVM and moreover you dont have the interface where you can throw the Output directly.(indirectly it can be done by openong InputStreams bala blah............). I found this convenient. I am attaching part of my code for easy refernce.
    HIH
    ClassLoader cl = null;
    Class c = null;
    Class cArr[] ;
    Method md = null;
    Object mArr[];
    cl = ClassLoader.getSystemClassLoader();
    try{
         c = cl.loadClass(progName.substring(0,progName.indexOf(".class")) );
    } catch(ClassNotFoundException e) {
    System.out.println(e);
         cArr = new Class[1] ;
         try{
         cArr[0] = Class.forName("java.lang.Object");
         } catch(ClassNotFoundException e) {
         System.out.println(e);
         mArr = new Object[1];
         try{
         md = c.getMethod("processPkt", cArr);
         } catch(NoSuchMethodException e) {
         System.out.println(e);
         } catch(SecurityException e) {
         System.out.println(e);
    try {            
    processedPkt = md.invoke( null, mArr) ;
    } catch(IllegalAccessException e) {
              System.out.println(e);
    } catch(IllegalArgumentException e) {
              System.out.println(e);
    }catch(InvocationTargetException e) {
              System.out.println(e);
    }catch(NullPointerException e) {
              System.out.println(e);
    }catch(ExceptionInInitializerError e) {
              System.out.println(e);
    }

  • Running a Java Application in Windows

    Hi, Can anyone tell me how to run a Java Application in Windows? I've tried to run it using TextPad 4.5 but it gives me an exception saying it can't find a class defenition. I'm actually using IBM VisualAge for Java to develop the app and it runs fine INSIDE VisualAge and I've exported my compiled class files and so on, to run it stand-alone in Windows. I'm using some custom objects and inner classes, could these be the problem?

    YES! SUCCESS! I exported my class files from VAJ and along with the manifest file that it adds automatically. I opened up the jar with Winrar, extracted the manifest file and added the Main-class: header pointing to my executable and then put it back in the jar with winrar. And PRESTO! I can now run it with javaw! Thanks for your help peeps...

  • Run Webdypro Java application by default

    Hi ,
    Is that possible to run a Webdynpro Java application by default when User logs into Portal?
    Actual requirement is that we need to assign Users with different ume groups once User login to portal depending on some User attributes.
    I am thinking adding the developed WD application to default frame work page will that work?
    Many Thanks
    Chandra.

    Hi Chandra,
    You can always modify the login page. So, when a user logs into a page, you can write custom code to be implemented - jspDynPage for login is modified.
    Now, to implement sync between UME and Corporate LDAP, you could have a scheduled program in background(Java Scheduler) which runs everyday to sync the UEM data with LDAP data.
    Now the tricky part. To trigger a background process as and when the user is managed in UME we need to find a way to alter the standard UME page. Not so sure if SAP allows us to do it.
    Simplest option, alter the login page. On the first time login(something your code should be able to determine), call the Java EJB/web service which will send this data to your LDAP.
    Regards,
    Sharath

  • Error when running "Run as" Java application from NWDS

    Dear All,
    I am trying to run the following .java proggie...
    Thanks for that. By the way, I am now trying to compile the following .java program.....
    Created on 01-Oct-2007
    To change the template for this generated file go to
    Window>Preferences>Java>Code Generation>Code and Comments
    @author chris.jackson
    To change the template for this generated type comment go to
    Window>Preferences>Java>Code Generation>Code and Comments
    import com.sap.lcr.api.cimclient.CIMClient;
    import com.sap.lcr.api.cimclient.CIMClientHandle;
    import com.sap.lcr.api.cimclient.CIMOMClient;
    import com.sap.lcr.api.cimclient.ClientFactory;
    import com.sap.lcr.api.sapmodel.SAP_AppServJCODestination;
    import com.sap.lcr.api.sapmodel.SAP_JCODestination;
    import com.sap.lcr.api.sapmodel.SAP_JCODestinationAccessor;
    import com.sap.lcr.api.sapmodel.SAP_MsgServJCODestination;
    import com.sap.mw.jco.JCO;
    import com.tssap.dtr.client.lib.protocol.URL;
    public class sldpoke {
    public void main() {
    ClientFactory factory = ClientFactory.newInstance();
    try {
    final URL url = new URL("http://ex1d002a.eu.unilever.com:58300/sld/cimom");
    String sldUsername = "cjacks01";
    String sldPassword = "password";
    CIMOMClient cimomClient = factory.createClient (url, sldUsername, sldPassword);
    CIMClient cc = new CIMClient(cimomClient);
    CIMClientHandle cch = (CIMClientHandle) cc;
    SAP_JCODestinationAccessor jcoAccessor = new SAP_JCODestinationAccessor(cc);
    SAP_JCODestination[] jcoDestinations = jcoAccessor.enumerateSAP_JCODestinationInstances();
    JCO.Client jcoClient = null;
    String user = null;
    String pwd = null;
    // iterate over all destinations
    for (int i = 0; i < jcoDestinations.length; i++)
    SAP_JCODestination jcoDestination = jcoDestinations;
    user = jcoDestination.getLogonUser();
    pwd = jcoDestination.getLogonPwd();
    if (jcoDestination instanceof SAP_AppServJCODestination)
    SAP_AppServJCODestination jcoDest = (SAP_AppServJCODestination) jcoDestination;
    jcoClient = JCO.createClient(jcoDest.getLogonBCClient(),
    user,
    pwd,
    jcoDest.getLogonLanguage(),
    jcoDest.getAppServHost(),
    jcoDest.getAppServNumber());
    else if (jcoDestination instanceof SAP_MsgServJCODestination)
    SAP_MsgServJCODestination jcoDest = (SAP_MsgServJCODestination) jcoDestination;
    jcoClient = JCO.createClient(jcoDest.getLogonBCClient(),
    user,
    pwd,
    jcoDest.getLogonLanguage(),
    jcoDest.getMsgServHost(),
    jcoDest.getSAPSystemName(),
    jcoDest.getLogonGroup());
    } catch (Exception e) {
    and I am getting the message "The selection does not contain a main type". The class contains a 'main' function so I am at a loss as to what the problem is. Any ideas how I progress?
    Kind Regards
    Chris Jackson.

    Hi! Jakson,
       to run a Stand-alone Java application, we must have one main() method like...
    public static void main(String args[]){ }
    i can't see this main() method on your appliation.
    regards,
    Mithileshwar

  • Running a Java Application on a Novell Netware Server

    I know this is a strange question but I was hopeing someone could help me or point me in the right direction. I have a java application that backs up files. I would like to run it automatically at night on our Novell server. Can Java run on a Novell OS. Any advice is appriciated.

    See http://www.javaworld.com/javaworld/jw-04-1998/jw-04-netware5.html

  • Running a Java application from web browser

    Hi,
    I'm not sure if this is the right place to put this, and it probably isn't, but I don't really know what else to do at the moment.
    I have a problem. I've written all these nice and pretty Java applications that do all this complicated junk that makes me proud. However...I have no idea how to actually run those applications.
    I've looked at guides on Java applets, Java Web Start, Java Server Pages, etc, and I still am not sure. JSP looked like the best option, until I figured out I can't use it with my web server. So, I've pretty much hit a wall here.
    If anyone could shed some light on this, I would be very appreciative. All I want is for a certain application to run when a user clicks a button on a simple HTML page. That's all I want...yet it seems so hard.
    Is there a simple way to do this, or do I need to use JWS or something and configure all these JARs and JNLP and classpaths and everything under the sun (no pun intended)?
    Again, I apologize if there is a better forum for this; I am just very confused right now and feel like I've hit a brick wall. If anyone can give me any advice, or point me in a good (easy) direction, I would truly be grateful.

    If anyone could shed some light on this, I would be
    very appreciative. All I want is for a certain
    application to run when a user clicks a button on a
    simple HTML page. That's all I want...yet it seems so
    hard. There's a lot of hidden details that make it so hard. What computer will run the application when the button is clicked? If the application will run on the client computer (within the web browser) there has to be a mechanism for allowing arbitrary code to be downloaded, verified and executed on any number of different target platforms. This is the problem that Java Applets address. Mostly this is a security issue, since a simple HTML page being able to run arbitary code without user interaction or approval is going to cause the world to be overrun by computer virii. There's also the multi-platform issue, but in many cases that can be avoided by requiring the client to use a single platform (the MS approach).
    If the application will run on the server, then the client code is much less difficult, as only a basic web browser is needed, and the server code is complicated, since it needs to keep track of multiple clients at the same time and process data in a request-response fashion.
    From the end-user's point-of-view, it certainly is simple though. Press the button and voila!
    "Any technology which is distinguishable from magic is insufficiently advanced"
    Brian

  • How to constant running a java application

    I have created a java application. My main class is called PTS.class and that has my main method.
    I wish to run this class continously, such that each time the main method completes execution, it is called again.
    I could probably do that by creating a thread which runs infinitely, as below. Is this a good skeleton solution? Will each instance of class PTS be garbage collected after execution, before a new one is created?
    Is there any freeware Java scheduler out there that allows me to do the same thing i.e. running an application infinitely?
    public class TestApplication implements Runnable{
    p.s.v.m (String[] args){
    Thread t = new Thread(this);
    t.start();
    public void run(){
    while(true){
    PTS pts = new PTS();
    }

    I'm not aware of any general Java based scheduling applications, though there certainly may be some. In general schedulers are built into the O/S such as cron. More robust schedulers like AutoSys are native code in part because they need to do O/S specific things like change who a particular process is running as.
    Depending on your needs it shouldn't be too bad to write your own.

Maybe you are looking for

  • IR Search bar display on the right when no data found

    How do I get the Interactive Search bar to be left justified when no data is found. I'm using Sand 10 Theme, and the region my interactive report is in is Page Template Region Position 3 Does anyone have a suggestion on this? Edited by: deandyno on A

  • How to send a SmartForm output as Email to external id?

    I want the Smartform output to email to extrenal email-id. I don't want the Smartform output as any kind of attachment, but the Smartform output needs to be shown on the main email body. Can anyone pls. help me out?

  • Rental movie has no sound

    I have rented several movies from the itunes store on my apple tv gen1 and it always has sound issues you will be watching and then the sound will cut out this has happened everytime and has done it about 4-8 times per movie. It has now cut out compl

  • Imesage verifying wrong number

    My imessage says it is trying to verify a random number? so i cannot send imesgaes from my phone number? how can i fix this?

  • Error RAC installation

    hi all, please help me resolve this problem: I'm installing RAC on vmware follow this instructions: http://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnWindows2003UsingVMware.php i using vmware installed on my windows to create 2 vi