Tagged Questions
Java (not to be confused with JavaScript) 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 ...
0
votes
0answers
4 views
Occasional connection creation hang or EOFException from Java application to local MySQL server
I have been researching and debugging this issue for 2 weeks now. I have tried solutions from related posts here on SO and elsewhere.
Environment Details
I have a small Java 8 application that uses ...
0
votes
0answers
2 views
How to tune Java Spark MLlib RandomForestModel to make it optimal?
I am following code from github to create RandomForestMmodel and I could create it successfully RandomForestModel. What are the best optimal input to model I am using the following
//I have ...
0
votes
0answers
3 views
java jboss server error 500 project working on tomcat
I am having a problem with jboss server. My java project is working on tomcat apache server after deploying on jboss server it is not working, It thow a 500 server error. It is having clean url.
type ...
0
votes
0answers
3 views
Exception on Java.time Package
I'm using Hibernate 5.0.0CR1 for it's ability to use the JDK8 time package, but I'm getting an exception at this code when I try to persist an entity. Can someone tell me what is happening, and how to ...
0
votes
0answers
4 views
Java/Matlab Interface
How to create java objects in Matlab? I am working on a project where I did all the preprocessing of the data using Java programming language (Used Eclipse IDE as development environment). Now I ...
0
votes
0answers
3 views
Adding multiple markers and launching into new activity on click -GOOGLE MAPS-Android
How can I add multiple markers in my mapAcivity and launch into new acttivity by clicking on that marker. What I want to do is that when user searches for specific location in google map v2. He should ...
1
vote
0answers
6 views
Convert OffsetDateTime to UTC Timestamp
I have an java.time.OffsetDateTime which I would like to convert to a java.sql.Timestamp. Since Timestamp doesn't store any offset information, I am going to store all dates/times in the database as ...
0
votes
1answer
8 views
NoClassDefFoundError in JSP in spite of class placed in /lib
My JSP instantiates a MovieDetails class. I am currently working using scripting to ensure everything is working fine, before I move to tags.
Am using Tomcat 8.0. Directory structure for ...
0
votes
0answers
9 views
How do I Escape a Double Quote in Velocity 2.0?
I'm using Velocity 2.0. I've created a method in a custom tool that finds and returns a substring between two strings. This method takes three arguments: the initial string, a beginning subsequence, ...
0
votes
0answers
7 views
how to declare a Java 8 method reference in a Spring XML file?
I would like to declare a Java 8 method reference as a Spring bean. What is the easiest way of doing this in a Spring XML file?
For example, suppose I have:
class Foo {
...
0
votes
0answers
10 views
updation of Progressbar while a verifyfiles method is called [duplicate]
public void actionPerformed(ActionEvent e) {
int count;
File fp;
chooser = new JFileChooser();
chooser.setCurrentDirectory(new ...
0
votes
1answer
21 views
Java abstract confusion
I have two questions.
I have an Apple class that extends an abstract Fruit class see code below ↓
First question: Why do I have to use the import java.awt.Color; in my apple class, since it's ...
-5
votes
0answers
10 views
If I wanted to make something similar to facebook in lesser time, which technologies should I start to learn and go with? [on hold]
I want to make something similar to facebook, but I dont want to start in some random technology and realize at a later point that it was a big mistake. I will gladly learn something new.
0
votes
1answer
5 views
Convert java.time.LocalDate to java.util.Date
I have java.time.LocalDate Object in yyyy-MM-dd format.
I would like to know how to convert this to java.util.Date with MM-dd-yyyy format. getStartDate() method should be able to return Date type ...
0
votes
1answer
14 views
Cannot Resolve java.lang.RuntimeException: Unable to start activity ComponentInfo: java.lang.NullPointerException
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.project.bluez/com.example.project.bluez.BluetoothChat}: java.lang.NullPointerException
at ...
1
vote
0answers
7 views
Amazon S3 file availability after upload
I want to upload a file during a testcase and then immediately download it to verify the file has been uploaded. I use a key which is already uplopaded to S3.
When my upload is completed I do the ...
0
votes
0answers
8 views
Getting “The filename, directory name, or volume label syntax is incorrect” error while connecting to MySQL (wamp server) from JAVA (eclipse)
I have a basic JAVA-MySQL connection class. But, when I execute the code I get "The filename, directory name, or volume label syntax is incorrect" error.
I am using MySQL through wamp server. And, ...
0
votes
0answers
3 views
With Jersey, can I collect Param Conversion (data binding) and Validation errors into a single response?
Jersey seems to have 3 phases to process input from the request into method parameters for the methods handling the request, and errors can happen at all 3:
Unmarshalling - Going from a String into ...
4
votes
0answers
18 views
Why does HALF_UP sometimes round down with double?
The following code:
double doubleValue = 1713.6;
float floatValue = 1713.6f;
String fs = "%-9s : %-7s %-7s\n";
System.out.printf( fs, "", "double", "float" );
DecimalFormat format = new ...
-3
votes
4answers
44 views
Multiple parameters for a single method
I don't know how simple this would be or if it is possible but I can't seem to find any information on it. For a method is there a way to set multiple parameters.
For example in this public void it ...
-3
votes
2answers
36 views
Sort List Student by Grade
I have a exercise OOP.
Define abstract class Human with first name and last name. Define new class Student which is derived from Human and has new field – grade. Define class Worker derived from Human ...
0
votes
0answers
19 views
Code Check/Help for Back Propagation
I started writing my own code for Backpropagation. I was wondering if anyone could look over it and give feedback + point out the problems. I haven't 'tested' it because I know I was still having ...
1
vote
0answers
7 views
Can I have a Jersey ParamConverter for a List of PathSegments?
I have a data type that gets created from a PathSegment (I actually have a list of them), and I'd like to use something like a ParamConverter to do the binding, but it seems to only be able to convert ...
-3
votes
1answer
29 views
String with up to 2 decimal places Android
Currently in my strings.xml I have
`<string name="price_string">My string with price: %1$s</string>`
The problem with this is it outputs 5, instead of 5.5. How would I format it to ...
0
votes
0answers
12 views
Why doesn't my async post request fire?
I'm trying to make an async post request to a REST service. Here's my UserActivityDao class that makes the request:
private final JacksonFactory jacksonFactory = new JacksonFactory();
private final ...
-2
votes
0answers
41 views
difference between “” and string.length==0 [duplicate]
I have written some code code which has been tested in tomcat but in production its failed on web logic server.
Anyone please tell me what might be the reason for this:
Code Snippet:(Working using ...
0
votes
0answers
8 views
Cloud Connection with Java Window application
I am working on a Record Management System that runs on a cloud database using Java programming Language. Currently, I have the application running on MySQL database. I don't know if anyone can be of ...
0
votes
0answers
19 views
How to read a String from user in java (Socket Programming)
I am writing a Client/Server program. When I tried to read String from client using scanner.nextLine() it does not wait for to write the text on console and process the next statement. I am writing ...
0
votes
1answer
13 views
Javafx - How to Add Pie Chart to BorderPane from Different Class
I have two classes. A Main class and a Chart class. My Chart class extends PieChart and instantiates a Pie Chart in its constructor. My main class creates a BorderPane, I then instantiate an object of ...
0
votes
1answer
11 views
JavaFx: fxmlLoader.load returns Parent?
I have ScrollPane at root level in fxml file and I have the following code:
import javafx.scene.Parent;
...
parent = (Parent)fxmlLoader.load(getFxmlStream("my.fxml"));
if ...
0
votes
0answers
5 views
Extracting Word count / frequency count using Wordnet database
I am looking for word count/frequency extraction according to the word's usage in general English like http://www.wordcount.org/main.php. I am using using JWNL api for accessing Wordnet dictionary and ...
0
votes
0answers
6 views
Add a listener before submit using citytech plugin for AEM
Im trying to add a listener so i can validate some fields when im submitting a dialog box in AEM, i,ve tried to achieve this using the beforesubmit event but the js is not showing the alert.
This is ...
0
votes
0answers
8 views
Netbeans Platform's toolbars are black when launching from inside IntelliJ
I am currently trying to port one of my applications over to the Netbeans Platform. Since I am an IntelliJ user, I prefer to work with my favourite IDE - and luckily there are tutorials for that.
...
-1
votes
0answers
10 views
Incomplete mapping entities in jpa - is it possible?
I am new in java ee, so I need your help.
I need to validate some user data. For this I connect to db. I generated entities from tables. In the db I need only 2 tables for validation, only read ...
-3
votes
0answers
14 views
How to get started with Quickfixj 1.6.0 [on hold]
I need to learn to use the quickfixj 1.6.0 tool. I have learnt the basics of maven but still am unable to proceed. How can I proceed? How to use quickfixj examples?
0
votes
0answers
6 views
How to read HDR envi image in the Java (using GDAL or Opencv)?
I have a HDR envi image with 160 bands and this image has 4 GB as size. Each band for each pixel (row, column) has a double value associated (a reflectance value). In addition, each pixel has a ...
0
votes
2answers
30 views
Attempting to update ListView Items
I am working on a ListView that starts off containing 4 items: Event A, Event B, Event C, and Event D.
These four events are stored in an ArrayList<Event> called mEvents and on a button click ...
0
votes
1answer
9 views
Standard Deployment EJB app
Is there a standardized format to deploy ejb apps on Application Servers ?
I created a jar file with only the .class files of my app and a defaulf manifest and copied it to the deployments directory ...
-1
votes
1answer
26 views
Using old java EE in Eclipse
I have a project that utilizes many different APIs and frameworks and I am struggling to get it running. The basic idea is to access informations from a database and provide different options for ...
0
votes
0answers
6 views
Scheduling recursive handlers from an IntentService for retrying http calls
I am trying to implement exponential backoff for retrying failed http calls by scheduling a thread with handler.postDelayed(...) every time my request fail. The problem is that I am doing this from an ...
0
votes
0answers
6 views
Trying to create a custom rule for PMD on eclipse, getting strange errors when trying to extend abstractJavaRule
I'm trying to make a custom rule for eclipse-pmd that will check imports list and add violations if there is one that shouldn't be there. I looked at this tutorial (Scroll down to the part about ...
0
votes
0answers
4 views
Java SecurityManager - Tomcat - Use custom security policy
This link: http://www.jayway.com/2014/06/13/sandboxing-plugins-in-java/ provides a pretty informative example of how to:
Create a custom class loader.
Install a security manager & a security ...
3
votes
0answers
10 views
NDK application Signature Check
I have some security key in an application. I want to store it securly. I like to store it in a native shared library (maybe generated from some code). After that I want it to be returned by a method ...
0
votes
0answers
5 views
How to convert a HDR Envi image into PNG (or other RGB format)?
I would like to convert a HDR Envi image to a displayable format, which can be a PNG or JPEG or other RGB format.
I need it since my HDR images are 4 GB and I can't visualize them.
My application is ...
0
votes
0answers
27 views
Proxy and Concrete Class in Java
Consider this junit code
XXXimpl xxxImpl=(XXXImpl) new ClassPathXmlApplicationContext(context).getBean("xxxx");
It throws exception:
java.lang.ClassCastException: $Proxy42 incompatible with ...
0
votes
0answers
8 views
Hiibernate: @OrderColumn in @OneToMany causes an UPDATE after INSERT
I have the following POJOs for my db schema.
@Entity
@Table(name = "Quotes")
public class QuoteRequest
{
public QuoteRequest(){}
@Id
@Column(name = "quote_request_id")
...
0
votes
0answers
19 views
Java webapp can't write image to folder created by webapp
I have a web application, I have several actions. One of the actions writes some image to a folder out of context, lets say to:
/home/user/images/subfolder1/image.jpg
Now, another action copies that ...
0
votes
0answers
21 views
read binary file and display content in Jlist
How can I read binary file and display in JPanel.Up to now i have initialized a jframe,jpanel for jbutton when i run the code the button and the frame appears but when i click the show button what i ...
-2
votes
1answer
40 views
incontrovertible types error short to string in java [on hold]
1 public static void main(String [] args) {
2 System.out.println("Started BEServer");
3
4 for (int i=0; i<args.length;i+=2) {
5 if(args[i].equals("-host")) {
6 BSnode.pport = ...
0
votes
1answer
14 views
Run scheduled tasks chain
I need run scheduled tasks one by one with different delays after previous task being executed.
Example. There are a tasks list and delays list.
toRun = {task1, task2, ..., taskn}
delays = {100, 9, ...