Tagged Questions
Java is a general-purpose programming language designed to be used in conjunction with Java Virtual Machine (JVM). "Java platform" is the name for computing systems that have installed tools for developing and running Java programs. Use this tag for questions referring to Java programming language ...
0
votes
0answers
1 views
JavaFX enormous lag with larger Canvas dimensions
This is kind of a vague question, but I'm trying to create a code editor using JavaFX Canvas technologies and its being incredibly slow for what I'd like.
Take the following code for example
public ...
0
votes
0answers
2 views
Difference between org.eclipse.swt.cocoa.macosx.x.<version_no>.jar vs org.eclipse.swt.<version_no>.jar?
I have always been writing code using Eclipse IDE in windows OS. I just started using Eclipse in Mac. I found these two jars when I was trying to add swt in the build path for my program. What is the ...
0
votes
0answers
3 views
Daily job JEE Application
I want to create a daily and an hourly job that will run without a trigger as long as the server is running, this job is to fetch a number of RSS feed and collect some data and sort it from them and ...
0
votes
1answer
7 views
Compare two objects ASC and DESC by 2 fields using Comparable
I want to compare two objects of a class that implements Comparable, I need to compare the objects using two java.sql.Time Objects ASC and DESC, I sort them in mysql like this:
...order by startTime ...
0
votes
3answers
9 views
Running .jar File Java 8
I've run .jar files before, but I've encountered a "different" situation, and I'm not sure what to do. I'd appreciate if someone could help me out.
Previously, I programmed with Java 6 and Eclipse ...
0
votes
2answers
15 views
Process HashMap<Integer, HashMap<String, Integer>> to match the String of the HashMap<String, Integer>
I have a database table with a list of TV show genres and associated ARGB colour value used to highlight the TV shows in an Android ListView when displaying a TV Guide. The genre table looks like ...
0
votes
2answers
19 views
HashMap Inside Hashmap printing involving strings?
I need to be able to get a value from a HashMap that is inside another HashMap. I'm not really that familiar with HashMaps so I can't really figure this out myself.
Code:
import java.util.HashMap;
...
0
votes
0answers
2 views
Understanding @MapsId annotation in Hibernate
As per Hibernate documentation, there is some explanation for @MapsId annotation as :
In the embedded id object, the association is represented as the
identifier of the associated entity. But ...
0
votes
0answers
15 views
Method for executing a function every 1 second [duplicate]
I just discovered a limitation on javafx. I need a code for the same goal of this:
int delay = 1000; // delay de 5 seg.
int interval = 1000; // intervalo de 1 seg.
Timer timer = new ...
0
votes
0answers
14 views
Android; Made a Text in RelativeLayout and can't change text in activity?
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
...
-2
votes
0answers
18 views
How to check if a directory has a file that starts with a string in java
Title says all, i'm trying to check if a directory contains any file that begins with a certain string, does anyone know how to do this?
0
votes
1answer
19 views
How would I make a variable update from a row
I writing a program with a JTable
// I'm not going to write all the beginning stuff
DefaultTableModel model = new DefaultTableModel();
JTable t = new JTable(model);
Object[] 1 = {x, y, z};
...
0
votes
0answers
8 views
org.springframework.beans.InvalidPropertyException: Invalid property 'id' of bean class
I dont understand why I am getting this error on the save below. Any clue?
org.springframework.beans.InvalidPropertyException: Invalid property 'id' of bean class [com.test.DataException]: Getter ...
2
votes
2answers
21 views
Java 8. Casting Object[] to String[][]
I'm trying to load data from file into JTable. So, using Java 8 streams it is very easy to load file into array of strings:
BufferedReader br = new BufferedReader(new FileReader(f));
Object[] data = ...
0
votes
1answer
3 views
How do I pass a JSP (HTML) table's row to a servlet?
This is the code I have:
<table border="2">
<tr>
<th>CourseID</th>
<th>SectionNo</th>
<th>Add Info</th>
</tr>
<% while(rs.next()){ ...
0
votes
0answers
5 views
Trying to use “android-holo-colors.com” and “AppCompat”
I'm develiping an Android application in Eclipse, with minSdkVersion="8"
I want to use the theme generated by "android-holo-colors.com" but the file values/themes_apptheme.xml throws an error in this ...
-2
votes
0answers
17 views
File Reading If Statement Not Working [duplicate]
I just threw up a small little program where I wanted to see if I could detect what type of JLabel to display on a JFrame by reading a file and seeing what colour a user selected after passing a ...
-1
votes
0answers
7 views
windowbuilder jframe console eclipse
I'm am new to java, and I need help with creating a window that displays the console and also includes an input bar for typing txt into the console. see my last question to see code for what I'm using ...
0
votes
0answers
16 views
Why sum.misc.Unsafe called `Unsafe`?
There is a comment above
public native void unpark(Object thread);
Unblock the given thread blocked on park, or, if it is not blocked, cause the subsequent call to park not to block. Note: this ...
0
votes
0answers
4 views
Jackson 2.x serialize POJOs in specific manner?
I'm attempting to make Jackson 2.x serialize POJOs which contain relationships in a different format.
I need to implement a server compliant with the JSON API spec, here: http://jsonapi.org/format/
...
-2
votes
0answers
13 views
Regex: match any characters between two parts of the string [duplicate]
<a class="cit-dark-link" href="http://scholar.google.ca/scholar?oi=bibs&hl=en&cites=2893745789278946289">76</a>
This is an example string.
I'm trying to match the number ...
0
votes
1answer
18 views
Java automatically connect to server if it opened
I'm trying to create a program which will determine if the server is connected, down or disconnected.
I need to make the client automatically connect to the server when it's open.
Questions:
1. How ...
0
votes
0answers
9 views
Protobuf - Missing toByteArray()?
I probably just messed up something in my proto file but when I bring in the java file it has no toByteArray() function. I'm following a guide which uses it but it doesn't seem to exist in there.
...
0
votes
1answer
6 views
Issues uploading images
I have successfully been able to store user entered information into parse, but I have been having difficulty storing images into to parse, to be able to retrieve at a later date.
To clarify this, ...
-4
votes
0answers
26 views
great follow up for Absolute Java? [on hold]
I know a bit of java, took 3 classes on it in college which went through all of 'Absolute Java'. My school doesn't offer any more classes to advance any more in Java. All other classes introduce other ...
0
votes
0answers
5 views
How to make cascading proxy with java?
I'm trying to make an application to connect to various websites and would like to use a proxy connection but cascade. This means that before you connect to a website connection will jump between ...
-4
votes
0answers
19 views
How to use ScanfReader in Java?
I'm trying to use ScanfReader in Java but I don't understand how to implement in my code for data read rather than using the scanner...
-5
votes
1answer
23 views
What possibilities are there graphics wise for online Java games? [on hold]
Applets seem to be a complete no go. So what other possibilities are there for making online games that could integrate, preferably in a seamless fashion, with the likes of facebook ?
Edit: I'm ...
1
vote
3answers
13 views
Can I have a modifiable Java file outside in a .war file? (but still connected to the .war project)
Greetings stackoverflowers,
I have a Java project in Eclipse that contains, apart from RESTful WebServices to read inputs, some programming logic that uses the inputs given and data from a connection ...
1
vote
3answers
57 views
Which is a better practice for if-else condition?
Which one of these two options are better?
if(obj.getType!=null && obj.getData()!=null)
{
// Do something
}
elseif(obj.getData==null)
{
// Do other thing
}
*OR*
if(obj.getType!=null)
{ ...
0
votes
3answers
53 views
Arraylist<Object []> to Object[][]
I am trying to create an ArrayList of Object[] from an Object[][] perform some changes and then getting a new Object[][] with the changes made.
However I get this compile error:
error: ...
1
vote
1answer
22 views
Exiting out of nested switch statement to outer switch statement
I've created a menu in Java wherein each option has another menu. I want to know if I can exit from the inner menu back to the main menu.
Edit: Added Main Menu options
System.out.println("Main ...
0
votes
0answers
20 views
Call a method dynamically
I need to call this method dynamically:
public void monitorarSerial() throws PortInUseException, UnsupportedCommOperationException, TooManyListenersException, IOException, XBeeException {
if ...
0
votes
0answers
4 views
Android Studio ERROR: SWT folder '' does not exist
Trying to get Android Studio working properly. Whenever I click on SDK manager or the AVD manger I get this error
Cannot launch AVD manager.
Output:
Error: Unable to access jarfile ...
-1
votes
0answers
10 views
Tomcat auto undeploys app, shows blank page. SSH'ing into server redeploys app. [on hold]
Every couple of hours Tomcat stops working. It shows a white blank page. To fix the issue all I have to is SSH into server and wait a couple of seconds and my app starts working again. I DO NOT need ...
-5
votes
0answers
45 views
Pros and Cons of languages when making games [on hold]
So here is some information of myself I know Java very well and made several personal projects on it. I know C++ to an extend but have made nothing with it. And I want to learn C# in the future. So of ...
0
votes
0answers
7 views
dropwizard unit test throwing UniformInterfaceException
I know this question must have been asked a thousand times before, but none of the answers at Stackoverflow work for me. I am trying to create a unit test for a restful api which uses basic ...
0
votes
1answer
11 views
How can i deploy two separate projects (client and server side) to the same Google App Engine project?
I'm developing an enrollment application. The client side is an Android application enabling the client to enter their information which are stored using the data storage service of the Google cloud ...
0
votes
0answers
2 views
Wicket: Changes to HTML or Java Source is not loaded when browser is refreshed
I am following the Wicket user guide's "Hello World" project.
Wicket is in DEVELOPMENT mode.
When I change the HomePage.html and reload the browser, the change is not shown. If I restart the ...
-1
votes
0answers
4 views
how to link jboss deployed webapp to godaddy domain?
Good night to everyone:
I´m new configurating web applications to accesible over the web, so i need your help. First at all i create a virtualhost on my JBoss 7.1.1.final,i created a jboss-web.xml, ...
0
votes
0answers
6 views
Android: ParseQueryAdapter to query multiple classes
This is my first question asked and hopefully someone can help me. I have looked around and nothing on this subject has helped me in my situation yet which is why I resorted to posting a request for ...
0
votes
0answers
12 views
Android clazz.getConstructors() returning wrong number of constructors, only in live app
I have a class WifiScanning:
public class WifiScanning extends AbstractSetting {
/**
*
*/
private static final long serialVersionUID = 226897434530036069L;
public WifiScanning(Object ...
2
votes
1answer
47 views
Could this (unsafe) code crash the JVM?
Slightly modified from here:
import sun.misc.Unsafe;
import java.lang.reflect.*;
public class K {
private static Unsafe unsafe;
private static int fieldOffset;
private static K instance ...
0
votes
0answers
10 views
JEE - JSF -WebFlow - page shown as xml
I begin my adventure with JEE and I have a problem:
When I'm trying to display the page gets to the screen file xml, not page html: below source code page:
<?xml version="1.0" encoding="UTF-8" ...
0
votes
0answers
6 views
How and where to place uploaded images on glassfish 4
I'll try to be short with the description of my situation:
I'm making a restaurant recommendation web site. I want users to be able to add a new restaurant and upload 1 picture of the restaurant ...
-3
votes
1answer
28 views
How Would I create a point and click game for all sizes of computer! And buffer what now? [on hold]
Just before you start thinking im a bit of a noob at java. And Im still training the the arts. I know logic, graphics (awt), JFrame JPanel. And lots more. But I have been tring to make little tec ...
1
vote
5answers
40 views
Dissapearing Arraylist Values
I am writing a Java program that will take a sentence (or phrase) and translate it into a group of objects that the computer can easily read. I wanted to make a simple word separating program, and ...
-1
votes
2answers
33 views
Checking if extended class is instance of interface
I'm trying to check if class A that is extending class B is instance of certain interface.
Basically here is my setup:
public class House
{
(variables)
public House(variables) {...}
}
...
0
votes
0answers
10 views
Creating an Eraser for an Android Drawing App
I'm working on a drawing application and am pretty close to release but I'm having issues with the eraser part of the app. I have 2 main screens (fragments) one is just a blank white canvas that the ...
-3
votes
1answer
18 views
Android: Could not find a method in the activity class or onClick Hander on View class?
I am attempting to create an app that shows a linegraph when a button is clicked. I am using the AChartEngine API and have added its Jar file to my referenced libraries.
When I click on the button ...