class Bouncy<T> extends Throwable {
}
// Error: the generic class Bouncy<T> may not subclass java.lang.Throwable
Why doesn't Java support generic Throwables?
I have a Mac Java app bundle that has problems opening an OpenGL window from a SWT dialog in a single process. It just doesn't work.
To solve this problem I would like to open a SWT dialog in one instance of the Java app and then have it launch another instance of itself with a parameter saying "this time open the OpenGL window". The part I don't know how to do is finding out what "itself" is on a Mac.
How can I do that?
Can somebody demonstrate how to send an array of bytes over a TCP connection from a sender program to a receiver program in Java. (I'm new to Java programming, and can't seem to find an example of how to do this that shows both ends of the connection (sender and receiver.) If you know of an existing example, maybe you could post the link. (No need to reinvent the wheel.) P.S. This is NOT homework! :-)
Hi,
Anyone give example program which explains Java Threads in a simpler way.For example,we have the following threads t1 , t2 and t3 . Here I want code that shows each thread is executing simultaneously not sequentially like non-threaded java programs.
Thx
Refereing to my previous question,
http://stackoverflow.com/questions/2682364/how-to-stich-to-image-objects-in-java
I successfully stiched two java.awt.Image objects, now I need to stich multiple objects of the same type. Is there any API or library available for that
Hi all.
Can some one recommend a couple of good websites/bloogs/RSS/Podcasts where someone interested in Java can keep himself informed on the latest trends?
(I was thinking in something like Ajaxian.com for Java)
As always, help will be eternally appreciated.
I've been convinced that I should learn another language (primarily PHP/Javascript oriented) and decided on Java.
I learned my basics of PHP, years ago, from www.w3schools.com and Javascript from another similar site (since taken down) that had a series of tutorials that took you from nothing to something.
Is there a similar site for Java? Is there a recommended IDE (Eclipse?) and site to learn?
When I try to use java.lang.System.console(), I get a null pointer. I can still write to out and read from in, but this only works when I run straight from my IDE. When I run the .jar file directly, nothing happens. How can I create a console like I'd see using std::cout for use in Java?
I know about C++ pure virtual classes, but Java went one step further and created a first-class (no pun intended) concept for multiple-interface (not implementation) inheritance, the interface. It's now a staple of major statically-typed languages. Did Java invent the interface concept? Or did it appear in older languages also as a first-class concept?
Hey,
I'd like to convert an array to a set in Java. There are some obvious ways of doing this (i.e. with a loop) but I would like something a bit neater, something like:
java.util.Arrays.asList(Object[] a);
Any ideas?
Cheers,
Pete
Basically I'm trying to proxy some webservices locally (for reasons I won't go into now) and then have a Java application call it.
I'm looking at BlazeDS since it seems to do just this, mostly to avoid the crossDomain.xml file required by Flex to call webservices. However I can't seem to find any reference on how to connect through a Java client (probably using Axis2).
Any suggestions, and especially tutorials, would be greatly appreciated.
I'm using FreeMarker to generate java code, but as most of it is dynamically generated it's difficult to control the code formation.
I want to get code well formatted. Does anyone knows a lib or something like a pretty printer for java code?
I need a simple to use / good docs / good support java lib to read and write word documents, namely word 2007 support (and word 2010 support planned).
As the project I'm in has budget and time-constraints I don't mind buying a commercial lib :) I know they are XML files in a somewhat open format but I really don't want to waste time understanding the XML specification.
Any good recommendations from happy customers?
(Right now my choice is going to Aspose.Words for Java)
I want to know the current Date and Time.
The code
Calendar.getInstance();
represents a date and time of the system on which the program is running and the system date can be wrong.
So Is there any way by which I can get correct current date and time irrespective of the date and time of the system on which program is running?
i am doing a master project on how java applet works with web browsers.Can anyone give me details or any link that can be useful.How the web browser interacts with the java applet.
The url: http://www.teamliquid.net/replay/download.php?replay=1830 is a download link to a .rep file.
My question is: how to download this content in java knowing the name of the original rep file in order to save it with a defined prefix, like path/_.rep
//I was trying to run wget from java but I don't see how to get the original file's name.
I need a media information extraction library (pure Java or JNI wrapper) that can handle common media formats. I primarily use it for video files and I need at least these information:
Video length (Runtime)
Video bitrate
Video framerate
Video format and codec
Video size (width X height)
Audio channels
Audio format
Audio bitrate and sampling rate
There are several libraries and tools around but I couldn't find for Java.
C# properties (I mean get and set methods) are a very useful feature. does java have something similar to C# properties too. I mean how we can implement something like the following C# code in java:
public string Name
{
get
{
return name;
}
set
{
name = value;
}
}
thank you in advance
Hello Guys
I am trying to access an Shellfolder like: "Shell:::{35786D3C-B075-49b9-88DD-029876E11C01}"
via Java on a Windows PC ... but I havn't found a way to do so up to now.
Is this generally possible with Java? Recently I uncovered the sun.awt class "ShellFolder"... Does this class provide the abilitiy to access such an folder?
thanks for your help Ripei
Where can I get an opensource library written in java, especially for imap protocol.
For Example:
there is imaplib in python
likewise is there anything else in
java to replace that "imaplib"
So I am writing a Java code to represent a heap sort and to represent the operation I need to have a waiting function which will wait between different operation but I am not sure if there is a function in Java that does that or do I need to write the function by myself and how would i do that.
Representing heap sport is a homework but writing the waiting function isn't so I appreciate your help
If I have a simple javaprogram that processes lines of text from standard input, then I can run it with the following script:
@Echo off
java Test < file.txt
pause
exit
The script redirects lines of input from a separate file.
Is there a way that I can avoid having to use an extra file? Or is this the easiest way?
Thanks.
Started to learn LINQ with C#.
Especially LINQ to Objects and LINQ to XML.
I really enjoy the power of LINQ.
I learned that there is something called JLINQ a Jscript implementation.
Also (as Catbert posted) Scala will have LINQ
Do you know if LINQ or something similar will be a part of Java 7?
Update: Interesting post from 2008 - http://stackoverflow.com/questions/346721/linq-for-java
Hi All,
I am a C# programmer. I want to learn Java to implement my windows application. But I don't know what IDE and what tools can help me.
Please help me to choose best platform and IDE and other tools.
Edit:
Thank You For Your Helping. And What is Best Ebooks and UserGuids to Learn java.
Can anyone recommend a light Java IDE that doesn't require you to make new projects each time you want to compile and run a program? I just want to be able to open java files and compile and run them. I have already tried Eclipse and NetBeans but both require you to make a new project each time you want to compile and run a program. Making a new project is fine for large scale projects but for small school assignments this just makes the process more tedious.
Thanks