I'm making a game in Java, and I need a good file format to store the player's saved data.
Any suggestions?
Feel free to give examples in code if you want.
hi guys,
I'm working on an application using Android SO and Java. I would like to send an xml file as POST to a php server, that inserts the information from the xml into a database.
how can i do that?
regards :D
I have downloaded and installed the j2me polish successfully and i have tried to create the project but there is a reference problem showing that the specified folder does not contain the java platform but it is successfully working with normal project
instead of polish which LWUIT to use?
how can i manipulate pixel values of a loaded image then save portion of that image into a new image(1 image per word).i found several example regarding saving or loading image but i cant understand how can i save image portion???i am trying to do it with java
I'm fairly new to programming and from learning I have seen different ways of formatting code, comments, etc; and have been recommended on different techniques.
I mostly program in C#, C++, and Java so I want to know what is the the best way to layout code so that if other people where to go through it, they would be impressed by how simple and easy to understand it is.
I would like to know the same thing for commenting as well.
Kryo is a very new and interesting Java serialization library, and one of the fastest in the thrift-protobuf benchmark. If you've used Kryo, has it already reached enough maturity to try it out in production code?
Suppose I have a Java method that returns a HashMap object.
Because a LinkedHashMap is a subclass of HashMap, I can return a LinkedHashMap from this method just fine.
On the next "read" action (no adding/removing/modifying of K/V pairs), would iterating over the keys of the resulting method (which returns a HashMap) go in the same order as the originating LinkedHashMap, even though the HashMap lacks the key links?
why do i get this exception?
Map myHash = null
myHash = (HashMap)Collections.synchronizedMap(new HashMap());
If i try to use this hashmap, i get java.lang.ClassCastException
I have a Groovy application for Windows and am trying to convert a Hash object to an Apple plist file. What is the best way to go about this? Seems like this is something that must already be solved in Java but I can't seem to find any examples.
Thanks in advance
Can anybody provide examples or links on how to establish a JDBC connection pool?
From searching google I see many different ways of doing this and it is rather confusing.
Ultimately I need the code to return a java.sql.Connection object, but I am having trouble getting started..any suggestions welcome.
Hello
For an embedded system with internet (which works under a set-top box) I want to develop a primitive Facebook interface where users can type their user-names and password, showing their latest notificationsa, messages and other casual stuff via the recent Facebook Graph API.
This middleware program uses Java ME to run programs (such as this simple facebook app) and it can connect to internet however it doesn't have a real web browser.
Under this circumstance, is it possible to achieve such Facebook application? If you think so, what approach would you suggest ?
Thanks
I want to learn a simple language so I can code simple things maybe eventually a game but I don't know where to start. I can code simple things using apple script but you can't do that much with that and it only works on macs. I have a mac and a dell so something that I could code and run on both would be nice. Also all my school offers is java so if you have any ideas on how to learn the language that would be appreciated. Thanks
I want to make an Application that uses RxTx version 2.2pre2 to work with Serial Ports. What are the Licence restrictions, since it is an "LGPL v 2.1 + Linking Over Controlled Interface" licenced library if I don't use the Sun's javax.comm.* interface, but the RxTx's own gnu.io.* when importing into Java Files?
that's how the session factory should be gotten:
protected SessionFactory getSessionFactory() {
try {
return (SessionFactory) new InitialContext()
.lookup("SessionFactory");
} catch (Exception e) {
}
}
Please provide a simple solution for Tomcat6 to be able to get SessionFactory
thru simple jndi lookup in Java code.
What should be written in what file on the side of Tomcat ?
Hi all,
I'm writing a Java applet where I should be able to simulate a connection between two hosts. Hence I have to generate packet round-trip times at random.
These RTTs can go from ~0 to infinity, but are typically oscillating around some average value (i.e. an extremely large or small value is very improbable but possible). I was wondering if anyone had an idea of how I could do this?
Thanks in advance
How to convert doc to pdf using java api. where document contains various formats such as tables in ms word. when converting to pdf using iText. where actual document looks different to converted pdf. please provide any api not an exe installed for converting . must be an open source
I would like to do a "sexy" / user-friendly / appealing GUI in java. Swing is a limited in terms of "skin" customisation.
I'm thinking about JavaFX but I don't it yet,
what can I achieve with this technology ?
how hard is it ?
do you have examples of real-life examples of Swing/JavaFX integration ?
I would like to do something in this spirit of this, which is built on the .NET framework:
original link: http://www.patrickpayet.com/net/?p=329
Hi,
I have noticed in recent times that when invoking my ant scripts to build and unit test my Java app, it randomly hangs at various points in the execution.
The ant scripts are been invoked from my local machine on my remote clearcase view.
Has anyone else had this problem?
Please advise if you can.
I want to learn the following:
apache - i don't know for sure what is for
linux - server edition, the os of the server
python - for server side scripting
java - sockets, jsp, other
Am I missing anything? Are there better alternatives ? How should I start? What is apache for ?
I am currently accepting the parameters login and password in my servlet, but logs are storing this info when using wget (as long as it is GET method, and apache is in the middle)
Instead of this I want to enhance my servlet's authentication accepting:
wget --http-user=login --http-password=password http://myhost/myServlet
How can I read, in my servlet, the server side, the login and the password user is sending, in java code?
hi , in my project i need a tow tables each of it has about 2000 row , i want my application to be speed
so my db should load into memory (cached) when the app start and before it close the db have to be saved on the disk . i am using java and i want to use sql
In a jboss service I need to mock some inner class (not EJB) with JMockit. Just for tests I've created inner class ToBeMocked and another one Mock. While deploying to jboss I get error NoClassDefFoundError in line:
Mockit.setUpMock(ToBeMocked.class, new Mock());
with message:
java.lang.NoClassDefFoundError: mockit/Mockit
jmockit.jar is added to the classpath in jboss_service.xml.
Any ideas?
I have an excel spreadsheet that is password-protected. I need to open this spreadsheet and read the data from it. I've been attempting to use the POI API to no avail. A Java solution would be preferred but any ideas would be helpful.
Edit: Yes, I have the password.
Edit2: I am unable to open it with POI with the password, I am looking for an alternate solution.