• Is it possible to execute commands remotely (ssh), through a Java program 2018-03-18

    I am looking to ssh into an Ubuntu Server via some (java) API. Is that even possible? Here is what I am looking for exactly: I have setup OpenStack on an ubuntu machine. Launched an instance with ubuntu server. Installed android SDK on this Virtual M

    Tags: java, ssh, android, ubuntu server
  • Display tree map in gui java 2018-03-18

    Firstly I am completely new to Java so please can you explain things as simple as possible! So I have a treemap, the keys are dates which point to strings. I want to display this on screen but am not sure how to do so. I did come across JTable. After

    Tags: java, swing, jtable, treemap
  • Performance difference between arrays, stacks and queues 2018-03-17

    What is the search performance of arrays, stacks and queues? I think that arrays are the quickest and most straightforward, because I can access any element immediately by calling it using its index. Is this correct? What about the performance of sta

    Tags: java, arrays, stack, queue
  • How to work with canvas and text in javafx

    How to work with canvas and text in javafx 2018-03-17

    I am new to JavaFX and I am trying to display a rational number. For example for the number 5/7 I want the program to show the following: Here is the code I've tried to use in order to get the result (but it shows nothing but a blank white pane): imp

    Tags: user interface, java, javafx, javafx 2, javafx 8
  • Bookmarks in a pdf not going to the correct pages nor any page for that matter. Why is this happening? 2018-03-16

    I'm using Netbeans and the iText pdf api. So I have the following method that creates a hashtable that can be inserted into a pdf. In this case they are image files that are to be placed in the pdf at the end of the document. private HashMap<String,

    Tags: image, java, pdf, itextpdf
  • More lines for customer pole display 2018-03-15

    I am looking for pointers on where I can change the number of lines on a PoS display in unicenta opos. I managed to figure out how to stop it from sending ESC data so I can show it on a 20x4 LCD hooked up to an arduino but can't figure out how to get

    Tags: java
  • Create a .zip file in Java with images 2018-03-14

    I'm creating a Java program which gets images from a JFileChooser and create a .zip file containing the selected images. I get the files with this code: final JFileChooser fc = new JFileChooser(); fc.setMultiSelectionEnabled(true); fc.setFileFilter(n

    Tags: java, jfilechooser
  • Maven/junit project organization 2018-03-13

    I have three packages: Foo provides a certain API FooMySQL (depends on Foo) implements the Foo API using MySQL FooPostgreSQL (depends on Foo) implements the Foo API using PostgreSQL I have a bunch of junit tests, which should be run twice: once again

    Tags: java, junit, maven
  • Java threads calling parent functions 2018-03-13

    Im making some software written in java, it involves a single 'Parent' class that invokes dozens of classes(nodes) that run in their own thread (extends Thread). The classes store the parent class as a variable. If the node class invokes a method fro

    Tags: java
  • Does `javax.imageio.ImageIO` require file locking? 2018-03-12

    My app is saving images into a folder. Simultaneously another piece of software watches over this folder and prints pasted images. Problem I've encountered is that printing app can send on printer half rendered image or doesn't react to saved images

    Tags: image, java, locking, file locking
  • Searching a MySQL database for values within radius (lat/long) 2018-03-12

    This question already has an answer here: MySQL Great Circle Distance (Haversine formula) 9 answers I don't have all that much SQL experience and honestly don't have a clue where to go from here, most people that ask a question like this are using MS

    Tags: php, mysql, java
  • Java The method is undefined for this type 2018-03-11

    I am having a problem with calling a method that is in a different class. This main method is in a class on its own called lab14, and the heapSort() method is in a different class called HeapSort. Both of these classes are in the default package. I a

    Tags: java, class, heapsort
  • Displaying Heap sort as a tree

    Displaying Heap sort as a tree 2018-03-10

    Good evening all. I am currently working on a heap sort and I have the sort itself completed but I don't know how to display the sort as tree once it is outputted. I've searched everywhere online but it doesn't seem like no one else has ever had to d

    Tags: java, treeview, heapsort
  • Spring boot whitelabel 404 2018-03-09

    Hello guys I keep getting this error even though I have followed spring tutorial from their website. I have been trying to figure it out why I'm getting this error. I am able to connect to facebook but when trying to retrieve the feeds like the tutor

    Tags: html, java, gradle, spring social facebook, spring boot
  • Unable to set json string to TextView in onPostExecute in asyncTask 2018-03-07

    The problem that I'm facing right now is I simply want to set the string data from a json array in onPostExecute(). I skeemed through many tutorials on it, however, I am unable to set the Text that resides in the MainActivity. I've added the sample c

    Tags: java, json, android asynctask
  • Finding the mean from two hash keys 2018-03-06

    import*; import java.util.HashMap; import java.util.Scanner; public class orde { public static void main(String args[]) throws IOException { Scanner c1=new Scanner(new FileReader(new File("students.txt"))); Scanner c2=new Scanner(new Fi

    Tags: java, hash, average, mean
  • Compare operators custom object java 2018-03-05

    Is there a plug in that supports compare operations on a custom object? I would like to use this: class MyTemperatureObject implements Comparable<MyTemperatureObject> { ... @Override public int compareTo(MyTemperatureObject object) { return getValue

    Tags: java, compare, operators
  • null value is getting while calling a parent class method 2018-03-05

    I have following classes. public class TestController { protected ElementManager mElementManager; public ElementManager getElementManager() { return this.mElementManager; } } public class ElementManager { public final void clearTextField(String descr

    Tags: java
  • Image Uploading using multipart entity Error 2018-03-01

    im using multipart entity to upload to my image to server.this is my code private void uploadFile() { try { HttpClient httpclient = new DefaultHttpClient(); httpclient.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1

    Tags: java, post, android, multipart
  • Working of append function in appender in log4j? 2018-02-28

    I am designing a custom Appender(How to create a own Appender in log4j?) in Log4j to meet my requirement. The log files on which I have to do some operation is of the form {JSONObject} {JSONObject} ........... ........... {JSONObject} Each JSON Objec

    Tags: java, json, log4j

Copyright (C), All Rights Reserved.

processed in 0.262 (s). 7 q(s)