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.

Tags: Java

Similar Questions

  • To run the Java program after logging

    Hi all

    I need to run a Java program after the filing of a document by a user.

    Is it possible to do?

    Any pointer and documentation to this will be really useful.

    Thank you and best regards,

    Nitin

    Hi Nitin,

    1 RIDC API Developer Guide - http://docs.oracle.com/cd/E10316_01/ContentIntegration/ridc/ridc-developer-guide.pdf

    2 jARs - idcserver.jar should suffice the need the other jars - idcloader.jar, idcupgrade.jar, jspserver.jar (these pots are available in the files of the installation itself - \Oracle_ECM1\ucm\idc\jlib)

    3. I was talking about DynamicPrefix example in the HowToCompoment. You can also get this installed separately if it is not installed yet. This component will change the AutoNumberPrefix for recently checked in content depending on the Type of content. The user can specify what prefix must be used for Types of content with a simple configuration file, and during the recording, the name content must be generated based on this prefix and a sequential number.

    The file 'data_access_environment.cfg' contains all of the data on what will be the prefixes for each type of document. You can add or edit this file, and changes will occur when restarting.

    This element shows:

    • Filters with custom Java code

    HTH

    -Anand

  • 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);
                    }
         }
    }
    
  • 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.

  • java program have main method

    java program have main method

    I note that this issue is still marked as "no response." Not sure if this is due to inactivity during the holiday season, or if there is still confusion. Let me throw in an another wrinkle: If the JAVA virtual machine requires a main() method to launch a program, your code may or may not be liable for this method. In a single normal stand, application of line control, Yes, you do have to provide a main method. But there are other common scenarios where you do not have. If any of these scenarios apply to you, don't waste time searching through the code to the main method, because you won't find it.

    1. web Applications. They often run under a servlet that calls / invokes the application to manage applications for individual customers (e.g. Wicket). In this scenario, the Web application acts as a "listener". (To complicate things even more, the servlet runs inside a parent container, such as Tomcat). The bottom line is, however, that your application itself will have a main() method. Because of some top-level code.

    2. parent controllers. Some frameworks (Spring Batch comes to mind) provide the main method and call the individual portions of your code to execute the steps, tasks, etc. In this scenario, you will not see a main() method, because it is "hidden" in the parent layer.

    There are probably other scenarios as well where the location of the main method is not obvious. These are just two of the most common.

  • is it a good idea to run the JAVA virtual machine inside the hypervisor?

    If I want to write a global user inside the hypervisor platform and you want to reuse some java lib, it's a good idea to install and run the JAVA virtual machine as part of global programs of the user inside the hypervisor? Thank you.

    Maybe you listen to the wrong people?

    The ESXi hypervisor is pretty well stripped of the linux console you are talking about, there is a thin busybox linux like environment, but you are strongly advised not to run anything in there.

    Performer of applications within this console may have all kinds of side effects such as severely affect the performance of your computer virtual guests.

    Why the hell would you want to run the JAVA virtual machine inside the hypervisor? What is the reason why you want to do this? If it's because you get a better return, then you're wrong, the console becomes just a little bit of resources available on your host computer.

    If this is to go directly to the features that the hypervisor provides then the VMA we're talking is the answer.

    So getting back to your question initial for EACH use case that I can think it's a very bad idea.

    --

    Wil

  • help on how to compile and run the awt programs

    any1 can tell how to compile and run the awt programs

    Published by: 863765 on July 18, 2011 03:29

    The same way you compile and run any other Java program.

  • Java program will not work in his development directory

    I have a 12 years/applet program that is on the web for 12 years. It's an interactive color wheel:

    * http://r0k.us/graphics/SIHwheel.html

    My development tools are a nice text editor and the JDK. No IDE is involved.

    I'm doing a major update, which shows the names of the closest color to a database of the names of 1 567. I wrote it so it can run as an applet or program, and it works beautifully in the development directory. However, when I move the jar anywhere else, the following error appears:

    D:\progming\temp > java SIHwheel
    Exception in thread "main" java.lang.NoClassDefFoundError: SIHwheel
    Caused by: java.lang.ClassNotFoundException: SIHwheel
    in java.net.URLClassLoader$ 1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged (Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    to Sun.misc.Launcher$appclassloader$ AppClassLoader.loadClass (Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    The main class is not found: SIHwheel. Program ends.

    The file I'm running is SIHwheel.jar. To further complicate things, TI sorting only works as an applet. Main elements of the canvas are missing, like the preset itself. So 3 cases:

    (1) directory of the part: works beautifully as a program
    (2) another directory, fails as program
    3) run as an applet, highly degraded operation

    This used to work fine, any where, as a program or an applet. There are two fundamental differences about what I did before.

    (1) the new ntc.class has an own main() (essentially for the test and demo for developers who can use it). I don't think it's a problem, because I have a jar manifest by declaring that the class has the main() I want to run.
    (2) above, all classes comes from the SIHwheel.java file. However, ntc.class is from the ntc.java file. All classes are jar'red in SIHwheel.jar, however. Since ntc.java implements the functionality of the script ntc.js (name as color), and I want to share it, to keep this as a separate file.

    I include a manifest file in the jar and, from the unzipped pot, the MANIFEST file. MF displays a line from the Main-Class: SIHwheel

    What's not?

    No, the main method is not called when you run a cmdlet (only when run as an application). See the Applet tutorial [url http://download.oracle.com/javase/tutorial/deployment/applet/subclass.html] (note that the example he use Swing and you use AWT).

    A static initializer is called when a class is loaded. If do you the private init() method and make sure it is called when someone uses the class with:

    public class NameThatColor {
      private static float[][] rgbhsl;
      private static final String names[][] = { .. }
    
      static {
        init();
      }
    
      private static init() { ... }
    }
    

    Note that the static variable are reported before the static initializer and nothing else should call init();

  • 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

  • How to ski a Java program in peoplesoft 8.8

    Hello

    Here is my requirement.

    In Peoplesoft 8.8 END, I want to run a program written in Java for every half hour.

    Can I use process Scheduler to run Java programs, if so how? or what I can use in peoplesoft

    Please let me know if you have any ideas.


    Sree

    Thank you Sree. You are right. I searched for information on creating a process definition and execution control page. I could not found. I think I learned this in my App Engine class. I do not have because it documented anywhere but in my App Engine class manual.

  • How to connect to a windows OS to IOS and run a windows program?

    Hi all

    I would like to know if possible to run a windows program (i.e. DIR or WINVER) on a machine windows on the network via a computer of IOS command line is connected to the same network. Basically, I have 2 computers in a network, a MAC OS and the other is WINDOWS. MAC OS I want to run a command of windows inside the windows machine.

    For example, via the terminal in my mac I want to connect on the windows machine, and run any windows program I have in the windows machine.

    I know it's possible to do on linux via the command line WMI Windows Management Instrumentation command-line.

    Do we have something similar to the WMI for IOS command line?

    Rodrigo.

    I'm confused. You mention a PC (Windows OS), Mac OS (Apple computer) and iOS (Apple iPod touch, iPhone and iPad operating system).

    You can get apps that allows a computer iOS to use a computer mac or Windows computer such as LogMeIn or GoToMyPC.

    Yu can also get the app that allows you to use your Mac to access a PC.

  • VI to run the .exe program

    Hello

    use of labview to activate and run a .exe program located in a specific folder on the c drive?

    When I run the program .exe manually from the command prompt I navigate to the desired folder, and then enter "runapplication.exe" to run the compiled c code.

    I've searched the forums labview but especially articles relating to the creation of executables labview or labview .exe programs.

    Also could call or run the TestSTAND .exe program without having to create a VI?

    Thank you

    try System exec.

  • 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="">

  • Windows 2003 Server keeps stopping every hour on and saying that he must run the Setup program to create a domain controller.

    WINDOWS 2003 SERVER STANDARD EDITION

    HELLO TECH TECHNICAL SUPPORT ENGINEERS.

    WE HAVE WINDOWS SMALL BUSINESS SERVER 2003 STANDARD EDITION,

    WE HAVE EVEN INSTALLED AND CONFIGURED IN A WORKING GROUP, WE DO NOT WANT TO CREATE A DOMAIN CONTROLLER,

    BUT OUR SERVER IS BLOCKING DOWN IN ANY ONE HOUR AND SAY TO RUN THE SETUP PROGRAM TO CREATE THE DOMAIN CONTROLLER.

    PLEASE SUGGEST, AS WE DO NOT WANT TO CREATE DOMAIN

    CONCERNING

    DECCAN TEAM

    Post in the Windows Server Forums:
    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer/

  • A way to run 16-bit programs on vista?

    Problem:

    • Software requires 16-bit Windows compatibility
    • Software won't run, but I will start execution
    • The software is Final Fantasy 7 for PC (Yes, it's old, but I like my Classics)
    Solutions:
    • Compatibility step by step?
    • link to the emulator?

    Hi Uber Nerd,

    Welcome to the Microsoft Answers site.

    We would like to get a better understanding of this issue, so we can better help not only you but other users with similar problems.

    one) where you can play the game before on Vista?

    (b) what version of Vista are you using? Is this a 32 bit or 64 bit?

    Method 1:

    You can try to run the game in compatibility mode for XP. Follow the steps mentioned below.

    Run the program in compatibility mode
    When you select the compatibility mode option, Windows Vista emulates the operating system that is selected when you run that particular program. To run the program in compatibility mode, follow these steps:

    1. click on start to reduce this includes this imaand, then type the name of the program in the box start the search .

    2. in the list of programs , right-click on the program name and then click Properties.

    3. on the compatibility tab, click to select the checkbox run this program in compatibility mode for .

    4. in the list, select an operating system, and then click OK.

    For more information, follow the below mentioned article.

    The Windows Vista Application Compatibility Update

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

    Method 2:

    You can be able to work around this problem by installing the version of Microsoft Windows XP video drivers for your video card. To learn how to get the version of Windows XP video drivers for your video card, contact the manufacturer of your video card. For more information about your hardware manufacturer, visit the following Web site:

    http://support.Microsoft.com/GP/vendors/en-us

    See also check the article mentioned below.

    Some programs 16 bits BACK and the command prompt does not work in mode full screen in Windows Vista

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

    Hope this information is useful.

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for

  • No scroll bar displayed

    I upgraded my Mac OS 10.10.4 (Yosemite) and now I have no scroll in Firefox windows bar. I can use the arrow down to get a scroll bar to appear, but it is terribly boring. Even after I arrow down and the scroll bar appears, it will disappear after us

  • I can't hear any sound on my laptop, please help

    This morning my hp laptop is an update of the BIOS on its own. After the update, I started using the laptop and soon realised that is no longer, I could hear any audio device. I tried to restart, run sound test, troubleshooting, restore computer to a

  • HP Compaq 6730 s: back - light Windows 7 vs Ubuntu

    Hello!I have this problem:When I turn on the laptop screen is black. Connection of the external screen I can see BIOS and Windows 7, but new and Black's built-in display.A certain angle, it is possible to see the image on the screen. By pressing fn +

  • DVD A DS8A5LH FAILS

    DVD A DS8A5LH FAILS ON MY HP PAVILION DV7 NOTEBOOK. ARE UNABLE TO BE RECOGNIZED I tried delting is from Device Manager to re - enter to reboot but it says that there is a problem in the registry with it. It worked 3 days ago. Windows cannot start thi

  • 'Enter' app closes.

    Hello. I have an application that has many buttons of noninale on the main Board. A button is a 'Quit' button that closes the application. Another is a text window that sends the contents of the window a serial comm port (use the VAL_ENTER_VKEY test)