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.

Similar Messages

  • 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

  • Execution problem with java.exe

    Hi everybody. I am a student in a belgian university, and i've got a problem with the execution of my binaries in the JVM.
    I'm developping my project with Eclipse. When I build the project, Eclipse launch perfectly my application with javaw.exe (I supposed it because it's written in the console when I run the project).
    Thus, I wanted to try to launch my application by myself, to check if everything is right...
    My project is composed like this :
    - creavea/src : the sources of my project (a package called "main" , and a package "com.creavea. ..." and other .jar files like a MySQLConnector/J, edtFTPj, the JOutlookBar by lf2prod, ...
    - creavea/bin : Eclipse puts the binaries there, when I run my project.
    - creavea/files : Somes files like configuration files for my application, etc ...
    - creavea/images : Images for my interface.
    - the main class, containing the pubilc static void main method, is called CreaGesta, and is in the "main" package.
    creavea is the name of my project, but i think you supposed it !
    I want to run the binaries, then i do this :
    - I open a ms-dos console
    - I'm going in the C:\eclipse\workspace\creavea\bin folder
    - I execute the command : java main.CreaGesta ...
    And it doesn't work :'( ! An error appears :
    Exception in thread "main" java.lang.NoClassDefFoundError : com/lf2prod/common/swing/JOutlookBar.
    This class, JOutlookBar is used by my application, and the jar file containing the class is in my /bin folder. I can't understand, i'm a little bit disapointed.
    It's my first big project in Java, then i don't really understand what's happening. So if someone can help me, it will be really nice for me ! Thanks a lot for your help !
    J�r�me - Belgium

    Thank you for your reply Atmguy ! I put in my command the classpath of the jar's who are in my /bin folder.
    Like this : java -classpath edtftpj-1.4.9.jar; jdom.jar;l2fprod-common-outlookbar.jar;mysql-connector-java-3.1.8-bin.jar main.CreaGesta But now, i've got an other error message :
    Exception in thread "main" java.lang.NoClassDefFoundError : main/CreaGestaOh, it changed ! but I don't understand the problem . What does it mean? "Java cannot find the class main/CreaGesta", or "An error occured in main.CreaGesta" ?
    Can somebody help me to solve this new error ? Thank you !

  • Problem with java.exe

    Hi there, I have had Java 1.4 SDK running on my machine now for several month however I am now experiencing problems when trying to run java.exe....
    Whenever I try to run (for example):
    java helloWorldI get the following error message:
    Exception in thread "main" java.lang.NoClassDefFoundError: helloWorld
    Yes I did compile the files... and yes I am in the right direcotry.. this happens on every single file I have. Can anyone suggest what might be wrong? And how to fix this... also no java applets will run on the web.
    Thankyou, Mark.

    Type the following at the command line:
    echo %CLASSPATH%
    The result should contain a . with ; around it (unless it's the first/last item). This means to include the current directory in the search path for java classes.
    Without this java will only search the locations specified in the classpath.
    To add it you need to set an environment variable, if you have NT/2K/XP you can do this from the 'advanced' tab of the system properties, on other OS's I cant remember the permanent manner but for a temporary fix you could type:
    set CLASSPATH=%CLASSPATH%;.
    At the command line then type:
    java <My Progam Name>
    Hope this helps.

  • I have trouble with APSDeamon.exe

    I also have trouble with starting I Tunes. Can you send a programtool to solve this problem?

    Hi Tonnie Blommaart,
    If you are having issues with APSDaemon.exe and iTunes not launching, you may find the following article helpful:
    Apple Support: iTunes for Windows and the iCloud Control Panel may not launch when APSDaemon (Apple Push) is running
    http://support.apple.com/kb/TS4194
    Regards,
    - Brenden

  • Trouble with java security manager

    I have set up a security manager for my webapp running on Tomcat. The application enables the user to write his own scripts using Javascript, that's why I need to set up a security manager.
    Using Rhino as script interpreter, it is possible to use the standard java security mechanisms, e.g. using the security manager to handle the scripts' rights.
    I've added the following lines to my policy file:
    // give server all rights
    grant codeBase "file:webapp/WEB-INF/-" {
         permission java.security.AllPermission;
    //rights granted to scripts
    grant codeBase "file:restrictedClient" {
         permission java.io.FilePermission "webapp/WEB-INF/lib/js.jar", "read";
    I've assigned the scripts to the "restrictedClient" code base. However, the script execution fails as the script does not have the permission to access or define classes of any package (even standard java packages like java.lang or java.math).
    In java.security, I have found the following comment:
    # List of comma-separated packages that start with or equal this string
    # will cause a security exception to be thrown when
    # passed to checkPackageDefinition unless the
    # corresponding RuntimePermission ("defineClassInPackage."+package) has
    # been granted.
    # by default, no packages are restricted for definition, and none of
    # the class loaders supplied with the JDK call checkPackageDefinition.
    #package.definition=
    I now wonder, why the checkPackageDefinition is checked though there's no entry for any package to be checked.
    Extending the policy file like
    grant codeBase "file:restrictedClient" {
         permission java.lang.RuntimePermission "accessClassInPackage.webapp/WEB-INF/classes/org/mozilla/javascript";
         permission java.io.FilePermission "webapp/WEB-INF/lib/js.jar", "read";
         permission java.lang.RuntimePermission "defineClassInPackage.java.io";
         permission java.lang.RuntimePermission "defineClassInPackage.java.util";
         permission java.lang.RuntimePermission "defineClassInPackage.java.net";
         permission java.lang.RuntimePermission "defineClassInPackage.java.sql";
         permission java.lang.RuntimePermission "defineClassInPackage.java.lang";
         permission java.lang.RuntimePermission "defineClassInPackage.java.math";
         permission java.lang.RuntimePermission "de.methodpark.pkit.facade.impl";
    works, but an unpleasant feeling remains :-).
    Rhino creates an own classloader for script execution. Could that be the source of the strange behaviour?
    Any help would be appreciated!
    Regards,
    Matthias

    David,
    I was glad to see your post regarding WLS 9.2 and the troubles with enabling Java Security Manager.
    Were you able to learn any more on things like - why doesn't the admin console work when the security manager is enabled with the default policy file. Also, why is it so difficult to add permissions for your own applications and get them to actually work.
    I'd be curious to see if you were able to get it to work or if you have any insights or resources that can help with this as we are really struggling to get a restrictive policy file that works.
    Thanks,
    D

  • Trouble with firefox.exe of Win7-64bit since last firefox update

    firefox has been working fine on my laptop running win7-64bit until the last firefox update and now when i close firefox and attempt to reopen it at a later time, i get the error message that ff is still running and i have to shut it down. i go to task mgr and have to close firefox *32.exe. why am i just now having trouble with this, i wonder? thank you in advance for any and all help with this matter. it's very annoying.

    See:
    *https://support.mozilla.org/kb/Firefox+is+already+running+but+is+not+responding
    *http://kb.mozillazine.org/Profile_in_use

  • A simple Java program to be compiled with ojc and executed with java.exe

    Hi ,
    This thread is relevant to Oracle Java Compiler (file ojc) and jave.exe file.
    I have written a simple java program which consists of two simple simple classes and using the JDev's 10.1.3.2 ojc and java files , i'm trying to execute it after the successful compilation....
    The problem is that trying to run it... the error :
    Exception in thread "main" java.lang.NoClassDefFoundError: EmployeeTest
    appears.
    How can i solve this problem...????
    The program is as follows:
    import java.util.*;
    import corejava.*;
    public class EmployeeTest
    {  public static void main(String[] args)
       {  Employee[] staff = new Employee[3];
          staff[0] = new Employee("Harry Hacker", 35000,
             new Day(1989,10,1));
          staff[1] = new Employee("Carl Cracker", 75000,
             new Day(1987,12,15));
          staff[2] = new Employee("Tony Tester", 38000,
             new Day(1990,3,15));
          int i;
          for (i = 0; i < 3; i++) staff.raiseSalary(5);
    for (i = 0; i < 3; i++) staff[i].print();
    class Employee
    {  public Employee(String n, double s, Day d)
    {  name = n;
    salary = s;
    hireDay = d;
    public void print()
    {  System.out.println(name + "...." + salary + "...."
    + hireYear());
    public void raiseSalary(double byPercent)
    {  salary *= 1 + byPercent / 100;
    public int hireYear()
    {  return hireDay.getYear();
    private String name;
    private double salary;
    private Day hireDay;
    For compilation... i use :
    D:\ORACLE_UNZIPPED\JDeveloper_10.1.3.2\jdev\bin\ojc -classpath D:\E-Book\Java\Sun_Java_Book_I\Corejava EmployeeTest.java
    For execution , i issue the command:
    D:\ORACLE_UNZIPPED\JDeveloper_10.1.3.2\jdk\bin\java EmployeeTest
    NOTE:I tried to use the jdk of Oracle database v.2 but the error :
    Unable to initialize JVM appeared....
    Thanks , a lot
    Simon

    Hi,
    Thanks god....
    I found a solution without using Jdev.....
    C:\oracle_files\Java\Examples>SET CLASSPATH=.;D:\E-Book\Java\Sun_Java_Book_I\Corejava
    C:\oracle_files\Java\Examples>D:\ORACLE_UNZIPPED\JDeveloper_10.1.3.2\jdk\bin\javac EmployeeTest.java
    C:\oracle_files\Java\Examples>D:\ORACLE_UNZIPPED\JDeveloper_10.1.3.2\jdk\bin\java EmployeeTest
    What does Ant has to do with this?Sorry, under the Ant tree a classpath label is found....I'm very new to Java and JDev...
    You need to include the jar file that has the Day method in it inside project properties->libraries.I have not .jar file.. just some .java files under the corejava directory.... By the way , I have inserted the corejava directory to the project pressing the button Add Jar/Directory.... , but the problem insists..
    Thanks , a lot
    Simon

  • So sick of having trouble with Java and Mac!

    I bought myself a brand new MacBook Pro OS X 10.5.8 for around a year ago. Since the first month I've had so many problems with my Java. It's eighter not working, or its is so slow that you can't work with it, at all.
    Yesterday I was playing a game, were you're in need of Java. It worked perfectly. Then suddenly, it stopped again. And I tought, since I had not used it for a while, I just had to update it. So I clicked at the "software update" and updated everything. I don't think Java was at the list. Still wasn't working. So I went to Apple.com and searched for the "Mac OS X 10.5 update 10" and found it. I downloaded it, and installed it about five times or something, still not working. I've tried everything that came to my mind to try fixing it, but nothing works. What can I do? I'm so sick of having this problem every time I'm in use of the mac. Realy start to regreat the expensive bought of this mac.
    Please, someone help me. I hate the tought of wasting 16 000,- Nok at this pc, when it's not working the way I'm using it..
    And sorry for the bad english, I'm only 15..

    Hei Kristine, er engelsk ikke så ille!
    Very Important, how much Free Space is on your Hard Drive first of all? Click on the Macintosh HD on the Desktop, then do a Get Info on it.
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.

  • Trouble with  "java.lang.OutOfMemoryError: Java heap space"

    Hello,
    I use a Java-based modeling tool that very few out there are probably familiar with. This tool allows me to run models (program) from within the development environment, to create Applets or create jar files that can be executed in a stand-alone fashion.
    I am using a database on my local harddrive to read in some data using JDBC, so am not using the Applet option with certificates. The development environment is expensive, so can't be distributed. That leaves the stand-alone option.
    The model (program) I've written runs perfectly fine in the development environment and, previously, has worked fine as a stand-alone program. However, the stand-alone option isn't working anymore, because I keep getting this error.
    I am not much of a Java programmer; I'm learning as I go along. If anyone can help me solve this, I'll be most appreciative
    From my cmd prompt:
    C:\Documents and Settings\072\Desktop\TA\for\for Applet Files>cd "C:\D
    ocuments and Settings\072\Desktop\TA\for\for Applet Files"
    C:\Documents and Settings\072\Desktop\TA\for\for Applet Files>java -cl
    asspath enterprise_library.jar;business_graphics_library.jar;for.jar;xjanylog
    ic5engine.jar for/Main$Simulation
    Started...
    AnyLogic simulation engine has started [$Id: Engine.java,v 1.134 2004/12/03 08:4
    9:39 basil Exp $]
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception during root.courseQueue-1556 startup: java.lang.OutOfMe
    moryError: Java heap space
    thread = Thread[Model Creation Thread,5,main]
    engine = com.xj.anylogic.Engine@1099257
    Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap spac
    e
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception during startup: java.lang.OutOfMemoryError: Java heap s
    pace
    thread = Thread[Model Creation Thread,5,main]
    engine = com.xj.anylogic.Engine@1099257
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception in statechart 'root.courseExit-0.inputProcessor' entry
    actions: java.lang.OutOfMemoryError: Java heap space
    thread = Thread[AnyLogic main thread,5,main]
    engine = com.xj.anylogic.Engine@1099257
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception in statechart 'root.courseDelay-0.inputProcessor' entry
    actions: java.lang.OutOfMemoryError: Java heap space
    thread = Thread[AnyLogic main thread,5,main]
    engine = com.xj.anylogic.Engine@1099257
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception in statechart 'root.courseDelay-1.inputProcessor' entry
    actions: java.lang.OutOfMemoryError: Java heap space
    thread = Thread[AnyLogic main thread,5,main]Exception in thread "AWT-EventQueu
    e-0"
    java.lang.OutOfMemoryError: Java heap space
    engine = com.xj.anylogic.Engine@1099257

    Hi I am ancountering the same problem with the 'heap space'.
    Is there any way I can find out what it is set to for my system? I dont believe its 32Mb and dont want to increase it randomly to too large a size if theres no need for it.
    Thanks,
    Bobby

  • Trouble with java

    I have three computers with different running systems, vista, xp and the other i dont remember. We are experiencing java problems with all three. We cannot play games on pogo, chat on my homework pages or even play games on java's web site and sometimes the sites just shut down. We have tried numerous changes through javas website to no avail...does anyone have any ideas?

    and why are you asking this here? we are not a "fix my computer" forum. You will need to look elsewhere.

  • Having Trouble with Java Cryptography Extension (JCE)

    Hi, this is my first attempt at using the JCE. I'm using JCE 1.2.1
    and basically all I'm trying to do at this point is encrypt a
    FileInputStream object using the DES standard, with the JCE
    classes. Here is my code Fragment.
    protected FileOutputStream encriptFile(FileInputStream baseFile,
    File encFileName) throws IOException
    try
    // Create the output file for the encrypted document
    FileOutputStream encriptedFile = new FileOutputStream
    (encFileName);
    // Must register the provider that implements the algorithm
    Provider sunJce = new com.sun.crypto.provider.SunJCE();
    Security.addProvider(sunJce);
    char[] pbeKeyData = password.toCharArray();
    PBEKeySpec pbeKeySpec = new PBEKeySpec(pbeKeyData);
    SecretKeyFactory keyFactory = SecretKeyFactory.getInstance
    ("DES");
    SecretKey pbeKey = keyFactory.generateSecret(pbeKeySpec);
    Cipher pbe = Cipher.getInstance("DES"); // Same as above.
    pbe.init(Cipher.ENCRYPT_MODE, pbeKey);
    CipherOutputStream cout = new CipherOutputStream
    (encriptedFile, pbe);
    // Use a byte array to write the file output in blocks of 64
    bytes.
    byte[] buffer = new byte[64];
    while (true)
    int bytesRead = -1;
    bytesRead = baseFile.read(buffer);
    if (bytesRead == -1) break;
    cout.write(buffer, 0, bytesRead);
    cout.flush();
    cout.close();
    baseFile.close(); // Close the input file.
    catch (java.security.NoSuchAlgorithmException nsA)
    System.err.println(nsA);
    nsA.printStackTrace();
    catch (java.lang.ExceptionInInitializerError eIIE)
    System.err.println(eIIE);
    eIIE.printStackTrace();
    catch (Exception e)
    System.err.println(e);
    e.printStackTrace();
    My problem arises with the line "SecretKeyFactory keyFactory =
    SecretKeyFactory.getInstance("DES");" This line throws an
    ExceptionInInitializerError and the catch block tells me this
    java.lang.ExceptionInInitializerError
    java.lang.ExceptionInInitializerError: java.lang.SecurityException:
    Cannot set up certs for trusted CAs
    (The rst of the stackCall here)...
    From what I've read in the documentation, I need to have a provider
    set up that handles the SecretKeyFactory and encryption algorithms,
    but the documentation also says that the SunJCE provider that I set
    up near the start of my method should have been able to handle this.
    Is there anyone out there with expeience doing this kind of thing
    that can help.
    Thanks,
    Dan

    Please check out the following:
    1. Be sure that the jar file will be viewable from classpath and that the provider you want to use will be in java.security file.
    2. In the java.security file you should have something like this:
    security.provider.1=sun.security.provider.Sun
    security.provider.2=com.sun.crypto.provider.SunJCE
    3. If you wish, you can test your program with another JCE implementation, like cryptix.
    You can download the api and documentation of cryptix at http://www.cryptix.org/products/index.html
    I wish this can be useful to you!!!
    Thank you for some duke dollars.

  • Troubles with Java Comm API

    I am trying to use the Java Comm API with Windows 2000 and I can enumerate the ports (I am almost sure that the problem is the dll). Do anybody knows a solution?

    Where is the problem?

  • Having Trouble with Java Mail and Servlets

    How can I send and receive mails using Java Mail API and Servlets

    You should familiarize yourself with the JavaMail API and the servlet API--this is much too broad a question to properly answer in a forum. The J2EE Tutorial shows how to send a mail message using JavaMail from a session bean, but the technique is similar to what you would use from a servlet:
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Resources5.html#wp82097
    I'm sure the JavaMail documentation has an example as well.
    -Ian Evans

  • URGENT - Running Webstart manually (with java.exe)

    Hi,
    A couple of months ago, someone from SUN gave me a (very long) command line to start java web start using java -cp etc...
    At that time, I needed to be able to CTRL-C javaws to get a stack trace location of where JWS was stuck.
    Well I need that command again! Does anyone know it ? I'm trying to find it by guessing, but it won't work...

    http://www.vamphq.com/jwsfaq.html#debug
    Have a nice debug.
    JB.
    http://www.up2go.net - WebStart @ the MAX !

Maybe you are looking for

  • Satellite Pro A300-1GT - Error message when starting webcam

    I have a Toshiba Satellite Pro A300-1GT. The problem is that the camera does not work. When I start software it writes that I should restart camera or computer. I'm having Windows 7 and I serched the internet for solutions but I find just a discusion

  • Linux 3.4 + nouveau + X11 = fallback to vesa

    Hi there! I'm getting an issue with my NVIDIA GeForce 8400M GT card, running the latest kernel and nouveau driver. Linux rx 3.4.3-1-ARCH #1 SMP PREEMPT Mon Jun 18 08:07:54 UTC 2012 i686 GNU/Linux dmesg shows me the following: [ 1.774518] nouveau 0000

  • Confirmation workflow not completed

    Hi, I have activated the confirmation workflow WS10400010 (worflow without approval). I am trying to do the GR in SRM and it's generating local confirmation number. When i see check status showing is awaiting approval. I have activated only above wor

  • Forward button not working on last page of module with links

    CP4 - When I have links on a page, I select the Pause until User clicks option on the click box for the link. This pauses the module until the user has an opportunity to look at the material when they click a link. The Forward button works fine when

  • Updating apps wrong apple id

    hello just got the iPhone 6, so i hooked my iphone 4 to my girlfriend's computer, authorized it, backed up and restored. now, when an update to one of the apps appears, it asks for HER apple id!!! i don't want to delete them and re-download, too many