-
Make Exe files
Hi
What ever graphical application I create (with main method and inheriting
from class java.awt.Frame) cannot be run using the java vertual machine java.exe
from DOS prompt is there a way I can run these applivations. Is it possiable
to create a exe file like in C++ for example
Thanks
-
Re: Make Exe files
You should be able to run your Java applications using java.exe if you do it
correctly. Unfortunately that is all I can say about that because you have
not said what your problem is.
PC2
"Rohitha" <rohithab@eureka.lk> wrote in message
news:3c1b9bad@147.208.176.211...
>
> Hi
> What ever graphical application I create (with main method and inheriting
> from class java.awt.Frame) cannot be run using the java vertual machine
java.exe
> from DOS prompt is there a way I can run these applivations. Is it
possiable
> to create a exe file like in C++ for example
>
> Thanks
-
Re: Make Exe files
Thats not a problem at all. It works with JVM using java.exe
"Paul Clapham" <pclapham@core-mark.com> wrote:
>You should be able to run your Java applications using java.exe if you do
it
>correctly. Unfortunately that is all I can say about that because you have
>not said what your problem is.
>
>PC2
>
>"Rohitha" <rohithab@eureka.lk> wrote in message
>news:3c1b9bad@147.208.176.211...
>>
>> Hi
>> What ever graphical application I create (with main method and inheriting
>> from class java.awt.Frame) cannot be run using the java vertual machine
>java.exe
>> from DOS prompt is there a way I can run these applivations. Is it
>possiable
>> to create a exe file like in C++ for example
>>
>> Thanks
>
>
-
Re: Make Exe files
Java programs do not compile to .exe format, which is a native code format
which will run on any DOS/Windows platform without additional tools. Java
programs, however, compile to a byte-code format that resides in a .class
file. Byte-code is not the same as native code. In other words, whereas
.exe will run without additional tools but ONLY on DOS/Windows platforms,
byte-code will run on ANY platform, but will require the use of a virtual
machine designed for that particular platform to interpret the byte-code.
So... to end a long story... NO, Java programs cannot be converted to .exe
files. That would go against all that Java was meant to solve, i.e cross-platform
compatibility.
As for your problem running and awt based Java program, I can't help you
out too much. I've had no problems running awt/Swing based programs that
I've created in the past. One simply compiles the .java source file using
the 'javac' command and then executes the resultant .class file using the
'java' command.
Here's an example:
Source file: simpleProgram.java
C:\>javac simpleProgram.java
C:\>java simpleProgram
The first line will create the simpleProgram.class file. The second line
executes the file. No need to specify .class in the second line.
If the problem is that nothing happens as a result of running java on the
.class file, then the problem lies with your code.
... now back to eating that burger.
"arindam " <arindam_sarkar@lycos.com> wrote:
>
>
> Thats not a problem at all. It works with JVM using java.exe
>
>
>
>
>"Paul Clapham" <pclapham@core-mark.com> wrote:
>>You should be able to run your Java applications using java.exe if you
do
>it
>>correctly. Unfortunately that is all I can say about that because you
have
>>not said what your problem is.
>>
>>PC2
>>
>>"Rohitha" <rohithab@eureka.lk> wrote in message
>>news:3c1b9bad@147.208.176.211...
>>>
>>> Hi
>>> What ever graphical application I create (with main method and inheriting
>>> from class java.awt.Frame) cannot be run using the java vertual machine
>>java.exe
>>> from DOS prompt is there a way I can run these applivations. Is it
>>possiable
>>> to create a exe file like in C++ for example
>>>
>>> Thanks
>>
>>
>
-
Re: Make Exe files
hi,
its possible to make a executable from Java files.there are many software
to make executable.i just tried using gcj under solaris env
but it dumps core.can any one knows how to make executable out of java code?
i have a another doubt,if we make a appilcation in java.can u prevent clients
to decompile and get the source code back? is there any ways to protect this?
please mail me back at deepak22j@yahoo.com
thanks,
Deepak
"Sgt Pepper" <madcowsdisease@britslovebeef.co.uk> wrote:
>
>Java programs do not compile to .exe format, which is a native code format
>which will run on any DOS/Windows platform without additional tools. Java
>programs, however, compile to a byte-code format that resides in a .class
>file. Byte-code is not the same as native code. In other words, whereas
>.exe will run without additional tools but ONLY on DOS/Windows platforms,
>byte-code will run on ANY platform, but will require the use of a virtual
>machine designed for that particular platform to interpret the byte-code.
> So... to end a long story... NO, Java programs cannot be converted to .exe
>files. That would go against all that Java was meant to solve, i.e cross-platform
>compatibility.
>
>As for your problem running and awt based Java program, I can't help you
>out too much. I've had no problems running awt/Swing based programs that
>I've created in the past. One simply compiles the .java source file using
>the 'javac' command and then executes the resultant .class file using the
>'java' command.
>
>Here's an example:
>
>Source file: simpleProgram.java
>
>C:\>javac simpleProgram.java
>C:\>java simpleProgram
>
>The first line will create the simpleProgram.class file. The second line
>executes the file. No need to specify .class in the second line.
>
>If the problem is that nothing happens as a result of running java on the
>.class file, then the problem lies with your code.
>
>... now back to eating that burger.
>
>
>
>"arindam " <arindam_sarkar@lycos.com> wrote:
>>
>>
>> Thats not a problem at all. It works with JVM using java.exe
>>
>>
>>
>>
>>"Paul Clapham" <pclapham@core-mark.com> wrote:
>>>You should be able to run your Java applications using java.exe if you
>do
>>it
>>>correctly. Unfortunately that is all I can say about that because you
>have
>>>not said what your problem is.
>>>
>>>PC2
>>>
>>>"Rohitha" <rohithab@eureka.lk> wrote in message
>>>news:3c1b9bad@147.208.176.211...
>>>>
>>>> Hi
>>>> What ever graphical application I create (with main method and inheriting
>>>> from class java.awt.Frame) cannot be run using the java vertual machine
>>>java.exe
>>>> from DOS prompt is there a way I can run these applivations. Is it
>>>possiable
>>>> to create a exe file like in C++ for example
>>>>
>>>> Thanks
>>>
>>>
>>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks