Deploying jre and classes without install

i know this is a popular subject - HA!
my red eyes have googled and forumed all they can.
i dont want to do anything complicated.
there is no attempt to create an .exe or write in native code.
my question is...
i just want to have a .bat file run a .jar file on a computer
that does not (and can not) have java installed on it.
can i have a .jar run on a JVM that i have - lets say -
on the cd that includes the .jar without Java installation being required.
and second, where are the standard imported java files
located (like awt, swing, lang.Math...)? is it lib/tools.jar?
so i suppose the answer extends to can the JVM run without
being installed and if i bundle the JVM and classes how do i link
them in my .jar?
(from what ive read maybe through class-path in the manifest?).
I appreciate any help!
ai no dice

import javax.swing.*;
import java.awt.*;
import java.io.*;
public class CaptureOutput
     public static void main(String[] args) throws Throwable
          Process process = Runtime.getRuntime().exec(JOptionPane.showInputDialog("Type in the command."));
          BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream())),
               err = new BufferedReader(new InputStreamReader(process.getErrorStream()));
          JFrame frame = new JFrame("Program Output");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.getContentPane().setLayout(new GridLayout(2,1));
          Font monospaced = new Font("Monospaced",Font.PLAIN,12);
          JTextArea inComp = new JTextArea(),
               errComp = new JTextArea();
          inComp.setFont(monospaced);
          errComp.setFont(monospaced);
          inComp.setEditable(false);
          errComp.setEditable(false);
          inComp.append("System.out***************************************************************************************\n");
          errComp.append("System.err**************************************************************************************\n");
          frame.getContentPane().add(inComp);
          frame.getContentPane().add(errComp);
          JScrollPane scrollPane = new JScrollPane(frame.getContentPane());
          frame.setContentPane(scrollPane);
          frame.pack();
          frame.setVisible(true);
          frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
          boolean processDone = false;
          while(in.ready() || err.ready() || !processDone)
               if(in.ready())
                    inComp.append(Character.toString((char)in.read()));
               if(err.ready())
                    errComp.append(Character.toString((char)err.read()));
               try
                    process.exitValue();
                    processDone = true;
               catch(IllegalThreadStateException e)
          inComp.append("\n\nProcess exited with exit code "+process.exitValue());
}Copy/paste that and compile it. Then run it. It will capture the output of anything you run and the input it asks for works just like the command line. That will let you see where the JRE is getting the standard classes from.
Errrrrr..... I seriously doubt you'll be able to find someone here without Java. xD I would ask your less computer savy friends.
I would also suggest that you just try using the public JRE instead of using the JDK's JRE. The JDK is much larger, and I wouldn't chance any errors breaking it appart could cause.
As for running the jar, what you need to do is "java [many other options] -jar Program.jar" and have the property Main-Class set in the manifest. The "many other options" will have to be things like -bootclasspath to tell it where to look for the standard classes. This is one heck of a project you're taking on, and it will require some pretty serious understanding of how to use the VM.

