Java EXE - Passing Attributes

Hi,
I have a java application that performs many functions. I have compiled this application into an exe file. I would like to automate things.
E.g. using Windows Scheduler to run the app at 2am - execute function1, 4am - execute funtion2. etc..
Is it possible to pass an attribute to the exe when executing so that the function can be executed automatically.
At the moment, I am creating 5 different exe files, each one is essentially the same application, but starts at different functions. I would therefore like to simplify this into one app.
Thanks in advance
Regards
Angus

I am not sure what tool you are using to generate your exe from your java byte code, but i would assume that it would pass variables given with the exe to the java program and as such you can just extract the variable from the args[] string array in your main method.
i.e.
"program.exe -func1"
passes it to your public static void main (String args[])
so just get the variable from the args array.
As i have said, since i dont know how your java -> exe tool works this is just a suggestion.

Similar Messages

  • What does java.exe do if double pass same classpath to it?

    By default, java.exe loads rt.jar as default classpath.
    if user explicitly passes rt.jar as classpath in command line to java.exe again, does java.exe load rt.jar twice or only once?
    Loading same classpath twice is slower than only once - i need the answer for speeding my application.

    By default, java.exe loads rt.jar as default
    classpath.Not correct. rt.jar is not loaded "as default classpath." It should not be listed on the classpath, as it WILL BE searched, and WILL slow down the tools.
    The classpath is used by javac.exe and java.exe (and other tools) to locate your (the user) .java and .class files that they require.
    Read these topics to learn how the classpath works and how to use it correctly:
    Setting the Classpath and
    How Classes are Found
    from this page http://java.sun.com/j2se/1.4.2/docs/tooldocs/tools.html

  • Java.exe Error while running Tomcat

    Hello,
    I encountered a very strange Java.exe error while testing my servlet.
    Here is the screen dump of the aforementioned error:
    http://www.shelleysauction.com/db07-22-02.jpg . The error's message is
    as follows: "There is no disk in the drive. Please insert a disk into
    drive \Device\Harddisk1\DR1."
    Would appreciate any help; I don't claim to be any good at this stuff.
    All of the information on that page is derived from a database on a
    remote intranet machine (including input type, title, descriptions,
    etc.). I am not sure if it is a server-side error or a client-side
    error as my computer is running the server; another computer is not
    possible--I'm a lowly summer intern hired to build a servlet that
    interfaces with a database, and I'm not a good programmer.
    The only thing I can think of is that I recently began using the
    com.oreilly.servlet.* package for its Base64Encoder, Base64Decoder, and
    MultiPartRequest methods. That form was working fine for weeks before
    then.
    Jennica Humphrey

    Hello all,
    Thank you for your help. I was using the MultiPartRequest class in the com.oreilly.servlet.* package so I could add a "section" that allowed users to upload CSV files to the database. It required, I think, that an opening FORM tag would have the following attribute: enctype="multipart/form-data"
    Now, I made a HtmlGenerator class that writes the HTML for me, with all sorts of methods like html.startTableCell( String stylesheet, String align, String valign, String width ) so I could just type html.startTableCell( "palepurple", "left", "top", "50%" ); ... made reading my own crap a lot easier.
    Anyway, I had html.startForm( ) and html.startUploadForm( )... the only difference was that the upload one had the enctype="multipart/form-data" attribute and the first one didn't. Now, my DoPost() method was supposed to determine if there were "regular" parameters passed on by the form and if there were "MultiPart" parameters... with code like this:
    // Initialize MultipartRequest.  This is required for file uploading.
    boolean isMulti = true;
    MultipartRequest multi = null;
    try {
         multi = new MultipartRequest( request, "..\\..\\Files", 10 * 1024 * 1024 );
    } catch( Exception e ) { isMulti = false; }
    Enumeration paramNames = request.getParameterNames();
    // Attempt to initialize parameter names.
    try {
         if ( !paramNames.hasMoreElements( ) ) paramNames = multi.getParameterNames();
    } catch ( Exception e ) {
         /* Ignore */
    ***code snipped out***
    if ( isMulti )
          paramValues = multi.getParameterValues( paramName );
    else
         paramValues = request.getParameterValues( paramName );This was working fine, but after submitting "regular" (not uploaded) forms 3 or 4 times, it'd give me that error. Then I decided to change html.startForm() to work exactly like html.startUploadForm()--in effect making every form a MultiPartRequest. It works fine, without any errors. Do you know what was going on?

  • Console window doesn't show on second start of java.exe

    I am building restart capability into my product.
    When the product is started for the first time, it is started through a Windows EXE using a ShellExecuteEx method. I simply launch "java.exe" with my classpath, etc. My Windows console window shows up and I am happy.
    When a do a restart of the app, I am inside of the original JVM. I have access to the exact same commandline that I used in the EXE to launch "java.exe" originally.
    With the restart, I simply call Runtime.getRuntime().exec(commandline) and pass in the exact same commandline that I passed in when I did this in the EXE. However, when I do this from within the JVM, I do not get my Windows console window. This is not good.
    Does anybody understandn what is going on here and how I can remedy this?
    Thanks in advance for your help!

    I'm not sure what is happening in your case.
    Do the images initially show in "Tools > Page Info > Media" or is that always with size 0px?
    Quote: ''but if i click on same link second time than size gets right and image is shown under preview box.''
    Is that with clicking on the web page?
    Can you load the images via the links that you see in "Tools > Page Info > Media" without any problems?
    Do you see the request for those images in the Network tab in the Web Console (Firefox/Tools > Web Developer) and what is the server response in that case?
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • My Applet crashes java.exe to crash

    Ok, I'm not sure why, but on some computers my applet is making java.exe crash. When i attach a debugger to java.exe when it crashes I see a "Access Violation Error". The oddest part is that while one computer will crash and another identical computer with the exact same setup wont. The crash happens the moment the applet starts.
    Now I've done just about everything i could to figure this out. I've installed uninstalled and reinstalled java. I've run ram, hard drive, cpu, ect tests all reporting no problem. I've disabled anti-virus and did the uninstall and reinstall again. I've installed older versions of the java. I've resigned my jar file, created a new key and then resigned. Practically the only thing i have not done and is not a viable solution is reformat/replace the computers. So I'm left thinking it might be something in the applet that is causing it.
    It could be in the applet parameters but i doubt it.
    Pram fp is about 5,000 characters long
    Pram VerfyType is about 1 character long
    Pram Arg1 is a max of 11 characters long
    Pram Arg2 is a max of 11 characters long
    This applet is meant to interact with a program on the computer that connects to a variety of fingerprint scanners that we use and passes information form the internal site to the scanner and vice versa. So it just starts a loop back socket. For the loop back socket, i have tired 127.0.0.1 and localhost which still yield the same result.
    Here is the applet. It's very simple.
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import java.awt.Image;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.MalformedURLException;
    import java.net.Socket;
    import java.net.URL;
    import java.net.UnknownHostException;
    import java.security.AccessController;
    import java.security.PrivilegedAction;
    public class Verify extends JApplet {
         private static final long serialVersionUID = 908206045464466336L;
         public JLabel jLabel1;
        public jPanel jPanel1;
        public String Template = "";
        public String VerfyType = "";
        public String Arg1 = "";
        public String Arg2 = "";
        public Thread t;
        Socket socket = null;
        public void stop()
             jPanel1.threadRun = false;
             if (socket != null)
                  try {
                        socket.close();
                   } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
         public void init()
            //Execute a job on the event-dispatching thread:
            try {
                javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
                    public void run() {
                         Template = getParameter("fp").trim();
                         VerfyType = getParameter("VerfyType").trim();
                         Arg1 = getParameter("Arg1").trim();
                         Arg2 = getParameter("Arg2").trim();
                         initComponents();
            } catch (Exception e) {
                System.err.println("getParameter didn't successfully complete");
            StartVerify();
        private void initComponents() {
              jPanel1 = new jPanel();
              jLabel1 = new JLabel();
              jPanel1.setPreferredSize(new java.awt.Dimension(66, 66));
              jPanel1.setBackground(new java.awt.Color(255, 255, 255));
              jLabel1.setText("Initializing Please Wait.");
            setBackground(new java.awt.Color(255, 255, 255));
            javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 66, Short.MAX_VALUE)
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 66, Short.MAX_VALUE)
            jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 536, Short.MAX_VALUE))
                        .addGroup(layout.createSequentialGroup()
                            .addGap(224, 224, 224)
                            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel1)
                    .addContainerGap(116, Short.MAX_VALUE))
        public void StartVerify()
             t = new Thread() {
              public void run()
                  AccessController.doPrivileged(new PrivilegedAction() {
                  public Object run()
                            PrintWriter out = null;
                            BufferedReader in = null;
                            try {
                                socket = new Socket("localhost", 4001);
                                out = new PrintWriter(socket.getOutputStream(), true);
                                in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                            } catch (UnknownHostException e) {
                                 jLabel1.setText("Unkown Host Error.");
                                return null;
                            } catch (IOException e) {
                                 jLabel1.setText("Unable to get communication streams..");
                                return null;
                            String reponse = "";
                            try {
                                reponse = in.readLine();
                                if (reponse.equalsIgnoreCase("cmd"))
                                    out.write("v\n");
                                    out.flush();
                                    reponse = in.readLine();
                                    if (reponse.equalsIgnoreCase("send"))
                                        out.write(Template+"\n");
                                        out.flush();
                                        reponse = in.readLine();
                                        if (reponse.equalsIgnoreCase("finger"))
                                             jLabel1.setText("Please Have the client place their finger on the scanner.");
                                             while (true)
                                                  reponse = in.readLine();
                                                  if (!reponse.equalsIgnoreCase("pulse"))
                                                       break;
                                            if (reponse.equalsIgnoreCase("good"))
                                                try {
                                                     DoRedirect();
                                                    socket.close();
                                                } catch (IOException ex) {
                                            else if (reponse.equalsIgnoreCase("bad"))
                                                           int _return = LoopTellCanceled(socket, out, in);
                                            else
                                                 jLabel1.setText("Unexpected response from finger print server.");
                                        else
                                             jLabel1.setText("Unexpected response from finger print server.");
                                    else
                                         jLabel1.setText("Unexpected response from finger print server.");
                                else
                                     jLabel1.setText("Unexpected response from finger print server.");
                            catch (IOException ex)
                                 jLabel1.setText("We lost connection to the finger print reader.");
                                 System.err.println(ex);
                            try {
                                out.close();
                                in.close();
                                socket.close();
                            } catch (IOException e) {
                                System.err.println("Couldn't get I/O for the connection");
                                return null;
                            return null;
            t.start();
        private int LoopTellCanceled(Socket socket, PrintWriter out, BufferedReader in)
             int res = JOptionPane.showConfirmDialog(null, "Incorrect Finger Print. Would you like to try again?", "Finger Print was Bad", JOptionPane.YES_NO_OPTION);
             while (res == JOptionPane.YES_OPTION)
                String reponse = "";
                try {
                    out.write("v\n");
                    out.flush();
                    reponse = in.readLine();
                    if (reponse.equalsIgnoreCase("send"))
                        out.write(Template+"\n");
                        out.flush();
                        reponse = in.readLine();
                        if (reponse.equalsIgnoreCase("finger"))
                             jLabel1.setText("Please Have the client place their finger on the scanner.");
                             while (true)
                                  reponse = in.readLine();
                                  if (!reponse.equalsIgnoreCase("pulse"))
                                       break;
                            if (reponse.equalsIgnoreCase("good"))
                                try {
                                     DoRedirect();
                                    socket.close();
                                } catch (IOException ex) {
                            else
                                 res = JOptionPane.showConfirmDialog(null, "Incorrect Finger Print. Would you like to try again?", "Finger Print was Bad", JOptionPane.YES_NO_OPTION);
                } catch (IOException ex) {
                     System.err.println(ex);
             return res;
        public void DoRedirect()
              try
                   if (Arg1.equalsIgnoreCase(""))
                        getAppletContext().showDocument(new URL("javascript: fprintVerified("+VerfyType+");"));
                   else
                        if (Arg2.equalsIgnoreCase(""))
                             getAppletContext().showDocument(new URL("javascript: fprintVerified("+VerfyType+", "+Arg1+");"));
                        else
                             getAppletContext().showDocument(new URL("javascript: fprintVerified("+VerfyType+", "+Arg1+", "+Arg2+");"));
              catch (MalformedURLException ex)
                   ex.printStackTrace();
    }Edited by: Pyromanci on Mar 1, 2011 7:58 AM

    What does your error console report? - Which one? Browser, PC, ect
    How about your java console say? - I have no clue what it could be saying since java.exe crashes the moment the applet starts the console is no longer accessible.
    What browser and version? - Firefox v3.6.13
    Have you tried a different one? - Yes Ie 6,7, and 8. Though the site the applet runs form was designed specifically for firefox (internal site)
    Have you tried Appletviewer? - Yes applet runs as intended.
    Did you give the Applet permission? I know you said you signed it - did it all go right? - Yes. Gave me the usual response of will expire in x months

  • Oracle.exe and java.exe are running my CPU 100% under XP Prof SP3

    11gR1
    oracle.exe and java.exe are running 100% CPU
    I have increased virtual memory to 4 gig
    I have defragmented the drive.
    I checked the drive for errors.
    I am searching the whole drive for viruses
    I do not have the problem with Redhat Fedora 12 running 11gR1
    I have 1 gig of RAM but cannot install release 2 because the installer expects
    1 gig + 1

    ooops!!! left that off...sorry
    XP Prof SP3 32 bit..*.no problem with Redhat Fedora 12 running MySQL and 11gR1*
    1 gig RAM Dell precision W/S 1.5 Gig rate 74 GiG SCSI HD 15000 RPM
    Don't pass out but I am also running MySQL server 5.1.41 and MS SQL Server Express 2008.
    Lucky it didn't catch fire
    I installed XP prof months ago but this CPU domination occurred only starting last night!
    However slow everything works in 11gR1
    sqlplus myname/password and then select rows from table
    sqldeveloper
    PHP web sites
    I've had plenty of trouble with Java running slow and hogging memory!
    Edited by: landonmkelsey on May 2, 2010 12:21 PM
    Edited by: landonmkelsey on May 2, 2010 12:24 PM
    Let me guess...stop services for MySQL and MS SQL Server and see what happens!
    Edited by: landonmkelsey on May 2, 2010 12:26 PM

  • Java.exe error while running j2ee server in jre1.4.0 env

    Hi,
    i have been running j2ee 1.3.1 server in jdk1.4.0 enviromrnt. When i try to process large data (like retrieving around 100 records from the database, each having 150 attributes) in the form of XML , I get a runtime error generated by the jvm , whiich says "java.exe has generated the error and is closed by WIndows". I increased the heap size to -Xmx256m. Stil i am getting this error. I am not getting the error if i run with jdk1.3.1 version. Is there any instability with jdk1.4.0 env? any help will be highly appreciated

    If you have found a solution to this problem, can you please share it with me.
    Thanks a lot.
    -- Manohar

  • Trouble with java.exe

    I'm new to using Java, here is my problem, I'm running windows XP professional, I've download and installed j2re1.4.1, when I try to open Java.exe, a DOS command screen opens and closes and nothing else happens, when I try to open one of the games that came with it nothing happens. What am I doing wrong? Please help.

    you can't 'open' java.exe
    That file represents the Java interpreter. It must be passed a valid .class file that contains a main() function.
    Check out the java tutorial on how to write and run java apps.

  • Java.exe invocation

    In my (MFC) GUI application, I use
    catch(IOException e)
    ErrorHandler(Const.nErrorConnectFailed,"IOException error");
    Runtime rt = Runtime.getRuntime();
    String strCmd = getServerCmdLn();
    try
    rt.exec(strCmd);
    catch(IOException ioe)
    System.out.println("IOException - error");
    return false;
    where the strCmd is "c:\ispTOOLS\ispjtools\vm142\jre\bin\java.exe -DMOD_IPC_DEBUG=1 -DMOD_IPC_SHOW_MSGS=1 -jar c:\ispTOOLS\ispjtools\bin\JDispatch.jar -PortFile=c:\temp\port.txt"
    When I run the application, I receive an IOException with error code 2; but, with the same command line run through the DOS prompt window I dont see any error.
    By the way, with unknown reason, my C:\temp has "read only" attribute alway set and I can not change it (another mystery); so, I rename the original c:\temp\ to c:\temp_ and create a new c:\temp\ with no "read only" attribute.
    Anybody knows why?

    Try to read the process Error stream
        public static void main(String[] args) {
            Runtime runtime = Runtime.getRuntime();
            Process process = null;
            InputStream errStream = null;
            try {
                process = runtime.exec("d:/j2sdk1.4.1/bin/java.exe -version");
                errStream = process.getErrorStream();
                int ch = -1;
                while ( (ch = errStream.read()) != -1) {
                    System.out.print((char) ch);
            } catch (IOException e) {
                e.printStackTrace();
                System.exit(1);
            } finally {
                try {
                    if (errStream != null)
                        errStream.close();
                    if (process != null) {
                        System.out.println("Process terminated with exit code " + process.exitValue());
                        process.destroy();
                } catch (IOException e) {
        }

  • Java.exe has encountered a problem and needs to close.

    I installed Oracle8i on my P4 then when I reboot I get the error "java.exe has encountered a problem and needs to close." even if I click on "don't report" if keeps popping up, anything to do to resolve this?
    Thanks.

    Hello...
    i had the same problem. then when i searched oracle documentation, it suggested as follows:
    1. go to your %ORACLE_HOME%\Apache\Apache\conf\httpd.conf
    2. comment out 2 lines that has
    include ....\jserv.conf
    include ....\oracle_apache.conf
    so your new line will be:
    #include ....\jserv.conf
    #include ....\oracle_apache.conf
    Those lines are at the end of the file.
    3. save the file.
    4. reboot your machine.
    that solution works for me.. hope it works for you too.
    GOOD LUCK!
    --Melani                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Error while running java.exe

    Hi,
    I have installed JDK1.4 on Windows NT4.0.
    The path where the "javac" and "java" are is "D:\jdk1.4\bin."
    I have added this directory to the PATH variable.
    I have no problem when executing "javac" from any location(Directory) where as its reporting an error "no 'client' JVM at 'D:\\bin\client\jvm.dll' ".
    And the same is not reporting any error if I execute it by giving the complete path or if I am in the same directory i.e D:\jdk1.4\bin.
    Regards,
    Sridhar.

    Did you add "D:\jdk1.4\bin" to the end of the Path variable? Perhaps the OS is finding another java.exe before it finds the one in d:\jdk1.4\bin. Try putting "D:\jdk1.4\bin;" at the start of the Path variable.

  • Hi i wrote a java program for scanning a system for java.exe 's

    hi ,
    i wrote a program which scans the system for java.exe 's and then it captures them in a linked list and then i
    iterate through it for "\\Java\\jdk1.5.0_08\\bin\\java.exe and my aim is to return true in case the linked list contains the string "\\Java\\jdk1.5.0_08\\bin\\java.exe" and stop scanning the system.
    If the linked list does not contain "Java\\jdk1.5.0_08\\bin\\java.exe" it should return false.
    But my problem is the program is continuing to scan the system even if the linked list has "\\Java\\jdk1.5.0_08\\bin\\java.exe"
    Any sort of help is appreciated.
    The code is as follows:
    package com.installanywhere.exper;
    import com.zerog.ia.api.pub.CustomCodeRule;
    import com.installanywhere.exper.SearchTool;
    * @author
    public class eFileTool extends CustomCodeRule {
         /* (non-Javadoc)
         * @see com.zerog.ia.api.pub.CustomCodeRule#evaluateRule()
         @Override
         public boolean evaluateRule() {
              // TODO Auto-generated method stub
              SearchTool searchtool=new SearchTool();
              boolean valueTocheckfor=false;
              valueTocheckfor=searchtool.find();
              String someothervalue=Boolean.toString(valueTocheckfor);
              if(someothervalue.equalsIgnoreCase("true")){
                   return true;
                   //System.exit()
              else if(someothervalue.equalsIgnoreCase("false")){
                   try {
                        Thread.sleep(5000);
                   } catch (InterruptedException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
              System.out.println(valueTocheckfor+"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
              return valueTocheckfor;
    The code of search tool is
    package com.installanywhere.exper;
    import java.io.*;
    import java.util.*;
    public class SearchTool
         * @param args
    static     boolean valuesToReturn=false;
    static     boolean anothervalueToRefer=false;
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              SearchTool           t = new SearchTool();
              System.out.println("xxxxxxxxxxxxxxxxxxxx");
              boolean someArgument=t.find();
              System.out.println(someArgument+"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii"+"");
                   public boolean find()
                        System.out.println("2222222222222222222");
                   boolean someThing=searchcomp("java.exe");
                   System.out.println(someThing+"inside the othere one");
                   return someThing;
              public boolean searchcomp(String file)
                   System.out.println("3333333333333333333333");
                   File[] drives=File.listRoots();
                   boolean valueIdentified=false;
                   for (int ctr=0;ctr<(drives.length-1);ctr++)
                        valueIdentified=search(drives[ctr],file);
                        System.out.println("4444444444444444444");
                   System.out.println(valueIdentified+"something i need to accomplish");
                   return valueIdentified;
                   public boolean search(File dir,String file)
                   File[] directories=dir.listFiles();
              System.out.println("55555555555555555555555");
                   if (directories == null)
                        System.out.println("666666666666666666666666");
                   return false;
                   for(int ctr=0;ctr<directories.length;ctr++)
                        if(directories[ctr].isDirectory())
                             System.out.println("77777777777777777777777777");
                             valuesToReturn=search(directories[ctr],file);
                             System.out.println(valuesToReturn+"india is great");
                        else
                             if(directories[ctr].getName().equals(file))
                                  String path = directories[ctr].getAbsolutePath().toString();
                                  System.out.println(path);
                                  List someList=new LinkedList();
                                  anothervalueToRefer=allPaths(path);     
                                  System.out.println(anothervalueToRefer+"god damn it");
                                       //System.out.println(anothervalueToRefer+"let me seeeeeeeeeeeeeeeeeee");                                        
                                  return anothervalueToRefer;
                   return valuesToReturn;
                   public boolean allPaths(String allPath)
                        List l=new LinkedList();
                        String somepath=allPath;
                        l.add(somepath);
                        //return l;
    /*if(l.contains("C:\\Program Files\\Java\\jdk1.5.0_08\\bin\\java.exe")){
                             System.out.println("yepeeeeeeeeeeeeee");
                             //System.exit(0);
    else{
         System.out.println(" the face");
                        ListIterator li = l.listIterator();
                        System.out.println("inside the method of all paths");
                        if(li.hasNext())
                             if(li.next().toString().contains("\\Java\\jdk1.5.0_08\\bin\\java.exe"))
                             System.err.println(somepath+"this is the path i wanted to resolve correctly");                         
                             return true;
                             else{
                                  System.out.println("trueeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
                                       return false;
                        else {
                                  return false;
         }

    A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.
    *http://forums.mozillazine.org/viewforum.php?f=25
    The helpers at that forum are more knowledgeable about web development issues.<br>
    You need to register at the MozillaZine forum site in order to post at that forum.

  • How to start java.exe from a java program in windows ?

    Hi,
    I did like to know, if its possible to run java.exe from a java program on windows ? The java.exe should be visible from checking the processes that are currently running using the Task Manager on windows.

    Runtime.getRuntime().exec("java Sample");

  • Please help me. Cant located the Path of java.exe ???

    I have Windows 7 64bit OS. I download all softwares in 64 bit version.I just download Oracle sql developer
    4.0 (4.0.0.13.80) and jdk 7 u45 with netbeans 7.4 and i also download jre 7, all software are successfully installed on my system. but when i open sql developer ,it prompt for path of java.exe but i cant find the path. in "C:\programs files\jdk7\bin\" but there is no .exe files.
    please help me or guide me , what to do???
    I installed all the softwares successfully. but i can't understand where the problems is ?

    The easiest thing to do is download this:
    "Windows 64-bit - zip file includes the JDK 7"
    When you run the EXE, it won't prompt for anything, it will just run.
    In fact, if you have the JDK properly installed on Windows, the exe won't prompt for the location of Java anymore, so it sounds like you may have an install problem with your Netbeans install?

  • How to get Class Name given along with java.exe

    Hi friends,
    I am Mukesh, currently facing one problem
    On command prompt to execute any java program we give :
    C : \.-- > java ClassName
    This ClassName I need in my application, I want to do some post processing on that.
    Actually see what I want :
    public class Base
    static Base object;
    public static void main(String[] args) throws Exception
    object=(Base)Class.forName("Derived Class Name").newInstance();
    void main()
    public class Derived extends Base
    void main()
    System.out.println("Hello World");
    I am trying to Run Derived Class, since there is no entry point found, default JVM invoke the Base class's entry point, there I want to load
    Derived Class, but I am not getting any identity of derived class in Base class.
    I found one temporary solution to this problem :
    C: \ -- >java Derived Derived
    & in Base class, I have loaded class
    object=Class.forName(args[0]).newInstance();
    But I dont want to write the same thing twise just to know the Class name which is given along with java.exe.
    Is there any way to get the ClassName supplied with java.exe
    I have tried a lot, still I am trying !!!
    If any one knows the answer, help me.
    Regards.
    Mukesh.

    Multiple post. Please continue in other thread
    http://forum.java.sun.com/thread.jspa?threadID=5196980&tstart=0

Maybe you are looking for