[java] Running Java

Started by
9 comments, last by SteveTaylor 16 years ago
well i think this is kind of a noob question... how do in the real world(well im just a student so i refer to 'real world' as the industry..you get the point) how do java developers release their java software? still thru the bytecodes that the compiler made? also how do you run a java software? all i know is to do it on a command line and use the java <your java>,or are they always applets? aint there a way where you just double click it and it will run(well without losing the portability)? can you clear this up for me??? thanks!!!
Advertisement
Google "Java jars"

Basically Java applications are either released through Applets or through JAR files which are basically just like EXE files.
so basically you create jar files and it will be like exe fiels??

can i change the icon of this jar file??(like if i like to create my own icon)
I don't know about changing the icon. You should have a look at jsmooth (and others).
Webstart or full web applications.

Client-side Java applications are generally used only internally, since they require "too much" installation for end users.
With executable wrappers like launch4j or jsmooth, you can add custom icons, process names and splash screens, and mostly mask the fact that the customer is dealing with a Java program - and you wouldn't want most customers to deal with that anyway, since installing a JRE may well be beyond their technical competence level or permissions. If you ship the program on a cd, or if download size is not a concern, you can even include a private JRE.
You might even want to look at customising a Java runtime environment and bundling that with the game. There's probably some tool that can strip out all the JDK classes that aren't used in your game. The only other thing you would need is java.exe.
Quote:Original post by SteveTaylor
You might even want to look at customising a Java runtime environment and bundling that with the game. There's probably some tool that can strip out all the JDK classes that aren't used in your game. The only other thing you would need is java.exe.


One word of caution, although there are even commercial programs out there that do this for you, this is against Sun's license. So although it's technically possible (from what I've heard, you can reduce the JRE size to a few megabytes), it's not exactly legal.

To be more precise, supplemental licensing term B found in the LICENSE file with every JRE reads:

Quote:
B. License to Distribute Software. Subject to the terms and
conditions of this Agreement and restrictions and
exceptions set forth in the Software README file,
including, but not limited to the Java Technology
Restrictions of these Supplemental Terms, Sun grants you a
non-exclusive, non-transferable, limited license without
fees to reproduce and distribute the Software, provided
that (i) you distribute the Software complete and
unmodified
and only bundled as part of, and for the sole
purpose of running, your Programs, (ii) the Programs add
significant and primary functionality to the Software,
(iii) you do not distribute additional software intended to
replace any component(s) of the Software, (iv) you do not
remove or alter any proprietary legends or notices
contained in the Software, (v) you only distribute the
Software subject to a license agreement that protects Sun's
interests consistent with the terms contained in this
Agreement, and (vi) you agree to defend and indemnify Sun
and its licensors from and against any damages, costs,
liabilities, settlement amounts and/or expenses (including
attorneys' fees) incurred in connection with any claim,
lawsuit or action by any third party that arises or results
from the use or distribution of any and all Programs and/or
Software.
Use OpenJDK.

[Edited by - SteveTaylor on April 5, 2008 6:13:24 AM]
Quote:Original post by Antheus
Webstart or full web applications.

Client-side Java applications are generally used only internally, since they require "too much" installation for end users.
The only thing they might require is for the user to install Java if they don't already have it. But that's no different from requiring the user to install DirectX.

The user never has to know they're running a Java app... sometimes I run programs and it's only obvious I'm using Java when I bring up a save file dialog.

This topic is closed to new replies.

Advertisement