Distributing JRE with Java Swing Game
I am developing some game using java swing. With the games I
need to ship JRE because each user does not have JRE..
So is there any other other solution.
I forgot the name, but there is a very nice Installer tool that allows you to bundle your program with a JRE. Search the news groups.
Similar Messages
-
In program written with Java Swing, I can't input Chinese
In program written with Java Swing, I can't input Chinese.
But if I change my language first, then change the input method tu U.S, open the Java Swing application, finally I can input Chinese. I want to know how to fix this bug.
My OS is Mac OS X 10.6.8.
At the JDK version 1.6.0_29, I can input Chinese friendly in Java Swing applications. But after 1.6.0_31, I can't do it anymore. The input methods can input Chinese in other non Java Swing applications so the problem must create by JDK or JRE's Swing part. What's the different between 1.6.0_29's Swing and 1.6.0_31's ? Why ? I heard that Java Swing apps not support Chinese input methods seens 2009... Why haven't fix these yet?Chazza wrote:
Perhaps you need to change your keyboard layout in Xorg?
https://wiki.archlinux.org/index.php/Ke … ard_layout
Thanks for your answer!
I have tried to change the keyboard layout from "en" to "cn", but it is still not work.
The input method coin on the righttop is right when I change the method.But it still output english even I use ibus-pinyin.There is not a box for my choosing chinese words.
Last edited by Dilingg (2015-05-15 16:18:43) -
What is the recommended practice for bundling JRE with Java Application?
Hello,
I am using a software called Advanced Installer to create a Windows installer (.msi file).
This .msi file contains :
- a .exe file which is a wrapper for a .jar file (a Java Swing program),
- and a directory for the JRE.
I read an article on the web which recommended bundling the JRE with the Java program. And
this is what I am doing. And my understanding is that if the user's system does not already
have the JRE installed, the bundled JRE would allow my Java Swing program to run.
However, when I tried to install my .msi file on a system that did not already have the JRE,
my Java Swing program would not start. After installing the JRE on this system, my Java
Swing program started and ran fine.
Do I really need both JREs, one bundled with my Java Swing application and one installed at the
system's location for my Java Swing program to start and run?
Another question I have is that if every application would bundle its own JRE, there could be many
copies/possibly versions of the JRE on the system, is this acceptable? What is the common or
recommended practice?
Thank you for your help.
Akino.I'm sure why it didn't work. That is how I bundle the JRE. The only disadvantage about bundling is the size of the installer file will be pretty large. In my opinion, relying on a public version is not a good idea if you have no control of the target box. The user might, for some reason, decide to uninstall java or upgrade to a new incompatible version and your app. may stop working. I'm sure many on here will disagree with this though.
I always use the marner .exe wrapper:
http://www.megaupload.com/?d=FYZAVM77
and inno installer:
http://www.jrsoftware.org/isinfo.php
They're both free to use and I've had no problems with them. Another wrapper is Javaround:
http://sourceforge.net/project/showfiles.php?group_id=234356 -
Problem with java swing button and loop
Problem with java swing button and loop
I�m using VAJ 4.0. and I�m doing normal GUI application. I have next problem.
I have in the same class two jswing buttons named start (ivjGStart) and stop (ivjGStop) and private static int field named Status where initial value is 0. This buttons should work something like this:
When I click on start button it must do next:
Start button must set disenabled and Stop button must set enabled and selected. Field status is set to 1, because this is a condition in next procedure in some loop. And then procedure named IzvajajNeprekinjeno() is invoked.
And when I click on stop button it must do next:
Start button must set enabled and selected and Stop button must set disenabled.
Field status is set to 0.
This works everything fine without loop �do .. while� inside the procedure IzvajajNeprekinjeno(). But when used this loop the start button all the time stay (like) pressed. And this means that a can�t stop my loop.
There is java code, so you can get better picture:
/** start button */
public void gStart_ActionEvents() {
try {
ivjGStart.setEnabled(false);
ivjGStop.setEnabled(true);
ivjGStop.setSelected(true);
getJTextPane1().setText("Program is running ...");
Status = 1;
} catch (Exception e) {}
/** stop button */
public void gStop_ActionEvents() {
try {
ivjGStart.setEnabled(true);
ivjGStart.setSelected(true);
ivjGStop.setEnabled(false);
getJTextPane1().setText("Program is NOT running ...");
Status = 0;
} catch (Exception e) {
/** procedure IzvajajNeprekinjeno() */
public void IzvajajNeprekinjeno() { //RunLoop
try {
int zamik = 2000; //delay
do {
Thread.sleep(zamik);
PreberiDat(); //procedure
} while (Status == 1);
} catch (Exception e) {
So, I'm asking what I have to do, that start button will not all the time stay pressed? Or some other aspect of solving this problem.
Any help will be appreciated.
Best regards,
TomiThis is a multi thread problem. When you start the gui, it is running in one thread. Lets call that GUI_Thread so we know what we are talking about.
Since java is task-based this will happen if you do like this:
1. Button "Start" is pressed. Thread running: GUI_Thread
2. Event gStart_ActionEvents() called. Thread running: GUI_Thread
3. Method IzvajajNeprekinjeno() called. Thread running: GUI_Thread
4. Sleep in method IzvajajNeprekinjeno() on thread GUI_Thread
5. Call PreberiDat(). Thread running: GUI_Thread
6. Check status. If == 1, go tho 4. Thread running: GUI_Thread.
Since the method IzvajajNeprekinjeno() (what does that mean?) and the GUI is running in the same thread and the event that the Start button has thrown isn't done yet, the program will go on in the IzvajajNeprekinjeno() method forever and never let you press the Stop-button.
What you have to do is do put either the GUI in a thread of its own or start a new thread that will do the task of the IzvajajNeprekinjeno() method.
http://java.sun.com/docs/books/tutorial/uiswing/index.html
This tutorial explains how to build a multi threaded gui.
/Lime -
Reg: Embedding Firefox with Java Swing
Sir,
The thing is We all know that Mozilla Firefox is open source.
How to embed the mozilla firefox with Java Swing or java AWT Frame.
Could me suggest me the ways to do it, the code and also the concept behind it?
I put the same question in forum but i didnot get any response.and i also googled a lot,but none was help ful
Could u please help us Sir?
Thanks..you can use webrenderer or jxbrowser library...to embed web browser in your swing application.
otherwise Use OLE with java to embed IE in your swing application.... -
How to realize them with Java Swing?
1.I want to realize the function - Save, which is similar with "save" in windows notepad - after clicking "save", a dialog box is poped up, then i can input the filename and save it. Is there any ready class like JFileChooser in Java Swing?
2.I want to set Font and color in the text area. I can do it now. But I must set the font and color b4 input the words. How can I do it like Windows Word - I just input my words, then I highlight them and select the font and colour....all highlighted words r change....can I don it with Java swing and how?
Thanks..1.I want to realize the function - Save, which is
similar with "save" in windows notepad - after
clicking "save", a dialog box is poped up, then i can
input the filename and save it. Is there any ready
class like JFileChooser in Java Swing?JFileChooser is a Swing based dialog, use it for your problem.
>
2.I want to set Font and color in the text area. I can
do it now. But I must set the font and color b4 input
the words. How can I do it like Windows Word - I just
input my words, then I highlight them and select the
font and colour....all highlighted words r
change....can I don it with Java swing and how?
Thanks..I am currently working this, try the ElementIterator w/ the Document that your inputing, as you iterate throught the nodes, you modify the attribute sets there.
Hope this helps.
> -
Need help for connecting Ms Acces with java Swing in Mac OS
Hi all,
i need to connect to Ms Access in MAc os through my java swing program.
Is it possible for accessing Ms access through dsn in Mac OS.
If Possible which driver shall i use for Establishing Connection with MS Access in Mac OS.
Suggestion is needed urgently.
Can anybody help me out regarding this..
Thanks in advance.
Regards,
sreandif I don't find a better solution I'll try your 2nd option but what do you mean by "combo" update?
My understanding is to simply insert the OS 10.5 installation CD, reinstall the OS and the just keep updating it via the OS SSoftware update panel and stop untill I see the scary Java 8 update. Is that what you meant?
While you can do it that way, the combo update picks up operating system updates through a collection of releases. When dealing with operating system upgrades, I've found using the combo updates to be more reliable than Software Update, as sometimes Software Update doesn't apply updates correctly, and weird things can happen. Doesn't happen often though, thankfully.
So the OS X 10.5.5 Combo update contains all updates between 10.5.0 and 10.5. The 10.5.8 combo update contains the updates from 10.5 thru 10.8. Here are the updates:
10.5 combo update: http://support.apple.com/kb/DL692
10.8 combo update: http://support.apple.com/kb/DL866
If you go down the combo path, repair permissions before and after doing each update. Then do Software Update for any other non-OS X updates, and don't apply the Java Update 8. -
Does Seagate Crystal Report Be Integrated with Java Swing
Hello All
We are developing java programs for quiet some time now, But what we are trying to do now is can we do the things what VB can do , Thatis the reports from the Database Query can be formatted into Crystal reports
I use Forte For java Sun One Studio 4 For developing Swing Applicatioon
If Any of U can give me idea, ie a report not in HTML format But Crystal Report, PLease Le me know
RegdsAre you developing an Applet or a standalone application?
The way I'd handle this is to install the Crystal Reports web server and then call these reports from the web simply by specifying an appropriate URL.
By the way: the Crytsal reports server also handles report requests in Netscape with JAVA (IE with ActiveX)
so perhaps this is the right corner to look for answers
Regards -
Hi people!i need some help
Im a new user for java programming language.Well im programming an application using java swing libraries. I have some problems trying to accesing variables from those swing Jpanels. Ill make it clear....
Im using Netbeans...
I have a class for the window (a JFrame) including 2 Jtextfields and 2 Jlabels
import .......
public class myclass extends javax.swing.JFrame{
public double gp;
public double gv;
public G() {
initComponents();
gpnom=this.gpnom;
gvnom=this.gvnom;
private void TXFgpnom(java.awt.event.ActionEvent evt) { //TXField
gpnom= Double.parseDouble(TXFgpnom.getText());
gvnom= Double.parseDouble(TXFgvnom.getText());
.......//theres a lot of more code .for listeners..next...
Now ive created a new file (a new class)in the same package ,but i cant access public variables from swing class
//the next class was created in a new file
public class hi () {
JPanel prin =(JPanel) new myclass().getContentPane(); //ok
double number=gpnom // error variable not found
When i try to get the value of "number" ...i always get "ERROR" And the class for that textfield was public..i think...
HOw can i use variables from that Jpanel?
Id appreciate an answer...
thanx for your help!
PacoIn future Swing related questions should be posted in the Swing forum and camickr will be more likely to answer if you have used code tags to properly format your code.
Luckily this problem does not seem to be Swing related in the least because the public variables you have in your other class are named gp and gv and further when you access public variables (or properties) of a class you must access them by an instance of that class. Which you don't appear to be doing either. -
Problem on distributed computing with java..?
My problem is:
I have one server and three clients.Firstly 3 clients sends data simultaneously to the server and should be accessed by the server at the same instant.
Server does some calculations using this data and should broadcast the results to clients.The clients after sending the data to server are engaged with their own work.After the completion of their work they should receive the data sent by the server.
Please suggest the solution.
And also which package/methods should I use for broadcasting Data to clients....Sockets and threads?
-
Session in java swing??
Hi friends,
I need to create session in java swing...
I have a client running in swing and can access resources in multi-threaded server. I need to validate user using session. But i don't know how to use session.
User has to login with username & password (authentication verified at server using socket communication).
If successful the login frame vanishes and other options are displayed. user has a feature that he can send files to other
user. so i need to use session for security purpose.
Anyone help me with code
Edited by: sathya_vn on Apr 20, 2008 5:41 PMAnyone help me with the code-----> u got tat wrong..
I need to know how to use session with java swing. I requested if anyone has such code....
This is a part of my project .
Am using MySQL Database to store username and password.
Cleint side interface has a frame (first frame--frame1) requesting client to provide login information. The login details <username and password> are sent to server. server validates whether the login info are correct or not and return true or false .
If false the frame1 will show a JOptionPane ... message stating that wrong username or password specified.
If true i need to create a session and other operations are done after session validation. I am using ssl socket.
If u want the code then i have post around 300 or more lines.. -
XSLFO Sequence pages with java
Hi all,
I have a query regarding the programming of xsl fo sequence pages using java swings.
I have programmed fo master pages using swings but now i am not able to understand the logic beind the sequence pages with java swings.
My problem is how can i program fo sequence pages with Swings technology....
Any Help is greatly appreciated.........
Looking forwrd for your reply.........
Thanks in advance,
Karthik.I found the reason, although not the solution.
My account is not an administrator's account.
When I log in with an administrator's account, Java works again. -
Hello,
I am having difficulty in displaying graphics2d(bufferedImage) with Java Swing - The Swing does not show, unless it is a button and you move your mouse over it. The problem disappears when the "public void paint(Graphics g) {.." is employed.
Can anyone suggest an article to read about solving this?
regards
david55hi and thanks for your reply and help.
I got it to work but have another strange problem. Im sure it involves updating or repainting. Basically i create from 1 - 100 images on a JPanel, but the only way they will "appear" is if i manually resize the whole application (dragging). Ive tried repaint() update() etc in multiple locations.
Am i on the right track and just need to find the right line to insert the code?
regards,
david55 -
Attn: Sun. Can we distribute the JRE with a program we write?
I'm trying to find out whether it's legal to distribute the JRE with a program I write. If you look at the license agreement when you download the JRE, first it has the regular license agreement, which says that you can't. But then it has the "supplemental" license agreement (and it says that this "modifies" the regular license agreement). In section 2 of the supplemental license agreement, it quite clearly states that you can as long as you don't modify it and you include some little messages in your documentation.
So I'm hoping to get an answer from someone who actually works for Sun. It seems pretty clear to me that we ARE allowed to distribute the JRE with a program, but people keep sending me emails when I tell them about it - saying things like "You can't program in Java because you can't distribute it."
What I want to do is have an installation program that installs my game and then installs Java (with Sun's JRE installer - this is included ONLY so that it can run my game, as stated in the supplemental license agreement). I should also mention that I do actually intend to SELL this program, so if that's a problem, please say so. Anyways, could someone from Sun tell me whether this is allowed or not? I don't want to break the law.
- Steve FletcherThe JRE includes a readme file that explicitly states that distribution is permissible, given certain conditions. In particular, look at the 1st paragraph below:
Reproduced here:
README
Java(TM) 2 Runtime Environment, Standard Edition
Version 1.4.1
The Java(TM) 2 Runtime Environment is intended for software developers
and vendors to redistribute with their applications.
The Java 2 Runtime Environment contains the Java virtual machine,
runtime class libraries, and Java application launcher that are
necessary to run programs written in the Java programming language.
It is not a development environment and does not contain development
tools such as compilers or debuggers. For development tools, see the
Java 2 SDK, Standard Edition.
=======================================================================
Deploying Applications with the Java 2 Runtime Environment
=======================================================================
When you deploy an application written in the Java programming
language, your software bundle will probably consist of the following
parts:
Your own class, resource, and data files.
A runtime environment.
An installation procedure or program.
You already have the first part, of course. The remainder of this
document covers the other two parts. See also the Notes for Developers
page on the Java Software website:
http://java.sun.com/j2se/1.4.1/runtime.html
Runtime Environment
To run your application, a user needs the Java 2 Runtime Environment,
which is freely available from Sun for application developers to
redistribute.
The final step in the deployment process occurs when the software is
installed on individual user system. Installation consists of copying
software onto the user's system, then configuring the user's system
to support that software. You should ensure that your installation
procedure does not overwrite existing JRE installations, as they may
be required by other applications.
=======================================================================
Redistribution of the Java 2 Runtime Environment
=======================================================================
The term "vendors" used here refers to licensees, developers, and
independent software vendors (ISVs) who license and distribute the
Java 2 Runtime Environment with their programs.
Vendors must follow the terms of the Java 2 Runtime Environment Binary
Code License agreement.
Required vs. Optional Files
The files that make up the Java 2 Runtime Environment are divided into
two categories: required and optional. Optional files may be excluded
from redistributions of the Java 2 Runtime Environment at the
licensee's discretion.
The following section contains a list of the files and directories that
may optionally be omitted from redistributions with the Java 2 Runtime
Environment. All files not in these lists of optional files must be
included in redistributions of the runtime environment.
Optional Files and Directories
The following files may be optionally excluded from redistributions:
lib/charsets.jar
Character conversion classes
jre/lib/ext/
sunjce_provider.jar - the SunJCE provider for Java
Cryptography APIs
localedata.jar - contains many of the resources
needed for non US English locales
ldapsec.jar - contains security features supported
by the LDAP service provider
dnsns.jar - for the InetAddress wrapper of JNDI DNS provider
bin/rmid
Java RMI Activation System Daemon
bin/rmiregistry
Java Remote Object Registry
bin/tnameserv
Java IDL Name Server
bin/keytool
Key and Certificate Management Tool
bin/kinit and jre/bin/kinit
Used to obtain and cache Kerberos ticket-granting tickets
bin/klist and jre/bin/klist
Kerberos display entries in credentials cache and keytab
bin/ktab and jre/bin/ktab
Kerberos key table manager
bin/policytool
Policy File Creation and Management Tool
bin/orbd
Object Request Broker Daemon
bin/servertool
Java IDL Server Tool
In addition, the Java Web Start product may be excluded from
redistributions. Depending on the platform, the Java Web Start
product is contained in a file named as follows. The actual
product version number would replace the <version number> notation.
javaws-<version number>-solaris-sparc-i.zip
javaws-<version number>-solaris-i586-i.zip
javaws-<version number>-linux-i586-i.zip
javaws-<version number>-windows-i586-i.exe
Redistribution of Java 2 SDK Files
The limited set of files from the SDK listed below may be included in
vendor redistributions of the Java 2 Runtime Environment. All paths
are relative to the top-level directory of the SDK.
- jre/lib/cmm/PYCC.pf
Color profile. This file is required only if one wishes to
convert between the PYCC color space and another color space.
- All .ttf font files in the jre/lib/fonts directory. Note that the
LucidaSansRegular.ttf font is already contained in the Java 2
Runtime Environment, so there is no need to bring that file over
from the SDK.
- jre/lib/audio/soundbank.gm
This MIDI soundbank is present in the Java 2 SDK, but it has
been removed from the Java 2 Runtime Environment in order to
reduce the size of the Runtime Environment's download bundle.
However, a soundbank file is necessary for MIDI playback, and
therefore the SDK's soundbank.gm file may be included in
redistributions of the Runtime Environment at the vendor's
discretion. Several versions of enhanced MIDI soundbanks are
available from the Java Sound web site:
http://java.sun.com/products/java-media/sound/
These alternative soundbanks may be included in redistributions
of the Java 2 Runtime Environment.
- The javac bytecode compiler, consisting of the following files:
bin/javac [Solaris(TM) Operating Environment
and Linux]
bin/sparcv9/javac [Solaris Operating Environment
(SPARC(TM) Platform Edition)]
bin/javac.exe [Microsoft Windows]
lib/tools.jar [All platforms]
- jre\bin\server\
On Microsoft Windows platforms, the Java 2 SDK includes both
the Java HotSpot Server VM and Java HotSpot Client VM. However,
the Java 2 Runtime Environment for Microsoft Windows platforms
includes only the Java HotSpot Client VM. Those wishing to use
the Java HotSpot Server VM with the Java 2 Runtime Environment
may copy the SDK's jre\bin\server folder to a bin\server
directory in the Java Runtime Environment. Software vendors may
redistribute the Java HotSpot Server VM with their
redistributions of the Java Runtime Environment.
Unlimited Strength Java Cryptography Extension
Due to import control restrictions for some countries, the Java
Cryptography Extension (JCE) policy files shipped with the Java 2 SDK,
Standard Edition and the Java 2 Runtime Environment allow strong but
limited cryptography to be used. These files are located at:
<java-home>/lib/security/local_policy.jar
<java-home>lib/security/US_export_policy.jar
where <java-home> is the jre directory of the Java 2 SDK or the
top-level directory of the Java 2 Runtime Environment.
An unlimited strength version of these files indicating no restrictions
on cryptographic strengths is available on the Java 2 SDK web site for
those living in eligible countries. Those living in eligible countries
may download the unlimited strength version and replace the strong
cryptography jar files with the unlimited strength files.
Endorsed Standards Override Mechanism
An endorsed standard is a Java API defined through a standards
process other than the Java Community Process(SM) (JCP(SM)). Because
endorsed standards are defined outside the JCP, it is anticipated that
such standards will be revised between releases of the Java 2
Platform. In order to take advantage of new revisions to endorsed
standards, developers and software vendors may use the Endorsed
Standards Override Mechanism to provide newer versions of an endorsed
standard than those included in the Java 2 Platform as released by Sun
Microsystems.
For more information on the Endorsed Standards Override Mechanism,
including the list of platform packages that it may be used to
override, see
http://java.sun.com/j2se/1.4.1/docs/guide/standards/
Classes in the packages listed on that web page may be replaced only
by classes implementing a more recent version of the API as defined
by the appropriate standards body.
In addition to the packages listed in the document at the above
URL, which are part of the Java 2 Platform, Standard Edition
(J2SE(TM)) specification, redistributors of Sun's J2SE
Reference Implementation are allowed to override classes whose
sole purpose is to implement the functionality provided by
public APIs defined in these Endorsed Standards packages.
Redistributors may also override classes in the org.w3c.dom.*
packages, or other classes whose sole purpose is to implement
these APIs.
Copyright 2003 Sun Microsystems, Inc., 4150 Network Circle,
Santa Clara, California 95054, U.S.A. All rights reserved -
Problem with java and pogo games
i use mozilla and now with the problems with java and hackers cannot play my pogo games,what can i do? i disabled my java i tried java 6 doesnt work or is not safe,what is a safe way to play games on pogo that use java?
Oracle has released a Java 7 Update 11 to address security vulnerabilities and you should update to that version.
*https://support.mozilla.org/kb/how-to-use-java-if-its-been-blocked
See also:
*http://kb.mozillazine.org/Java#Windows_installation_issues
You can find the latest Java version on the Oracle website.
See Java Platform > Java SE 7U11 and Java 6U38 (Download JRE)
*http://www.oracle.com/technetwork/java/javase/downloads/index.html
Maybe you are looking for
-
Hi can somebody pls tell me how can I get report for the Moving average price on a particular date & value of the stock accordingly on that day. Thanks & regards.. pravin
-
How to configure ePrint on LaserJet CP1025nw Color Printer
Solution found: How to Configure HP ePrint on the LaserJet CP1025nw Color Printer System: Windows (Widows 7) Step 1 – Install Printer Install the CP1025nw Printer to USB, Wifi or Ethernet. (Printer needs to print correctly in order to pass to th
-
Windows Phone camera App crash when switching to another page
I am creating a Simple Face Detection App for Windows Phone in C#. I turn on my camera , everything works perfect and FaceDetector works too, but when I try to navigate to other page my App always crashes and I do not why. I tried to test my App in W
-
Unable to charge my Ipad 4 with my Laptop (HP 7010tx) USB . I am Getting error message as "Not Charging" . Please give a solution for this ...???
-
Hi, I used to develop Flash w/ Flash 5, stopped for a while and just started again recently. I've tried creating a button but I'm quite surprised as to its behavior. My button is a symbol containing a png file and a static text object. The first 3 fr