how to overcome java applet security (communication with the containing server only)?
is there a way to overcome that restriction? I mean to communicate with a java applet to other than the originating server? ...
is there a way to overcome that restriction? I mean to communicate with a java applet to other than the originating server? ...
I am developing an application that needs to prevent multiple login using the same user name and password. If it happens on the same machine then obviously we need to do something with the user session, but it should also prevent if they are login on different machines using the same user name and password. We have to keep following th...
I have made two JAVA classes classA and classB in the same package. The classA consists of two labelFields and a button. And then I made 5 objects of classA inside classB. Now when click on the button of any object of classA which is inside classB. The logic for buttons click event i have written it inside classA. Now how can classA know...
I've had the same need a few times now and wanted to get other thoughts on the right way to structure a solution. The need is to perform some operation on many elements on many threads without needing to have all elements in memory at once, just the ones under computation. As in, Iterables.partition is insufficient because it brings al...
I will be retrieving values from the range -12 to +12 & I need to convert it to a specific timezone format string. e.g. -3 becomes -03:00 0 becomes Z 4 becomes +04:00 Is there any readymade utility that I've overlooked that does the same thing in JDK6 ? Thanks ...
So you've got an interface and an abstract class that implements a subset of the methods in the interface. You've also got some classes that inherit the abstract class and give implementations of the methods the abstract class doesn't give. So what's the best practice here? I'm talking about issues like: 1) Should the abstract class im...
I have a JPA project connected to a MySQL database where my entity object is mapped to a table with a constraint on 2 columns. That is: @Entity @Table(name = "my_entity") class MyEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name = "id") private Integer id; @Bas...
Hi, I am trying to use private TcpClient tcpClient; in a class and every time when I send a command like LIST, RETR, STOR, I used to lock the TCPClient for that particular time of execution of commands and getting response. Now when I send the other command in between the one is executing, It isn't able to lock that tcpclient instan...
I understand that in this code: class Foo { public static void method() { System.out.println("in Foo"); } } class Bar extends Foo { public static void method() { System.out.println("in Bar"); } } .. the static method in Bar 'hides' the static method declared in Foo, as opposed to overriding it in the ...
My project layout is /ServerModule /commonClasses /AndroidClient /needsToIncludeSomeCommonClasses but as soon as i want to compile and build my AndroidClient IntelliJ adds the server libs to the compile classpath of my android project and I get a UNEXPECTED TOP-LEVEL EXCEPTION because of multiple classes that are present in andro...
Hi,I have Client class and Server class but when i run both main methods and then nothing will happen and when i stop running ,this exception will be occurred. why?? please help me,how can I fix it??? my Client class: public class Client { static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); /** * @pa...
Hey guys, i created a pong clone, i would like to add some sound effects when collisions occur my problem is every example i could find about synthesizing sound takes about 30 lines of code considering my whole application is 90 lines of code i am looking for a simpler approach. Is there a simple way to create a beep sound of different t...
Hi all, I am using the following code to make a http client ,i am facing problem in execute method ,its getting stuck there. public static final HttpHost target = new HttpHost("test.xyz.com", 443, "https"); public static void test() { HttpEntity responseEntity = null; DefaultHttpClient client = new DefaultHttpClient(); Htt...
hi, im currently working on a app for a podcast (katg.com) which will let you listen live etc... however, i have not found any open source code available to stream shoutcast. I know there are some ways of doing it, but I find it hard to find any available code on the net that explains it for a java/android beginner like myself. Anyone k...
Hi, Is it possible to return in a static method a class? I will explain... I have: public class A { public static void blah(){} } public class B { } I want to create a static method in B witch returns A. So you can do: A.blah(); And B.getA().blah(); This, without creating an instance of A. Just use it static methods. Is this ...
i have a xml file named as default xml with sample contents as <check>hi</check> in my application i am doing an operation such that it wil operate on the xml and writes the new value to it, by overriding the newvalue on the oldone ex: <check>hi updated</check> and i closed my application now my problem is here: whenever i star...
Hello, i want to make the installation package on the mac os of my java application using the package maker. is there any one having the link that will show step by step guidance for performing this. ...
I have a ruby on rails application and thinking about porting it to java. What are the things I should consider before that? How hard is that task in terms of changes required? Any advice from the people who have walked this path is greatly appreciated. Motivation: I have two web applications using same data. One is in java, another - ...
With a known formula extracted from a spreadsheet, is it possible to apply/evaluate the formula without having it reside in an actual cell? I suppose one can create / locate a blank cell on the sheet (anyone have any ideas how this might be done efficiently?) and evaluate the formula this way, but is there a better way? ...
This is driving me crazy. When I set an appropriate size for my window in design-mode it just ignores this size and uses something else when I compile and run. Even tough I set the minimumSize and preferredSize it just ignores this... Why? How can I set my own size? ...