New enforcement of Java program

Hey,.

So I would be able to run another java program.
File directory = new File(".");
            try {
                List<String> l = new ArrayList<String>();
                l.add("Java "+directory.getCanonicalPath+"AnotherProject/bin/main.class");
                ProcessBuilder pb = new ProcessBuilder(l);
                pb.start();
            } catch (IOException ex) {
                ex.printStackTrace();
            }
What I am doing wrong? I get the error message: "No such file or directory."

Edited by: Moopz on November 8, 2010 01:01

It is entirely up to you! This will be your point of entry. If you are able to think you application as a server of two parts, a customer and you have no problem to build the parties separated in applications of 'work', then their respective main methods would be good enough as beginning-methods. It's just a name.

Really, the principle is simple, let's assume that you have a HelloWorld class (think server) and one as a search for class GoodbyeMoon (think client):

public class GoodbyeMoon {
     public static void main(String[] args) {
          System.out.println("Good bye, Moon!");
     }
}

Then you're application can do this:

public class LoginMain {
     public static void main(String[] args) {
                // ... GUI to select MOON or WORLD
                if (userSelection == MOON ) {
                      GoodbyeMoon.main(null);
                } else {
                      HelloWorld.main(null);
                }
     }
}

Tags: Java

Similar Questions

  • New version of Java 7 udpate 40 download on firefox

    I can't download Java 7 update 40 on firefox (or IE).
    I tried everything suggested in the forum here and get the same message:

    "The connection was reset while the page loading..."

    (All my other pages/research charge very well).

    It seems to have started when my pc did an automatic update of Windows 9, when nothing else worked, I therefore uninstalled Windows 9 and am now under Windows 8, but Java still doesn't work do not.
    I uninstalled the old version of Java in my programs.
    including all the 'toolkits' etc. You don't know if it was the right idea, but now...
    I checked activate java in all the internet options boxes etc as said on the forums.

    My Windows Vista is running on 32-bit operating system - has always...
    Could be the problem? The new update of Java 7 is 64-bit?
    However, when I try and follow the instructions on the Java site to download for 32-bit.
    I get the same problem and the same standard page showing me there was a problem connecting etc...

    I don't know if it's a problem of Firefox or an IE one? It will not download on IE... and I checked all the boxes it etc, tried to disable the firewall etc...

    I see on the Firefox plug-ins, called tookkit of java is disabled due to security and I can't change this setting... that is the problem?
    I just, laymans pc notions... can.; "t make things complicated, but is it something simple, I have wrong here or is this a fault of well-known firefox... with this Java?
    If that's what should I do next?

    Thanks v more
    Rhian

    I had the same problem on Saturday, Oct. 12, and Sunday, Oct. 13. However, I was able to download and install update 40 this morning (Monday, 14 October) successfully. It must have been a problem with the Java download site as there is problem in Firefox and IE, and it seems to be fixed now.

  • When firefox loads I get an error message "cannot find / / / jpsnotify.exe." now load Firefox, but every time I go into something else, it seems. This started to happen when I downloaded a new version of java.

    I downloaded a new version of Java and then I started to have a "windows can't find c:\java\jre6\lib\deploy\jqs\ff\...------..» \.. \bin\jqsnotify.exe. now, this only happens when loading firefox. It happens through the use of firefox during the loading of other programs. any suggestions?

    This has happened

    Each time Firefox opened

    Try to reinstall Java. See using the Java plugin to display interactive Web sites content

    A quick search for jqsnotify.exe on Google indicates that it is related to the Java QuickStart option.

  • Java program freezes computer

    Hey guys, I'm having a problem with a java program that cause my computer to freeze when I open the program. The computer is running Windows XP. The program I use is the specific work for my work. Really no one else using this program except my business, it is manufactured by our company. Yes, I should ask them what the problem is, but they eventually give a new computer, which is a huge pile of * and end by removing important information and programs on my computer that they will not re - install (programs are locked on their license key that they don't tell anyone) is there a way you guys can help me solve what's happening? It's really important for me to get this program to work correctly since it is my work that revolves around it. The program opens, but it's like a 50-50 chance. I really appreciate it!

    Hello

    Thanks for the reply.

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.

    http://social.technet.Microsoft.com/forums/en-us/category/Windowsxpitpro

    It will be useful.

    Let us know if you encounter problems with Windows in the future. We will be happy to help you.

  • Run a Java program

    Hello

    I created a java program using eclipse... How package and run the program under windows or Unix?

    Thank you

    Right click on the project in the Package Explorer. In the menu drop-down run as-> a run Configuration. Click the new button. In the name box, choose a name for your configuration. Make sure that the right project is illustrated in the area of the project. If this is not the case click on the Browse button and select the right project. Make sure that the right main class is listed in the main class field. If this is not the case click on the Browse button and select the correct class. Click on apply. Click Close. In the context menu, click Export. Double-click the Java folder, so it goes down. Double-click the executable JAR file. In the launch Configuration drop-down list box, make sure that the right project and main class appears in this form: name of principal name Configuration class. Click the Browse button to set the location that you save the Jar file. Click Finish. Now, to find the JAR file and double-click it to start the program.

  • Find the path of the competing java program

    Hi all

    I work with iRecruitment responsibility of the recruiter.
    Here I can create new job opportunities.
    After the creation of vacancies, they should be approved by a Manager


    When I create vacancy and submit this vacancy for approval
    It is stored in table hr_api_transactions.

    and when the Manager has approved this particular post then this vacancy
    stored in another table per_all_vacancies.
    But the problem is this position that stored in the hr_api_transactions table
    It removes from this table.
    I want to know who transfer the information of this hr_api_transactions to per_all_vacancies table manager vacancy.


    In my view, there are some concurrent java programs that transfers information of vacancy from one table to another table.


    If there is no concurrent java programs, so that that work?

    Double wire.

    How to find the code-behind application
    How to find the code-behind application

  • ROWID in java program update

    Hi people,

    I update a row by using the ROWID in java program, it is not to update the documents based on the rowid... I copy the code example


    try {}

    for (i = 0; i < size; i ++) {}
    stmt.clearParameters ();

    oracle.sql.ROWID (oracle.sql.ROWID) = list.get (i) ROWID.

    stmt.setString (1, table);
    stmt.setString(2,idArray[i]);
    stmt.setString(3,message[i]);
    stmt.setROWID(4,rowIds);
    stmt.executeUpdate ();
    stmt.addBatch ();

    }

    Java method to date SQL

    private String getUpdateSqlString() {}
    StringBuffer sql = new StringBuffer (20);
    SQL. Append ("update xx_custom_table set status_flag =?,");
    SQL. Append ("id =?, status_message =?") where rowid =? ");
    SQL. Append ("status_flag = 'U'");

    Return sql.toString ();
    }

    Can someone explain this?

    Thank you
    Murielle

    kumar_d wrote:
    I checked the list, valid rowid is filled in in the list.

    Can you explain how determine you who and what, exactly, do you mean by "valid rowid '?

    You declare that all LIST items is
    -A ROWID into a format valid
    -This corresponds to a line in XX_PRODUCT_TABLE
    -Where STATUS_FLAG = 'U' already?

    The only way to get this information is to query the XX_PRODUCT_TABLE table, probably if you do this before this code snippet runs. Any chance that the line is modified or deleted by another session between the moment where you query the database to get the ID and when you run the update?

    And, more generally, why are you using the ID here? It seems strange that you could identify lines of update, store the set of rows to be updated in a collection of Java and then course this collection to make the actual updates. A simple UPDATE based on a game, or at least a stored procedure, would seem much more effective...

    Justin

  • After the "new version" download Java 6 times, my plugin check page indicates that he has disabled my 'version outdated' and asks me to upgrade. What do I do?

    Background:
    I had this problem for several months now. This problem started when an update came to Java on the Firefox Plugin check. Quickly, I installed the new update of Java. But the Firefox update register that I downloaded, even though I refreshed the page. So, I got rid of the old Java and downloaded again the new Java. When the page has continued to post the same message he had before, I downloaded a few times more. Finally, Firefox stopped to say that I was at day. Then a few weeks later perhaps I check Firefox Plugin, and on the page it says that I'm overwhelmed in Java. So I downloaded Java again. But Java was still in the list, with the red and said that he had to be updated. I restarted the computer. Then I restarted Firefox Mozilla with no Add-ons. When Java appeared still to be updated, I gave up and did not something more on this topic.
    Problem:
    Today, I decided to check my plugins. Java was not updating the list, and at the top a banner said, "Missing JAVA? For your security, Firefox has disabled your outdated version of Java. Please install the latest version. "I clicked on"upgrade to the latest version"and was brought to the Java page. I clicked on the download button. My cache indicates that it was this same Java plug-in (see background) download (6). I chose the re - download anyway. But Firefox always insists on the fact that I him have not downloaded.
    Question:
    Should I go to the control panel of Java and change something? I have to fix a few settings on Firefox? Should I disable Java entirely, delete all the files related to Java on my computer and start over with Java? What should I do?

    Try to use http://ninite.com/java/ninite.exe to install Java. Please note that even if download you it you have to double click it to run and install.

  • Remove bit 32 and 64 java programs? Experts say that there is still no 'solution '.

    Homeland Security alerted to disable Java programs on your computer. I deleted everything that he saw Java and Oracle... When is it safe to reinstall Java 32 and 64 bit... and is it recommended to do anyway?

    Hello

    If you need Java just turn off until needed. If you do not use Java, you can
    uninstall it.

    How can I disable Java in my web browser?
    http://www.Java.com/en/download/help/disable_browser.XML

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • Error: "C:\Program Files/reviversoft\Registry Reviver\unins000.msg"is missing." "Fix the problem or get a new copy of the program.

    Original title: cannot start computer

    Cannot start computer

    This response comes and does not let me start the computer (Message missing file 'C:\Program Files/reviversoft\Registry Reviver\unins000.msg "is. Fix the problem or get a new copy of the program) what should I do to get the computer?

    Hi Dan Maarsman,.
     
    -Did you change on your computer before this problem?
    -Do you have any third party registry cleaner program installed on your computer?
     

    Start your computer Safe Mode and check if you can successfully start.

    Safe mode starts Windows with a limited set of files and drivers. Startup programs do not work in safe mode, and only the basic drivers needed to start Windows are installed.

    For more information, see:

  • "Any new name for the program" has encountered a problem and needs to close. Sorry for the inconvience

    Whenever we try to install something new, that settles it, but when we get the same error message

    "the new name of the program" has encountered a problem and needs to close.  Sorry for the inconvience

    We can't get anything to run now

    Hello

    1 is this problem limited only when installing an application?
    2. what application are you trying to install?

    Method 1.
    I recommend you to reregister the Installer engine.
    Here's how:
    a. Click Start, click Accessories and then click command prompt.
    b. at the command prompt, type the following and press ENTER after each line:

    MSIExec /Unregister
     
    MSIExec/regserver

    Method 2.
    For other methods, see the article below.
    How to troubleshoot issues that may occur when you install, uninstall, or upgrade one program on a Windows computer
    http://support.Microsoft.com/kb/2438651/en-us

    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Try to upgrade to the new version of Java and get error 1606: could not access network location %APPDATA%\protector.exe

    I tried the upgrade to the new version of JAVA kept b/c getting reminders... uninstall the older versions (2)... réessayées... got the following error code: "Error 1606.  Could not access network location % APPDATA%\ ».  I tried of looking for help on the Java site. and I tried a few suggestions listed... no luck!  CAN SOMEONE PLEASE?

    Thank you!

    gasweetpeach54

    The usual reason for this error message, it's that some of the registry entries mentioned in the following items are damaged.

    http://support.Microsoft.com/kb/886549

    http://support.Microsoft.com/kb/2258121

    If you are unable to fix it by using these methods, try to create a new user account, give administrator privileges and use it to install Java.

    http://Windows.Microsoft.com/en-us/Windows-Vista/create-a-user-account

    http://Windows.Microsoft.com/en-us/Windows-Vista/change-a-users-account-type

  • My C: drive is almost full, how can I move to my new hard drive F: programs to free up space on the C: drive?

    My C: drive is almost full, how can I move to my new hard drive F: programs to free up space on the C: drive?

    Hello

    You can not move installed programs

    you will need to uninstall them and reinstall them on your F: drive

    _____________________________________________________________________

    and read this;

    see if this program helps you to determine what is take up space

    http://www.Jam-software.com/treesize_personal/

    by default system restore will have up to 15% of the capacity of the hard disk

    you would like to reduce this amount

    http://www.Vistax64.com/tutorials/76227-system-restore-disk-space.html

    http://www.vista4beginners.com/system-restore-space-used

    also use disk cleanup

    http://Windows.Microsoft.com/en-us/Windows-Vista/delete-files-using-disk-cleanup

    The other Options tab is available when you choose to clean up the files of all users on the computer. This tab includes two additional ways to free disk space even more:

    • Programs and features. Open programs and features in Control Panel, where you can uninstall programs you no longer use. The column size in programs and features shows how much disk space each program uses.

    • System Restore and shadow copies. Guests delete you all but the most recent restore point on the disc.

    also scan for malware

    Download update and scan with the free version of malwarebytes anti-malware

    http://www.Malwarebytes.org/MBAM.php

    and read these information from microsoft on windows optimization

    http://Windows.Microsoft.com/en-us/Windows-Vista/optimize-Windows-Vista-for-better-performance

  • The installation files are corrupted. You can buy a new copy of the program

    Whenever I try to install a new software or games and then permanently in error "the Setup files are corrupted. You can get a new copy of the program.

    Please help me...

    first scan your computer entirely with good antivirus.

  • 9550 java programs Simulator does not

    I have eclipse Build id: 20100218-1602

    with BlackBerry_JDE_PluginFull_1.1.2.201003212304 - 12.exe installed.

    using the 9550 Simulator.

    I brought samples of BB in my workspace and then tried some on my 9550 Simulator, but all I get is the spinning hourglass and then a black screen.  If I click on the screen, it goes to the main BB screen with messages, e-mail, sms, contacts, etc..

    The Simulator, I also tried file > load Java program and chosen a cod file that is made.  I will get a stopwatch of spinning and then be returned to the main screen of BB again.

    The apps that I tried: HelloWorldDemo and GPSDemo.

    Any ideas on what I could do to fix this or help out more?  I'm surprised that I get no error of sorts on the BB.  Are there permissions or something that needs to be fixed? For HelloWorld? hahaha!

    Have you tried to check the download folder to see if they appear in?

Maybe you are looking for