Similar Messages

  • Deploy simple Labview applications without installing the Labview runtime?

    [Labview 8.21 - Windows XP]
    Hello and a happy new year to all !
    I have coded very simple Labview applications that basically read text files (exported from Ms Excel), make some string operations, array sorting and at the end write another text file that is then imported in Ms Access. Now I would like other people from the School parents association to use this application on their own PC but ideally without having to install the Labview run-time;  for various reasons one of them being that they are not administrator of their PC, another reason being that I feel bad to ask them to install 100Mb of programs on their PC to execute my <1Mb applications. All that I can assume is that they have Excel and Access installed on their PC.
    I have read some postings on the Forum and in the Knowledge base from which I understand that the only way to use my application without the Labview runtime is to build a shared library that maybe I could then link via a VBA code from inside Excel or Access. But I cannot find any usable example on how to do that practically. And maybe it is not possible. 
    What is the easiest way to run such very simple Labview compiled applications on a PC that does not have Labview installed? Is Labview not at all built for such use?
    Thanks a lot for your help and ideas.
    Christophe

    You will need to have the runtime installed. There is a lot of other languages that also have the need for there own runtime, but they are commonly installed with the OS, so you don't realize it. Just building a dll won't solve this.
    There might be a hack possible, though. People have managed to strip down the required installation and been able to deploy the required parts of the runtime only. If you want to go this way, search on LAVA. But I'm not sure if it works with LV 8.20, and you will need to invest some time to figure out the minimum requirements. But be aware that it is a hack, so it's on your own risk.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

  • How to format and reinstall without install media

    I would like to "restore to factory" my mid-2010 MBP (17") .  Except of course I would like to have the 10.7 install and not have to start with 10.6 and then do the 4GB download again.  Is that possible?
    This is all to troubleshoot a performance issue with Final Cut Pro X.  If I do manage to pave my disk, will the AppStore still recognize me (ie I'm not interested in paying another $300+ for various AppStore purchases)  I'm assuming that once I log in with the same apple Id I used to make the purchase all should be good.

    ...not have to start with 10.6 and then do the 4GB download again....
    Since Lion deletes the installer after it's finished upgrading, you need to make a copy before hand.  Download the Lion installers and when it auto-starts, cancel the installer.  Then make a copy of the installer located in your Applications folder.  You can use this again on other machines in the future without having to download again.
    You can also make a clone of your SL install before installing Lion.  Make a clean install of SL, clone it, then upgrade to Lion.  Restoring a clone is almost always faster than installing from the install disks.  This is what I do when testing & troubleshooting many of my software issues.  (I usually doing that with virtual machines also.)
    If you want, you can make a Lion installer DVD or USB flash drive.  You can Google on how to make one of those, but realize that neither is supported by Apple.  And if you haven't purchased updated ones, you will still need your original disks that came with your Mac to reinstall any of the iLife apps that came with your Mac.

  • Cut and Paste - without installing anything..

    PasteBud, A new free service provides a cut/paste capability without the
    need to install anything.
    http://www.theregister.co.uk/2008/12/12/pastebudhowto/

    It depends.
    If the blank row is at the bottom of the table, the other ones will be created automatically.
    If the blank row is between two filled rows (what I assumed given your question about 'overWriting') yes, you must create the new blank rows.
    At least it's what I thought when I posted.
    Since, I looked back in Numbers User Guide and found an info which I missed :
    Yvan KOENIG (VALLAURIS, France) lundi 26 décembre 2011 11:54:59
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is :
    http://public.me.com/koenigyvan
    Please : Search for questions similar to your own before submitting them to the community
    For iWork's applications dedicated to iOS, go to :
    https://discussions.apple.com/community/app_store/iwork_for_ios

  • Using Appc and JSPC without installing Weblogic 10 Server

    All,
    Does anyone know if it possible to create a jar file that can be used with appc or jspc on a machine where the WL 10 application server is not installed?
    -T

    Yes just tried that, changed the class path to use wlfullclient.jar instead of weblogic.jar
    It does get a little further now in that it start to compile the ear - however there are still
    java.lang.NoClassDefFoundErro
    errors see below:
    Warning, output location exists /build_output/MyEar.ear
    Created working directory: /tmp/appcgen_1247571644398_MyEar.ear
    java.lang.NoClassDefFoundError: com/bea/xml/XmlException
    at weblogic.application.descriptor.AbstractDescriptorLoader2$READONLY_SINGLETON.<clinit>(AbstractDescriptorLoader2.java:315)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorManager(AbstractDescriptorLoader2.java:320)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:774)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:395)

  • Install JRE and OpenJDK Side-by-Side [Unecessary - So Solved]

    As far as I know this is impossible, but if there is a way to install JRE and OpenJDK side-by-side, that would be great.
    The reason I would like this is that there is a specific webserver I access that simply will not work with OpenJDK. It's a known issue that may or may not be fixed any time soon. On the other hand, I would like to install freeCAD, but this depends on OpenJDK and not JRE.
    So as of right now, there is no way for me to have freeCAD installed and access this webserver. Now if JRE and OpenJDK were installed side by side, then this wouldn't be a problem. The other option, is letting users install freeCAD with and OpenJDK or JRE dependency, whichever best suits them.
    Is anybody else in a similar boat as this?
    Last edited by fini_fly (2009-12-17 16:56:07)

    tdy wrote:
    fini_fly wrote:I would like to install freeCAD, but this depends on OpenJDK and not JRE.
    Where do you see this requirement?  I don't see anything that specifically depends on openjdk6.  The only java deps I see are in opencascade.  It depends on java-runtime and makedepends on java-environment, which can be satisfied by jre + jdk.
    When I went to install, it was forcing me to install OpenJDK and uninstall JRE.

  • Need to download without installing

    Hi,
    I need to download versions of adobe reader, flash player, shockwave player and air without installing them to the system I am downloading them to.  I work for the government and have to copy the applications onto a disk to install them to a secure network not connected to the Internet.  How do I obtain copies from your site for this purpose.  Thank you
    Angelique

    Hi alouis,
    Sounds like your distributing Flash Player within your org, as such, you'll need to license these products for distribution.  Please see the following links for information on licensing the various products for distribution:
    Adobe - Adobe Runtimes / Reader Distribution License Agreement
    Volume distribution | Adobe Reader XI
    Adobe Flash Player Distribution | Adobe
    Adobe AIR Runtime Distribution | Adobe 
    Adobe Shockwave Player Licensing | Adobe 
    Maria

  • Installing JMS 3.6 without JRE and JDK

    I'm looking for a way to install JMS only, without installing the new versions of JRE and JDK. The application I'm working on works with JRE 1.5.0_02 only, and there is no plan to change that in the near future, however we want to upgrade to JMS 3.6 to be able to use the new imqPingInterval.

    Are you shure you have included the jre PATH (not CLASSPATH) in your PATH variable?
    Assuming you're working in a Linux (or unix) environmet, check the PATH: it should contain /usr/local/jdk1.3.1_01/jre/bin.
    I'm not sure this is really the answer, but there's no damage on trying it! :-)
    bye
    Michele

  • Running java application without installing JRE

    We try to run Java application without installing JRE, by copying java.exe (and other JRE files) together with our jar file. This does not work.
    Can it be solved?

    Can you elaborate on the steps to create a java
    application without installing JRE.
    Regards,
    padmaPadma,
    The solution is to deploy my JAR together with JRE files, without running standard JRE installation. This makes possible to simply ensure that my JAR will run with THIS SPECIFIC JRE. This is important from QA point of view. Also, installation of my application does not change configuration of JVMs on the computer.
    The solved problem:
    Standard JRE installation may change the default JRE for many Java applets and application on computer. Changing version JRE may lead to some programs misbehaviour (JRE backward compatibility does not always work and different Java versions not always live together well). Thus, some IT departments are very nervous about JRE version change.
    Hope, this explains my problem and the solution.

  • JRE 6U35 and JRE7U7 improperly install (via MSI in GPO) on top of existing

    Hello,
    Within my environment, we occasionally have to push out software updates (MSI based installers) via group policy. We also install the latest JRE as a part of our base install when systems are built. In the past, this has worked without issue. The previous behavior of the MSI installer when used within a GPO was to NOT install if the current (or newer) version of the JRE was already installed. I've confirmed that with both JRE 6U35 and JRE7U7, if a system already had say JRE6U35 installed (silently via msiexec /i "jre1.6.0_35.msi" /qn) as part of the base install, it would work just fine, until the system was restarted, at which point, if it was within an OU that had our GPO to apply the latest JRE (in this case, the EXACT same installer, same version etc) the Software installation policy would actually run (which it shouldn't and didn't with previous JRE installers) and would mess up the JRE on the system. In add/remove programs, the expected JRE version would be listed, and the control panel applet icon would be present, but the browers (any browser) would act as though the JRE was not installed and clicking on the Java control panel applet would generate a message that says something to the effect of "Application not found". Also, trying to remove the JRE via add/remove programs also seems to cause an "Application not found" error message. I've found that I had to remove a registry key (though I can't remember it right at this moment) to get rid of the "Application not found" error messages before I can manually uninstall the JRE and reinstall properly.
    I think there's something wrong with the MSI installer, namely that it doesn't seem to check properly for existing versions of the JRE when processed via a Software Installation GPO.
    My current work around is to exclude JRE from the base install, allowing our GPO to perform the installation, (which works, even after several restarts) but that's not ideal and it's not how these installers used to work.
    OS - Win7 Enterprise 32bit AND 64bit
    JRE versions - 6U35 and 7U7.
    Please advise.

    I have encountered a similar situation as well. Deploying new systems with OEM (factory) installed 64-bit Windows 7 SP1 Professional operating system that also has a pre-installed Java on the system. Have a GPO based install for Java 7 Update 7 which seems to install just fine (over an older version of Java 7) but subsequent attempts to use Java in an IE9 browser results in no Java. If you go to the Oracle (Java) page to show what version of Java is on the system it tells you to download the latest. A similar problem happens with the install of Java 6 Update 35 as well.

  • Problems trying to "hot-deploy" class files in iPlanet. Want to deploy a compiled class (i.e. servlet, jsp) without having to bounce the server. Known issue in iPlanet? How can I get around?

    Currently iPlanet is not allowing us to hot deploy a modified class file(i.e., servlet) as it advertises. It doesn't seem to have a problem with jsp's however. But everytime we modify a servlet(say in an emergency), and wish to deploy, we still have to bounce the KJS. We would like to avoid this if possible. How? I heard this might be a known issue in iPlanet.

    I apologize but this is a clarification of this problem. We are having a problem dynamically reloading java classes that are referenced by jsp's and servlets. The problem DOES NOT exist when trying to reload jsps or servlets themselves. We would like to reload these classes without having to restart the processes. Any thoughts would be helpful. Thanks.

  • Deploying JRE 1.4.2_12 without auto update enabled

    I am deploying JRE 1.4.2_12 to a large number of client machines with both Windows 2000 and XP. I need to do this in a way that the auto update prompt will never appear. This could cause a large number of support calls from the users and it's best if they are never asked to install updates.

    I got problem when i write a program to read chinese
    excel sheet with jre 1.4.2_12, chinese will encoding
    incorrect in java, but when I change jre version to
    jre 1.4.2_10 or jre 1.5.0 update 7 , everything s ok
    . any solution?
    p.s. jexcelapi 2.5.8Hi Vencent,
    I am also seeing encoding problems with 1.4.2_12 and havent been able to find a solution. Did you find a solution to your problem? If so I'd appreciate it if you could post it.
    Thanks,
    Declan.

  • Installing JRE and webserver on client machine

    I want to deploy J2se application having tomcat webserver and mysql database.This application is to be installed on client's machine from CD as a single-click application.How can we setup JRE and webserver using JavaWebStart?
    Is it possible to install JRE using WebStart?This is most urgent requirement for us.Any who worked on it?Pease help!!!!

    You need a JRE installed to run Java WebStart (because Java WebStart is a Java program itself). However, this does not need to be the same JRE that your application uses, because you can specify the JRE to use in your JNLP file and Java WebStart will automatically (most of the time) download and install the correct JRE.
    As to the original question of installing a webserver and database on the client: you will have to distribute both as (or in) one or more jar file (which are likely to be quite large), unpack the jar file(s) on the local machine and then run an installation script, using Runtime.exec(). This requires the user to grant "all-permissions" to your WebStart app, as well a fool-proof installation script for the webserver and database.
    Webstart may not be the ideal solution for your situation. If the users are always connected to the network, why the local webserver and database (can't they just use one connected to the net)? If the users aren't connected to a network, why Webstart?

  • Installing jars and classes

    I just started learning Java (I used books like "Teach yourself java 2 in 24 hours", "Teach yourself java in 21 days", "Teach yourself object oriented programming in 21 days", etc.), but there are still some things that prevent me from succeeding. I have programmed in PHP, Javascript and StarBasic before.
    I'm testing some Swing component. I wanted to use a JFormattedTextField with a MaskFormatter over it. But it seems that I don't have the class installed.
    My Code
    import javax.swing.JFormattedTextField.*;
    import javax.swing.text.MaskFormatter;
    MaskFormatter formatter = new MaskFormatter("(###) ###-####");
    JFormattedTextField textField = new JFormattedTextField(formatter);Error message: Type MaskFormatter not found
    How can I check if the class is installed? I use a Linux deriviant Kubuntu. I looked at /usr/share/java/ , where I find a lot of jars, but none applicable. How do I even know what my classpath is?

    I use Sun Java 6. This compiles without error for me:
    import javax.swing.text.MaskFormatter;
    public class XXX
        public static void main(String[] args) throws java.text.ParseException
            MaskFormatter formatter = new MaskFormatter("(###) ###-####");
    }

  • Deploying JRE through GPO with MSI uninstalls instead of installing

    I am trying to deploy JRE 6 Update 19 via GPO using the MSI. It installs properly on systems that either do not have JRE installed or a previous version. However, any systems that already have Update 19 on them from a previous manual install end up getting uninstalled by the GPO. The system is then left thinking that it has Update 19 installed properly, but does not. Basically what happens is the installer starts, determines that "this software has already been installed on your computer" and proceeds to "reinstall it". So it removes the first installation, windows "configures" Java, and then when it finishes uninstalling, it simply quits instead of continuing on to actually perform the installation again. At this point, the GPO believes it has been successfully applied to the workstation, and will not attempt to re-install itself on any subsequent reboots. How can I keep this from happening?
    As a sidenote, any systems that have a later Update (20, 21, or 22) that were installed manually will just ignore the policy installation as it determines it to be an "older" version. Is there any way to force the uninstall of the newer version and install the policy Update 19 version?
    Thanks!

    I am trying to deploy JRE 6 Update 19 via GPO using the MSI. It installs properly on systems that either do not have JRE installed or a previous version. However, any systems that already have Update 19 on them from a previous manual install end up getting uninstalled by the GPO. The system is then left thinking that it has Update 19 installed properly, but does not. Basically what happens is the installer starts, determines that "this software has already been installed on your computer" and proceeds to "reinstall it". So it removes the first installation, windows "configures" Java, and then when it finishes uninstalling, it simply quits instead of continuing on to actually perform the installation again. At this point, the GPO believes it has been successfully applied to the workstation, and will not attempt to re-install itself on any subsequent reboots. How can I keep this from happening?
    As a sidenote, any systems that have a later Update (20, 21, or 22) that were installed manually will just ignore the policy installation as it determines it to be an "older" version. Is there any way to force the uninstall of the newer version and install the policy Update 19 version?
    Thanks!

Maybe you are looking for

  • The document type of accounting document of an invoice is different

    Dear Friends, The document type of accounting document of an invoice is different for another invoice of the same type. The company codes differ. For example the credit memo B1 has RV as the document type for a particular company code and sales org,

  • Extreme database

    Would you guide me where to download the free extreme database for learning Crystal Report Designer? Thanks

  • Com.sun.syndication.feed.synd.SyndEntryImpl error

    In our project we are getting RSS feeds for that I am using this code to get RSS stock quotes. package rssfeed; import com.sun.syndication.feed.synd.SyndEntryImpl; import java.util.*;import java.io.*;//import java.awt.*; import javax.servlet.jsp.tage

  • Where do I obtain a "Response Code" to a install a newer version of Adobe Acrobat

    I was using Abobe Acrobat 5.0 on a computer that suffered a melt-down to the HD. I purchased a new computer and also an upgtrade (6.0) to my registered version 5 of Adobe Acrobat. On trying to install the 6.0 version, I was first told that the new up

  • I have wifi but not accesss to internet

    I can not use my iPod touch 4g using wifi from my iMac. Everything its setup ok.  Ask me to verify that I have entered the correct account info in mail settings...... or Cannot open page Safari cannot open the page because it;s not connected to the i