Tagged Questions
Java is a general-purpose programming language designed to be used in conjunction with the Java Virtual Machine (JVM). "Java platform" is the name for a computing system that has installed tools for developing and running Java programs. Use this tag for questions referring to Java programming ...
0
votes
0answers
3 views
How to get the top 10 greatest numbers from a file
I want to get the top 10 ints from a file with over 100 ints in it.
0
votes
0answers
7 views
how to read a particular rows in the PDF document and the data corresponding to that row in JAVA
I have a requirement for reading a PDF document i.e. I’m able to read the complete text using IText API ,but I need to read the particular rows in the PDF document and the data corresponding to that ...
0
votes
0answers
8 views
Can we obfuscate annotations in java using dex2jar tool or any other way?
I am building a project with the help of AspectJ to intercept the method in Android.
When I build the jar file of code i created it creates compiled syntax of each pointcut i applied on the methods as ...
0
votes
0answers
5 views
How does a Shiro enabled web application handle CacheExceptions
I have a question about handling org.apache.shiro.cache.CacheException.
What is shiro's responsibility when a cache exception occurs? This RTE ripples through the whole stack, but I'm unclear where ...
0
votes
0answers
6 views
How to rename the project build folder after GWT compile
I have a Maven GWT project names itWebClient when i do right click in the eclipse => google => GWT compile after few secondes i have this message :
Compile of permutations succeeded Linking into
...
0
votes
0answers
10 views
As soon as the form is loaded the values in combo box is fetched. When I change value in combo box1 it doesn’t reflects to next combo box2
void stasign(int staff_id)
{
try
{ //Database connection code
Toolkit kit= Toolkit.getDefaultToolkit();
Dimension size=kit.getScreenSize();
int height = ...
0
votes
0answers
3 views
What to use to replay messages in ActiveMQ and Why?
My use case needs me to replay messages sent on one destination to another (one or more).
There can be four possible combinations :
Topic -> Topic (CompositeTopic)
Topic -> Queue ...
0
votes
0answers
10 views
How to write a non-blocking asynchronus action in playframework with Java?
I want to show a loading page meanwhile the application is doing some time-consuming computations and database operations and then replace the loading page with the result. How can I do this with the ...
0
votes
0answers
8 views
How to fill a report using Hibernate connection?
I am using Hibernate and using tool Ireport. In Ireport I have design report and its working fine. now I have call report from my Hibernate integrated servlet. For that I did like this.
protected ...
0
votes
0answers
9 views
Unable to get values on another intent using simpleadapter
Hey guys i am using a custom list adapter class that extends to simpleadapter for populating a multicolumn listview. I set onclick listener event on each of the textview in a column but I am unable to ...
0
votes
0answers
7 views
Codenameone library for testing not recognised
I am writing a library that extedns the AbstractTest class to add suport for JUnit like methods ( fail, assertEqual...). It builds well and i get a jar in the dist folder which i copy in my codename ...
0
votes
0answers
5 views
Play framework testing issue
i want to use junit to make test for my controllers. however i can not extend functionalTest class because play.test package is not resolved.
any idea how to fix that??
1
vote
0answers
9 views
How to refresh Child fragment in nested Fragment inside of view pager?
How to refresh Child fragment in nested Fragment inside of view pager ?
Hi,
i want to refresh my current fragment, i have folow this concept and logic in my project structure, ...
0
votes
0answers
4 views
Application using vaadin4spring not starting due to not having a registered “ui” scope
I'm trying to integrate the vaadin4spring library into an application (0.0.3-SNAPSHOT) and following the instructions on the readme.md file of the project I end up with an exception that states:
...
0
votes
2answers
31 views
NoClassDefFoundError when running exported JAR from Eclipse
I've looked up how to export .jars in eclipse online for hours. I've tried all the tutorials and have not been able to open my game. I've used the command prompt with
java -jar <name>
and ...
0
votes
0answers
17 views
Hibernate filter with if condition
@Entity
@Table(name = "person")
public class Person {
private Long id;
@OneToMany(mappedBy = "person")
@Filter(name = "localeFilter", condition = "locale= :localeFilterParam")
...
0
votes
0answers
9 views
jni native method problems
hi everyone I'm working on some java code which call functions from a c++ dll. But some functions from the dll can be called correctly, while others can not.
I first write a java class wrap all the ...
0
votes
1answer
13 views
No class def found ProxyBypassListSelector
I have this error:
java.lang.NoClassDefFoundError:
com/btr/proxy/selector/whitelist/ProxyBypassListSelector
I tried to find the jar, which suppose to have this class, but no luck. May be ...
0
votes
0answers
6 views
JTable select multiple non-contiguous cells with ctrl+click combination
I want to create a JTable that I'll be able to select multiple, non-contiguous cells with ctrl+click combination. So far, when I select not contiguous cells from the same row it works fine.
But ...
0
votes
0answers
20 views
How to display a default image when image source is a servlet?
In my JSP/ Servlet setup, for displaying user profile images I am directing the img tag to get the image from servlet by specifying servlet URL in src tag and then returning image in response from ...
0
votes
0answers
5 views
PDE Build Missing Class Files
I recently was tasked to switch one of our applications from SWT 3.7 to 4.4 (and we know it's a really stupid idea, we just wanted to see how stupid). Now whenever I run the PDE build from a prodcut, ...
0
votes
0answers
20 views
how to send email in oracle 11g by using java
I have a requirement to send mail using java in oracle 11g on my window7 .I tried to import two jar files named
activation.jar and
javamail.jar.But it gives an error like class not found exception ...
2
votes
1answer
28 views
Issue with conversion of Map inside a Map into JSON in Java
I have a treemap in Java which has structure like this below:
public static Map<String, Map<String, Integer>> testMap = new TreeMap<String, Map<String, Integer>>();
public ...
0
votes
0answers
6 views
MatLab error in connecting java sockets to external device?
I'm trying to make MatLab to read live signals from Muse headband.
I'm facing an issue that is:
If I run this code for the first time, then it gets executed properly, but when I run this code for the ...
2
votes
0answers
10 views
@ReplaceWithMockwith @Qualifier
I am using springockito-annotations 1.0.9 for integration testing.
I have the following controller:
@Autowired
public Controller(
@Qualifier("passwordService ") PasswordService ...
0
votes
0answers
43 views
Java Split string into array, by size and only split after delimiters
I have a many string wich are really randomly sized like : 5 chars to 12000 randomly.
Eg:
String 1 : A,b,C,d
String 2 :23,343,342,4535,4535,453,234,
String 3 : ...
-4
votes
0answers
24 views
Java application to use Android camera
How to create java program to use android phone camera connected to PC by usb cable as a web cam or simple camera ??
1
vote
4answers
47 views
How to create/copy an Object in Java faster? [duplicate]
I want to copy an object in java without copying reference.
Object o1 = new Object();
Object o2 = o1;
But o2 should not copy reference of o1. So any changes done in o2 must not affect o1.
How do ...
0
votes
4answers
66 views
java how to get out of a while loop
The input file that I am trying to read contains the amount of lines for a block of entries on the first line, and records on the subsequent lines. The file may contains many blocks like this. For ...
0
votes
0answers
8 views
ORMLite Android and ForeignCollection the bind value at index 1 is null
I have a problems with organizing many-to-many relations with ORMLite, which I cannot overcome. I have a users and want to establish friendship relations between them, so I user the following code:
I ...
3
votes
0answers
11 views
Import eclipse project using bat command [duplicate]
I am working on bat file. I want to import my exising java project in eclipse using bat command.
I write following command to open eclipse with specified workspace.
call %eclipseDirDest%\eclipse.exe ...
0
votes
2answers
20 views
Ouput value from sentinel loop is wrong
I have written an tax program, where I input certain values in and it prints the output at the very end of the program with all values I entered. The problem I am having is in my cutsomerID it is ...
0
votes
1answer
17 views
Does the JVM cache assembly code? [duplicate]
Assuming that a system is running the standard JVM (HotSpot) with JIT enabled, is jitted assembly code in any way cached between runs of the same program? I can find no information demonstrating this ...
0
votes
1answer
34 views
Send notification to all the devices connected to a Wi-Fi network
Is there any way to send a notification to the devices which are connected to a particular Wi-Fi network?
Say, I have a Wi-Fi network named "My Wi-Fi", which is not secured, that is any one can ...
0
votes
0answers
9 views
Closing unknown threads in tomcat server when application undeployed in tomcat 7
I am using tomcat 7 and Jasper reports 5.6.0 library in my application to generate charts. But jasper reports library leaving behind to many threads which causing crashing server on several ...
0
votes
0answers
11 views
SocketException with Too many open files
I am executing one of my service URL using RestTemplate and below is the exception I am getting while I am executing it.
String response = restTemplate.getForObject(url, String.class);
Exception is ...
0
votes
0answers
5 views
How to initialize easyRTC on client side?
I am working on an Application to communicate two applications for sharing a video chat using easyRTC. I searched on Google a lot for "How to initiate easyRTC from client side ?", I didn't find much ...
0
votes
3answers
22 views
Cant find text file created by servlet in Eclipse
This may be a stupid question, but I have to ask because I couldn't find any proper solution.
I am new to Eclipse. I created a Dynamic Web project in Eclipse, In this, I write a simple code to create ...
0
votes
0answers
7 views
Stopped DefaultMessageListenerContainer after its initialization
I want the Spring's DefaultMessageListenerContainer to be stopped after its initialization. Is there any way to configure this point?
-2
votes
2answers
28 views
My code takes up 2000MB+ to run, no idea why
Yea so for some reason when I run my code it requires a bit over 2GB to run. It probably has something to due with a picture being drawn a lot of times or something, but I'm not sure.
If someone could ...
0
votes
0answers
4 views
How to retrieve COM4J Requirement Coverage list
I am trying to get QC Requirement coverage by using COM4J. I am able to get list of test cases which ever covered the requirement but I don't know how to get the Test case id and name etc,
...
1
vote
1answer
12 views
How to make POST request using retrofit to server in android
I am making a POST request using retrofit in android to a server which i have created in Node.js. I have already worked on GET request and it is working fine but when i am making a post request i am ...
0
votes
0answers
6 views
Save data by kendo ui and java servlet
Can anybody tell me how to save data by kendo ui and java servlet. That means i have design html fields like Student ID, Student name and want to save it using kendo ui framework and java servlet and ...
2
votes
0answers
14 views
Consuming WCF restful webservice with java client?
I am trying to write a java client for Restful web service implemented using WCF & NTLM Authentication.
I am able to use Apache HTTPClient library to connect and retrieve the data.
The ...
-1
votes
1answer
21 views
Selenium TestNG - java.lang.NullPointerException
I am trying to test the login function to Gmail. But it displays an exception error "java.lang.NullPointerException" . Code as follows:
package gmail;
import java.util.concurrent.TimeUnit;
...
0
votes
0answers
5 views
PWM on IOIO works when tied to a button, fails always when independent of button
I started an IOIO app from the HelloIOIO sample, and converted the "turn the light on or off" button to a "send a PWM signal" button so it could drive a servomotor.
With minimal changes, the code ...
-4
votes
1answer
50 views
Multiples of 20 in java [on hold]
I done a coding to get the output 20,40,60,80 and 100.
Multiple.java:
public class Multiple {
static int n=20;
static int m;
public static void main(String[] args) {
for(int ...
0
votes
3answers
21 views
regex Pattern Matcher, how to store the rest of the string
String : USA (45)
using pattern matching getting only numeric value 45
Java code
ArrayList<String> portfolioCount = new ArrayList<String>();
String mainText = USA (45)
final Pattern p = ...
0
votes
0answers
11 views
Session null in injected HttpServletRequest in RestEasy
In service class, I inject request.
@Path("/someService")
public class SomeService {
@Context
private HttpServletRequest request;
@GET
public SomeBean someMethod() {
...
...
0
votes
0answers
20 views
upload file is not store
The file which i am trying to store in the back end is not a valid directory.. I think the code has a Unix directory config which i need to change to make this work in your windows.
how i can ...