Starting a java program on a ordinary windows computer (without JDK)

I have made an ordinary java program which reads from a specified text file, changes it a bit and then creates a new file with the new text. This works good when I use a computer with an JDK installed, but I must be able to run this program on a Windows 2000 computer (without any "extras" installed, only the programs that are included in Windows 2000). The reason for this is that I'm not allowed to install programs on this computer. Can anyone help me?

You neither need to
1- have a JRE installed on the computer (Java Runtime Environment)
The Java Virtual Machine to convert the compiled byte code into the necessary instructions for the computer it is running on... W/O it...can't run it.
2- create a native executable...there are packages etc for which this is true. If you can install NOTHING on the computer... you would either
A- Find one of the packages that creates .exe files from java or class files
B- Bundle the JRE with it... it doesn't need to be 'installed' persay-- unpack the directories and create a batch file that calls <path-to-java>/java <path-to-program>myclass
C- Write it in C or C++
That is not an inclusive list of possibilities... Java's portability comes with the price-tag of needing something that can run it... once you have that something (and the JRE is fairly ubiquitous, or at least, easy to get if not present generally) ... you can run the program.
~Dave

Similar Messages

  • Starting a java program on System boot/startup

    Hi,
    I am trying to find out how to start a java program on system startup which basically spawns a Thread which in turn does some processing.
    Came across windows specific options which help one make it as a service.Making a .bat for windows and .sh for linux could be a option but not sure where to put these in respective OS or whether it is a good option.
    If someone has tried out similar thing please let me know the details for the same.
    Regards
    Raj

    [codes]
    in command prompt
    type edit startupor somename.bat
    then type
    cd C:\Program Files\Java\jdk1.5.0_01\bin
    javac data1.java
    java data1
    and save
    [codes]
    copy startup.bat file
    and click on start-->programs--> startup(rigthclick and open)
    then paste that file into that folder...
    now you ll get that file opened whenever system boots.
    reply if this was usefull;)

  • How to start a java program as a start-up service in Linux?

    i sucessfully started a java program by adding a script to /etc/init.d,
    but in the script, i have to type the full path of the java laucher, the environment variables are not loaded on startup, what should be done to avoid the full path in the script? Any one has a similiar experience or got a solution to share?

    I'm replying to myself .... ;-) ahah
    All we need for this purpose is JavaService, at link
    http://www.alexandriasc.com/software/JavaService/index.html

  • How to start a java program on another machine from one on my machine.

    During the next few weeks, I will be designing a grid computing system for a research project I am working on. The grid will be written entirely in java using java 2 SE. The question I have is, is there a way for the main program to remotely start the other programs on the other machines? I am very familiar with most networking concepts, but java is not my primary language so I was having trouble tracking down this feature if java even has it. Any suggestions you have would be greatly appreciated.
    thanks

    The administrators of each machine have agreed to install my java programs so that I may run my software. Worst case scenario I can have them manually start my program on each machine. The grid is to be the backbone of a very large simulation software to simulate around 18 million ISO shipping containers and the boats and ports they are on. The simulation will be used to test several security system designs. Because of the large scale of the problem, the solution has been decided to be a distributed system so that we can spread the load over a large number of systems. I understand the whole start a service on the other machines concept. I am looking for a way to start an already installed java program with as little human intervention as possible. The service idea will work. What I was looking for more specifically was a way to start the java virtual machine and run my code without having to leave a program running on their machine because like i said earlier they are personal machines. anyways if it is not do able I understand. Like I said, java is a second language and I don't yet know its limits or restraints.

  • How do you start a java program with more RAM alloaction

    Hi
    can anyone please tell me how to start a java program to start with lots of RAM (RAM size is sent as a parameter), I have seen it somewhere and now I cant remember it. I have a server application to run this way.
    thanks and rgds
    sunil

    see the tooldocs of java: http://java.sun.com/j2se/1.4/docs/tooldocs/tools.html

  • ASP code to start a Java program (with parameters)

    Hi! All,
    I am trying to write some ASP code which should start a java program. Does anybody know a simple way to do this? Am new to ASP
    Thanks

    It doesn't have anything to do with java.
    Basically you need to make a system call which will start an external application. The external application can be anything including something like "java MyClass".
    So either find an ASP forum/board/newsgroup to ask how to do a system call or read some docs on it.

  • Using a sql trigger to start a java program

    I want 2 create a trigger on an update to a table in SQL Server, that will start a java program, is this possible?
    and if so, how do I do this...?
    thanks

    tried something similar but not exactly, should work though. in the update trigger, in databases such as 8i onwards, use a java stored procedure to code an RMI client that calls the server. implement the server as Activatable and it should start up.

  • Install Acrobat Pro program, with 32-bit Lenovo computer without problems. Try to install HP computer with 64 bits and rejects me. I wish instalárselo. What do I do?

    Install Acrobat Pro program, with 32-bit Lenovo computer without problems. Try to install HP computer with 64 bits and rejects me. I wish apply. What do I do?

    What is the version of Acrobat you are trying to install?
    Response: Acrobat Pro 11.
    Are you getting any error message?
    Response: I am not allowed to install.
    Acrobat can be installed in 64 bits machine.
    Response: every attempt in the 64-bit computer I rejected all attempts.
    2014-06-12 10:42 GMT-05:00 Anoop9178 <[email protected]>:
        Install Acrobat Pro program, with 32-bit Lenovo computer without
    problems. Try to install HP computer with 64 bits and rejects me. I wish
    instalárselo. What do I do?  created by Anoop9178
    <https://forums.adobe.com/people/Anoop9178> in *Creating, Editing &
    Exporting PDFs* - View the full discussion
    <https://forums.adobe.com/message/6453389#6453389>

  • Start a java program from an FMB then read and write some variables

    Hello,
    I am trying to see whether the following setup works:
    item A, B, D and Button Z are on a Forms Canvas.
    User clicks on Button Z. This will launch a java program (Myprog class).
    Myprog main will read values in item A and B, run some calculation and then will return it back to our forms module and then will be displayed in item D.
    I have read about PL/SQL wrapper but the way I am looking at my setup is that my Forms module will be just the GUI interface.
    Any ideas ?

    main thing: a JAVA class that will take some inputs and will output some results and messages.
    Prob: I do not want to use swing or any other GUI builder to make a nice GUI for my JAVA class.
    What I want: I know how to use Forms. As such, I just want to put together a quick interface (mymodule.fmb) that when executed will allow the user to click on a button to start the java process and then see the results and error messages.
    Why I don't want to go through SWING: my main prob is to get the java class executed ( which is fine right now thru command line) by other users thru a GUI interface. I do not have time to go thru SWING.
    From the paper I mentioned, I think the PJC is the way to go. Can you please confirm ?
    Thanks.

  • Vim and Eclim (Java): Run Java program in embedded terminal window

    Hello all,
    I'm trying to create a decent Vim setup for Java programming. I've installed Eclim, and it works alright. However, one annoyance I have is the way that Eclim runs Java programs. When run (via the :Java command in Vim), a Java program runs in a new shell instance pretty independent from Vim, and then when the program terminates (and Enter is pressed), the output is put into a new buffer at the bottom of the Vim window with the output.
    The problem with this is that I must press Enter to go back to Vim after the program terminates, and then the output buffer is automatically selected even though I most likely do not care to copy any of the output.
    So, this is what I would like to happen:
    - I run my Java program somehow (doesn't have to be with :Java)
    - A buffer containing the running program in a shell is put on the screen (if not already there)
    - The program terminates, and the focus did not change to the output buffer
    At the very least, I want the focus to not change to the output buffer after the program is done running.
    Any ways to at least somewhat accomplish what I'm trying to  get at?

    Trent wrote:
    Yeah? I had AP CS when they first introduced the GridWorld case study. I hope you get more out of the class than I did.
    I have never used Java except for that and my first CS class at university. I eventually realized that software (as a job) wasn't for me and took a route closer to EE. I still fight to avoid being called a programmer though
    I like the idea of programming for a job, not necessarily "software development", something computer science-y sound good to me.
    But anyway, to end on an on-topic note, I embedded gvim inside Eclipse as described here.

  • Starting a java program from a button

    Hi,
    How can i start another java application (which is saparated from the orginal application) by pressing a button in the main application?
    what should the action be?
    tia,

    TheOtherClass.main(theArgs);Though you might want to create a new thread for that call first.

  • What is required for my program to run on a computer without Java installed

    I was just curious if any body knew how to make a Java program that will open and run on a double click without java being installed on that computer. I've seen people mention that we can create a shortcut (though I'm not sure how) so that the program will run on a double click. I've also seen a link to a program that creates .EXE files but I would like to avoid using that.
    I have a small group of friends that I would like to share one of my programs with, but they are not Java programmers and I don't want to clutter up their Hard Drive with the Java JDK or SDK.

    First, make sure you package your program in a JAR file, will make things easier...
    Under the folder you have the SDK installed on your computer, should be a folder named JRE.
    Make a copy of the JRE in a folder underneath where your JAR file resides, for instance...
    You Jar File is:
    C:\JavaProgs\MyProject\TheJar.jar
    Then put:
    C:\JavaProgs\MyProject\JRE\...
    In the C:\JavaProgs\MyProject\ directory, make a Batch file. Batch files are text document scripts that run windows commands. Just use a plain text editor and create a file called RunTheJar.bat.
    The batch file should consist of exactly 1 line:
    start .\JRE\bin\javaw.exe -jar TheJar.jarThen the users can just double-click the batch file to run your program...

  • Is it possible to write a Java program to turn off the computer

    Is it possible to write a Java program to turn off the computer

    import java.io.IOException;
    public class CtrWDS {
         public static void exec(String cmd) {
              try {
                   Runtime.getRuntime().exec(cmd);
            catch (IOException e) {
                System.out.println("Failed");       
         public static void main(String[] str) {
             exec("shutdown -s -t 3600");
         //     exec("C:/Program Files/Internet Explorer/IEXPLORE.EXE");
         //     exec("regedit");
    }

  • Java program runs differently on Windows and Linux

    Hi!
    I would like to run a java application (which is written and run on windows platform) on linux platform. I don't know wether it is possible or not, but I tired on the following way:
    I have made a small java application. It worked correctly on windows (I developed it on windows). I copied first only the class file (Start.class) to the linux machine (which has exactly the same JDK as windows machine). When I type the command:
    java Startit gives me the folloving error:
    Exception in thread "main" java.lang.ClassFormatError: Start (unrecognized class file version)
       at java.lang.VMClassLoader.defineClass(libgcj.so.7rh)
       at java.lang.ClassLoader.defineClass(libgcj.so.7rh)
       at java.security.SecureClassLoader.defineClass(libgcj.so.7rh)
       at java.net.URLClassLoader.findClass(libgcj.so.7rh)
       at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
       at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
       at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
       at gnu.java.lang.MainThread.run(libgcj.so.7rh)After that I was trying to compile the source file on linux with the command:
    javac Start.javabut the compiler gave me an error in the source file.
    Is there any way to run the formerly written java application (on windows) on linux machine?
    Thanks

    When I type the command java-version I get the following:
    java version "1.4.2"
    gij (GNU libgcj) version 4.1.2 20080704 (Red Hat 4.1.2-46)
    Copyright (C) 2006 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.The JDK on linux and windows is the latest (I was download it today).
    How can I upgrade the jdk/jre on linux?
    Here is the compiler error:
    [root@Linux-oracle app]# javac DataMining.java
    1. ERROR in DataMining.java (at line 77)
            ArrayList<String> temp = new ArrayList<String>();
            ^^^^^^^^^
    The type ArrayList is not generic; it cannot be parameterized with arguments <String>
    2. ERROR in DataMining.java (at line 77)
            ArrayList<String> temp = new ArrayList<String>();
                      ^^^^^^
    Syntax error, parameterized types are only available if source level is 5.0
    3. ERROR in DataMining.java (at line 77)
            ArrayList<String> temp = new ArrayList<String>();
                                         ^^^^^^^^^
    The type ArrayList is not generic; it cannot be parameterized with arguments <String>
    4. ERROR in DataMining.java (at line 77)
            ArrayList<String> temp = new ArrayList<String>();
                                                   ^^^^^^
    Syntax error, parameterized types are only available if source level is 5.0
    5. WARNING in DataMining.java (at line 240)
            String youtube[][] = new String[20][5];
                   ^^^^^^^
    The local variable youtube is never read
    6. WARNING in DataMining.java (at line 267)
            int e;
                ^
    The local variable e is never read
    7. ERROR in DataMining.java (at line 329)
            for(int i=1;i<Video+1;i++)
                          ^^^^^^^
    The operator + is undefined for the argument type(s) Integer, int
    7 problems (5 errors, 2 warnings)

  • Is there a way to start a JAVA program from the dock?

    Hello,
    I wrote some JAVA applications and I would like to put them in -
    - and start them from - the dock.
    These applications were built into .jar files.
    I can start them from Finder which tells me that there is some .jar starter utility.
    ;JOOP!

    The Dock is for Applications, Documents, and Folders (which can take several forms). There are some other odd animals that can stay in the Dock, but they were never truly implemented (recent items is one). If you "wrap" the .jar file inside some package that behaves as an application, you can have it stay in the Dock just as any other Application.
    A .jar file is not an application, it's a java archive. It is a collection of classes, metadata, etc. which the Java runtime interprets and executes. The Application which runs it shows up in the Dock as the coffee cup, but that is just the runtime engine, not the .jar.
    The .jar is like any other document, such as a a word processing document. Just like any document, it can be double-clicked and the handling application will be called to open it. Double-clicking that word processing document causes the word processing application to open the document and interpret its contents. Double-clicking the .jar file causes the java runtime engine to open the .jar file and interpret its contents. Instead of presenting it as paragraphs of text, it displays it as the application it represents.

Maybe you are looking for

  • Macbook Pro Runs REALLY hot

    I have had my MBP for about a week now and have noticed it runs very hot. I am using istats to check the CPU temps and they are exceeding 180F! Normally it will sit from 150 to 170F, and is always very very warm to the touch, when it hits 180+ its bu

  • How can I eliminate the acceptance box that comes up?

    How can I eliminate the yes or no box that comes up on different sites? They don't work.

  • Is the Apple UK page on Facebook genuine or bogus?

    Hi Apple, An Apple UK page has recently appeared on Facebook.  Does anyone know if it is genuine as it is asking users to download a file to check if they are competition winners... which sounds decided dubious to me. Thanks

  • Basic problem creating a template Functions not found

    I'm trying to create a template with addt functionality I have created a file which works OK. Then covert it to a template with an editable area. Create a new php file using the template All seems to work Ok But I always get the following error when

  • Working with reports

    Calling a jasper report we have to give the path+filename of the .jrxml file. Which is suitable for standalone application. But when calling the jasper reports in a web application which is not possible. Is there a way to get the reports session vice