Is it possible to use a font not on the user's machine for text displayed in a java applet.
Like linking to a ttf font file in the same location as the java applet almost in an @fontface fashion.
Using the return keyword in Java code will return execution to the last piece of calling code in the call stack. If object foo calls baz.bar(), the return keyword in the bar method will continue code execution in foo.
Let's say I have object foo that calls foofoo that calls foofoofoo in the above scenario, and foofoofoo calls baz.bar(). Is there anyway in Java to use the return keyword, or something else, so that the code in the bar method can return all the way back up to foo?
(WITHOUT THROWING AN EXCEPTION)
There are plenty of resources available to a Java developer for getting a jump-start into Ruby/Rails development. The reverse doesn't appear to be true.
What resources would you suggest for getting up-to-date on the current state of java technologies? How about learning how to approach DRY (don't repeat yourself) without the use of metaprogramming? Or how to approach various scenarios where a ruby developer is used to passing in a function (proc/lambda/block) as an argument (callbacks, etc)?
I've read a time ago about generate xml from Java using annotations, but I'm not finding a simple example now.
If I want to make a xml file like:
<x:element uid="asdf">value</x:element>
from my java class:
public class Element {
private String uid = "asdf";
}
Which annotations I should use to perform that? (I have a xml-schema, if this helps the generation)
We have to delete some directories and their contents using Java running on Windows.
I was worried about running into the directory files being locked.
We could just invoke Unlocker to do the delete. Or is there a more Java centric way to handle this situation?
What's the simplest way to create and write to a file in Java?
I know this is a very basic question, but the web is full of different answers for different versions of Java and it would be nice to have an answer here on StackOverflow.
I am making a distributed java app for which I need both parts of the app to run on one standard time. Since system times can be different I was thinking if java API contains some class to download time from a standard online source?
I need a java graph library for visualization that I can incorporate in my own application. I found that jgraph is excellent for visualization but require explicit positioning of the nodes. Is there any open source java graph library that support automatic layout. Any suggestion will be really helpful for me.
I just read this statement in a java book saying Objects in java reside on a heap.
Is a heap used because it is the best way to store data and retrieve data fast ?
I only have an idea about data structures being a beginner. I mean why not stack or something else ?
What is the best way to update a Java or GWT program from MySQL. For example, a MySQL database which holds Weather information... updating whenever the weather changes a degree. How would I update a Java / GWT field with each update. Would I use a thread to query every few seconds??
Is there a way to resize a control, a JTextfield for example, at runtime in java? I want my textfield to have the resize cursors (just like when you point your cursor on the corner of a window) and will be able to resize on runtime. Ive read on the internet that vb6 and C# have those capabilities, is there anything for java? A sample code or a link to a good tutorial will be very much appreciated. Thank you.
I'm looking for a good way to convert Office (mostly Microsoft) documents to PDF in Java. I've been looking at using the OpenOffice SDK but from the samples I've looked at it looks like this requires having OpenOffice running in server mode to do the work.
Does anyone know of a good way to do this? Good meaning the less external requirements, the better. A 100% Java API would be best, but I don't expect that actually exists.
Hi,
I want to exclude a particular method of a class from java compilation.
For eg:
class Test {
public void printdouble(){}
public void printint(){}
}
Depending upon some properties, I want to exclude printdouble method during compilation.
NOTE: I'm using ant script for java compilation
Thanks in Advance
Soman
I need to write version-independent java code, because of some bugs in JDK 1.5 which was fixed in JDK 1.6 now i use the following condition:
if (System.getProperty("java.version").startsWith("1.5.")) {
...
} else{
...
}
Is there another possibility to check this? Will it work for JVM from IBM?
I would like to know if there is a way to execute the "java.exe" as a background process (silent mode execution)
Ex: java -cp . MyClass arg1
I want to run the above statement as a background process , without opening command window
Currently, I have an Java Standalone Swing Application.
Now, when user clicks on the button in the Swing Application, I would like to launch another Java Application (Say : calculator.jar)
May I know what is the portable way to do so? So that it will work in multiple OS?
SEVERE: IOException while loading persisted sessions: java.io.WriteAbortedException: writi
ng aborted; java.io.NotSerializableException:
That means this object cannot be persisted on hard disk.
Does it imply that it's not safe to keep in Session objects that do not implement "Serializable"?
I haven't heard that there are limitations on saving non-serializable objects in Session object.
It simply means that Tomcat will always keep them in memory, right?
SEVERE: IOException while loading persisted sessions: java.io.WriteAbortedException: writi
ng aborted; java.io.NotSerializableException:
That means this object cannot be persisted on hard disk.
Does it imply that it's not safe to keep in Session objects that do not implement "Serializable"?
I haven't heard that there are limitations on saving non-serializable objects in Session object.
It simply means that Tomcat will always keep them in memory, right?
I want to a Java ME application that transfers any SMS received to a PC using bluetooth. The PC can then direct the Java ME application via bluetooth to send a response SMS. Is there library available for this architecture or I have to design it myself?
Is this approach correct or a better one exists? I want to use bluetooth as then I will not have dependency on the cable.
Problem: Turn "my testtext TARGETSTRING my testtext" into "my testtext targetstring my testtext"
Perl supports the "\L"-operation which can be used in the replacement-string.
The Pattern-Class does not support this operation:
Perl constructs not supported by this class:
[...]
The preprocessing operations \l \u, \L, and \U.
http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
Switching from JVM 1.4 to 1.5 has performance benefits as per release notes.
http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html#performance
We have Java 1.4 compiled classes which are run on 1.5 JVM, will these classes suffer in performance because they were compiled using 1.4 ?
Hi All
I have a modal popup as (lightbox etc.). If i want to add java applet into the modal popup via javascript i encounter a problem that is Java Applet don't display propperly sometimes dont' everytime. I tried to solve it setTimeout methot but it didn't solve :( Do you have a suggestion this issue? Thanks.
I'm trying to convert an old Delphi program I wrote into Java to compile and run on my Android phone. I'm running the Android 2.1 operating system but am using version 1.6 of the SDK.
I have a routine in Delphi where I set the colour of pixels on a canvas individually along the lines of:
image1.canvas.pixels[x, y] := GetMyTColor(x, y);
Is there a Java equivalent to the property on the Canvas:
property Pixels[X, Y: Integer]: TColor
I've tried implementing various methods from around the internet, all seem to be providing the same solution. But it just won't work and I'm unsure why, it creates the file, however, it's blank and if I try loading that file, it has an error.
Main.java contains the code to save and load the file: 190-224.
Rooms.java contains the object.
Code
Any help is greatly appreciated, I've been trying for almost a week now! Thanks in advanced!