executing java class files


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: executing java class files

  1. #1
    karthik.s Guest

    executing java class files


    hello,
    When we double click the .exe files ,os will automatically execute/runs
    the files similarly ,whether it is possible for java class files(to run a
    java class file by double clicking it ?)?

  2. #2
    Ruchi Dhar Guest

    Re: executing java class files


    There is no straight way of associating double click on class file. You can
    write a batch file like the follwoing

    execJava.bat

    @echo off
    set JAVA_HOME=c:\jdk1.1.8
    set path=%JAVA_HOME%\bin;%path%
    set classpath=.;%JAVA_HOME%\lib\classes.zip;%classpath%
    @echo on
    %JAVA_HOME%\bin\java %1

    In your explorer associate the class file to this batch file.

    "karthik.s" <kaarthik_s@rediffmail.com> wrote:
    >
    >hello,
    > When we double click the .exe files ,os will automatically execute/runs
    >the files similarly ,whether it is possible for java class files(to run

    a
    >java class file by double clicking it ?)?



  3. #3
    Roy Choye Guest

    Re: executing java class files


    Hello,

    On Windows environment, you can create a jar file which can execute on
    double-click.
    Create you manifest file which refers to your main driver class.


    "Ruchi Dhar" <rdhar@verticalnet.com> wrote:
    >
    >There is no straight way of associating double click on class file. You

    can
    >write a batch file like the follwoing
    >
    >execJava.bat
    >
    >@echo off
    >set JAVA_HOME=c:\jdk1.1.8
    >set path=%JAVA_HOME%\bin;%path%
    >set classpath=.;%JAVA_HOME%\lib\classes.zip;%classpath%
    >@echo on
    >%JAVA_HOME%\bin\java %1
    >
    >In your explorer associate the class file to this batch file.
    >
    >"karthik.s" <kaarthik_s@rediffmail.com> wrote:
    >>
    >>hello,
    >> When we double click the .exe files ,os will automatically execute/runs
    >>the files similarly ,whether it is possible for java class files(to run

    >a
    >>java class file by double clicking it ?)?

    >



  4. #4
    Marco Ronchetti Guest

    Re: executing java class files


    "karthik.s" <kaarthik_s@rediffmail.com> wrote:
    >
    >hello,
    > When we double click the .exe files ,os will automatically execute/runs
    >the files similarly ,whether it is possible for java class files(to run

    a
    >java class file by double clicking it ?)?


    On Windows, you can use a product called Jove for creating an (optimized)
    exe from your java source. Expensive though!
    See
    http://www.instantiations.com/jove/p...jovesystem.htm


  5. #5
    Chandralal A.V. Guest

    Re: executing java class files


    It will work fine,but it will unnecessarily keep open a dos window,to avoid
    this u can use javaw instead of java
    "Ruchi Dhar" <rdhar@verticalnet.com> wrote:
    >
    >There is no straight way of associating double click on class file. You

    can
    >write a batch file like the follwoing
    >
    >execJava.bat
    >
    >@echo off
    >set JAVA_HOME=c:\jdk1.1.8
    >set path=%JAVA_HOME%\bin;%path%
    >set classpath=.;%JAVA_HOME%\lib\classes.zip;%classpath%
    >@echo on
    >%JAVA_HOME%\bin\java %1
    >
    >In your explorer associate the class file to this batch file.
    >
    >"karthik.s" <kaarthik_s@rediffmail.com> wrote:
    >>
    >>hello,
    >> When we double click the .exe files ,os will automatically execute/runs
    >>the files similarly ,whether it is possible for java class files(to run

    >a
    >>java class file by double clicking it ?)?

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center