Java is an object-oriented language and runtime environment (JRE). Java programs are platform independent, because they are compiled to bytecode and their execution is handled by a Virtual Machine called the Java VM or JVM.

learn more… | top users | synonyms (5) | java jobs

0
votes
0answers
7 views

How does this example get ServletContext?

How does this example have access to ServletContext? Example: https://github.com/ralscha/portal-demos/blob/master/src/main/java/ch/rasc/portaldemos/twitter/SpringConfig.java I've tried using the ...
0
votes
0answers
24 views

Creating a file only if it doesnt exist

So, I have a question on how to do something in Java. I need to create a file (I know how to do this part), only if a file of the same name/type doesn't exist. Also, part I didn't put in the ...
0
votes
0answers
7 views

run time error running the stack which could be due to array size

I created a class that runs a stack. However when I run the main class it gives a runtime error. The class runs like a stack but when the numbers entered go over the stack size its supposed to call a ...
0
votes
0answers
5 views

Java Regex: Match text between two strings strictly inner block

I need a regex which matches between two strings but takes the inner block only. I tried using reluctant quantifier but it did not work. Here is an example: <div> Hi </div> <div ...
0
votes
0answers
12 views

java keyPressed event keeps triggering while key pressed

I have a midi piano program that triggers a note to be played when either the mouse is clicked on the note or a particular keyboard key is typed. I'd like the keyPressed event to behave the same way ...
0
votes
0answers
4 views

Mocking network packets from different IP addresses for java unit tests

I need to test java code that receives network packets from multiple IP addresses. How can I mock the system up in Java unit test?
0
votes
1answer
9 views

Is there possible put a if condition inside of a listValue of a s:select tag?

I have the following s:select tag on my jsp page: <s:select name="collaborator" listValue="%{title.designation+' '+name}" value="cololaborator" id="collaborator" listKey="id" list="listaPsmPse" ...
1
vote
3answers
22 views

Select files with similar names

I'm searching for a script that allow to select multiple files with similar name. I've got 10 files: hello.myapp-1.apk hello.myapp-2.apk hello.myapp-3.apk hello.myapp-4.apk other.ot ... ... ... ...
1
vote
0answers
6 views

Eclipse null analysis: The expression of type int needs unchecked conversion to conform to '@Nonnull Integer'

When configuring Eclipse 4.2.0 to perform a null analysis (configured to use @javax.annotation.Nonnull etc.), the following code will generate the warning Null type safety: The expression of type ...
-1
votes
0answers
9 views

agents send message to another agent through portal

I am doing a project in uni and I am stacked. I am suppoed to build a middleware like Boris but simpler version. So at the moment I want to be able to send messages from one agent to another through ...
0
votes
0answers
12 views

Closing background JFrame after showConfirmDialog

I am trying to write a very simple Blackjack game. This is the class that is supposed to show the currently drawn card: public class ShowRandomCard throws IOException{ JFrame f = new JFrame(); ...
0
votes
1answer
8 views

Intellij Idea - Could not autowire. No beans of 'ApplicationRepository' type found. less… (Ctrl+F1) Checks autowiring problems in a bean class

I am Java newbie. I am making this tutorial (Spring MVC + Hibernate + Tomcat): http://confluence.jetbrains.com/display/IntelliJIDEA/Getting+Started+with+Spring+MVC%2C+Hibernate+and+JSON Everything ...
1
vote
0answers
4 views

How to send object by post in FunctionalTest with Play 1?

I want to know if there is some way to send by POST a complete object without having to send it attribute by attribute. Actually I am doing something like this but I think there might be an easier ...
1
vote
0answers
6 views

Resolving subdocument types with Spring Data and MongoDB

I'm encountering an error with a Spring Data repository as it attempts to resolve a property expression: public interface ContractRepository extends MongoRepository<Contract,String> { ...
4
votes
2answers
76 views

trouble with for loop in Java

As i really like Programming and i like to program in my free time so i was trying to create a code in which the output would look like an x. Something like this. x x x x x x x x x So ...

1 2 3 4 5 27219
15 30 50 per page