In Java SE it is possible set the cause of an exception using initCause to avoid losing information about the error when catching and rethrowing an exception Is it possible to do the same in Java ME?
I need to add Plugin support to a Java Swing App (like in Eclipse).
The Plugin should have the ability to add new Menu items and tab components to the swing app.
I am looking for frameworks or libraries which support it. So far I have found Java Plugin Framework http://jpf.sourceforge.net/ and planning to use it.
Are there any other better alternatives to it?
Hi.
In the execution of the scheduled job itself i want to stop it from being executed again and again, how can i do so without having the string that i received when i created the job in the first place ?
public class UfkJob implements IScheduledJob {
public void execute(ISchedulingService service) {
if (...) {
/* here i want to remove the current running job */
}
}
I executed the job outside by using the commands:
ISchedulingService service = (ISchedulingService) getScope().getContext().getBean(ISchedulingService.BEAN_NAME);
service.addScheduledJobAfterDelay(5000,new UfkJob(),200);
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.
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 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
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
Hoe can I detect the main class of my application? The one, which is either given on the command line or loaded from the jar given at the command line?
If this is not possible, why not?
I am in the process of converting some code from C# to Java. I have never used C# before, but it has been pretty easy up to this point.
I have a line that looks like this in the C# file:
coverage.createMethod = delegate (Gridpoint gp){
//Some method stuff in here, with a return objecct
}
What exactly is this trying to do? It seems a little bit like an inline class but I am not sure how to go about converting htis to java
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)
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.
Hi,
I'm dealing with a HTTP sockets project, I have to send 2 HTTP GET requests from my java code like this :
Request 1 : call page X
Page X is setting a cookie.
Request 2 : call to page Y
as you see to access the content of page Y i cookie must be present...
how to accept a cookie from java code please ?
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)?
Hi,
I'm searching a possibility to paint a graph in Java using AWT. My knowledge of Java is still basic, so this is mainly for getting used to AWT, even if it's already "old".
-Felix
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 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?
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??
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?
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?
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
Does anyone have a good solution for integrating some C# code into a java application?
The code is small, so I could re-write in java, but I would rather reuse the code if possible. Don't repeat yourself, etc.
Also, I know I can expose the C# as a web service or whatever, but it has some security/encryption stuff in there, so I would rather keep it tightly integrated if possible.
Edit: It's going to be on a server-based app, so "downloading" another runtime is irrelevant.
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.
Can any body please tell me what code is used for clear screen in java? For example in c++ "system("CLS"); " is used just like this what code is used in java for clear screen? Please help. Thanks!
I have a file whose size is about 300mb i want to read the contents line by line and then add it into arraylist. So i have made an object of array list a1 , then reading the file using bufferedreader , after that when i add the lines from file into arraylist it gives an error Exception in thread "main" java.lang.OutOfMemoryError: Java heap space. Please tell me what should be the solution for this.