Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

Java

98K

Solutions

32K

Contributors

Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.

Share tech news, updates, or what's on your mind.

Sign up to Post

Help needed - cannot access web tools on brocade fibre switches. Using firefox and Java V8 U121


Brocade.PNG
Found some posts on the Brocade forums which said to use this link to resolve it, but the error persists.

http://<SWITCH IP>/switchExplorer_installed.html

Any help is welcomed.

Thanks!
0
On Demand Webinar: Networking for the Cloud Era
LVL 10
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

I have a Canvas on a JFrame containing some graphics. After restoring from being minimized, the Canvas seems to be repainted and the graphics are lost. Does anyone know how to ensure the graphics are not erased ? Thanks.
0
In eclipse when i selected a method and do control+alt+H i get
An internal error occurred during: "Fetching children of orchestrate".
GC overhead limit exceeded

how to resolve this error. please advise
0
can anyone help me how to delete the spaces between two jlabels when one is disabled...i have two jlabels one after another vertically.when i disable the second jlabel,the spaces between the jlabel1 and jlabel2 must be deleted.can anyone help me how to do it?
thanks in advance!!
0
Hi,

I have a requirement in Java script to run the select statements every 3 hours and update those select count(*) counts in a spreadsheet. Kindly share the code snippet to accomplish this request.

Also we are running

1. 2 scripts 3 hours once in a day.
2. 1 Script once in a day.
3. 1 script on particular times like 10.45, 11.15....

please let me know if you need any more details.

Thanks
Venkatesh.
0
rest web services Standard vs business exception differences not clear. when to use which one and how. Both seems almost same to me in terms of error handling
 please advise​
0
Hi,
I am reading below link

https://docs.oracle.com/cd/E19798-01/821-1841/6nmq2cp1v/index.html

I was not very clear when we use content type application/xml  and when we use application/x-www-form-urlencoded and when we use json. what is importance of content type and practical uses of it. How media type is different from content type or mime type. what is the meaning of payload. please advise
0
The most common question we face in java interview.
0
Hi,
I have projhejct with name restweb which i imported as maven project

i hen imported another project with restweb with enhanced code in it by renaming at the named template section to xyz as attached.
when i try to start tomcat server within eclipse server wont start?
what is the work around so that i can start both projects at the same time even in future 10 more projects with same name with enhnaced code.
please advise
if not named template is there better approach to get these enhanced code projects and import to eclipse.
0
right click on that imported project and properties and target run times selected that fixed the issue
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
how

right clicking on the project --->and going to properties --->changing target run time--> to tomcat 8 etc different from



windows -->preferences--->server-->run time environment--->Add-->tomcat 8 etc here
0
Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Fix my code so that it outputs the names in alphabetical order based on the first Letter of each name.
Use Textpad or Eclipse

import java.util.Scanner;

public class Assignment3 {
    public static void main (String[] arg){
    Scanner scanner = new Scanner (System.in);
    int a=0; int b=0; int c=0; int small = 0; int middle = 0; int large = 0;
    boolean isValid=true;

    System.out.println("Input the first integer");
    if(scanner.hasNextInt() && isValid)
          a = scanner.nextInt();
    else
          isValid = false;

    System.out.println("Input the second integer");
    if(scanner.hasNextInt() && isValid)
          b = scanner.nextInt();
    else
          isValid = false;

    System.out.println("Input the third integer");
    if(scanner.hasNextInt() && isValid)
          c = scanner.nextInt();
    else
          isValid = false;

    if(isValid){
          if (b - a > 0) {
                  small = a;
                    large = b;
            }
            else{
                  small = b;
                  large = a;
            }
          if ( c - small < 0) {
                  middle = small;
                  small = c;
            }
          else if ( c - large > 0){
                  middle = large;
                  large = c;
            }
            else{
                  middle = c;
            }
          System.out.printf("The numbers are %d %d %d.\n", small, middle, large);
      }

    else
          System.out.println("The input was invalid");

    //a. For input (1,3,2) and (3,1,2), these values do not output in order from least to greatest because we are missing a statement on line 23, that will solve the issue.

    //b. The …
0
We are almost up to Java 9 and there still seems to be no way of copying streams in Java without putting all the boilerplate. So i still seem to need THIS
Please let me know if i'm wrong
0
 
LVL 28

Expert Comment

by:rrz
What about  the new method( transferTo ) in Java 9?  
http://download.java.net/java/jdk9/docs/api/java/io/InputStream.html#transferTo-java.io.OutputStream-   
I haven't tried it.
0
 
LVL 86

Author Comment

by:CEHJ
Nice one, thanks. Wonder why it took decades? ;)
0
hi,

I am loking for free open source tool for drawing  flow diagram, class diagram component diagram high level design digram low level design diagram sequence diagram etc.

any good eclipse plugin which is free available to this. Any online tools for this. please advise
0
Hello all,

Where can I download java 7u151-64.exe.
I tried every where and could not find this version.

Thanks
0
I want to add php plugin in netbeans 8.2 on my computer.

The problem is there is no internet connectivity on that computer so i cannot install plugin through netbeans itself using following method

Tools-> plugin -> available plugins.

so, how  would i able to make php application on my computer.
  is there anyway to download plugin from another computer having internet connectivity and then make it installed on my computer.
0
Hi,

I have a need to extract the text from a pdf to validate some content and count the number of images in the pdf document using java. I can get the text content no problems using the getText function below but can't find a way to get a count on just the image objects. I have been able to get a count of all objects using the code below but can't find any doco on how to only count the images. Any ideas would be very appreciated. Thanks

static String getText(File pdfFile) throws IOException {
        PDDocument doc = PDDocument.load(pdfFile);
        return new PDFTextStripper().getText(doc);
    }

    static void countImages(File pdfFile) throws IOException{

       PDDocument doc = PDDocument.load(pdfFile);
       List myObjects = doc.getDocument().getObjects();
       System.out.println("Count: " + myObjects.size());
       doc.close();

    }

Open in new window

0
I want to find an object by multiple properties in  JPA CrudRepository ?

There is no method like  findByMultipleProperty(String property1 , String property2 , String property3)

What is the correct signature of the method for this purpose ?
0
I'm looking for a freeware and simpler alternative to JMeter. It is a very complete yet complex tool and all I need is to simulate a number of simultaneous calls to a site, grab stats about performance (time to the response) and see how many concurrent calls it can endure without breaking. Some chart thrown in would be useful.

Thank you
0
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE
LVL 4
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Write a program to draw a line using the Basic line drawing algorithm in java without using any draw functions(Pixel by Pixel).
0
Hello,

I am trying to parse JSON file through JAVA program that has nested objects and arrays.

I am attaching the sample JSON file and the expected results.

I am also attaching the JAVA class program that I am currently using but it only prints the first object and the values related to it. I want the JAVA code to loop through each object and find the nested objects within it and print it as well.

import java.io.FileReader;
import java.util.Iterator;
import java.util.Set;

import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
 
/**
 * @author Crunchify.com
 */
 
public class CrunchifyJSONReadFromFile {
 
    @SuppressWarnings({ "rawtypes" })
    public static void main(String[] args) {
        JSONParser parser = new JSONParser();
 
        try {
 
            Object obj = parser.parse(new FileReader(
                    "/Users/username/Documents/Work_Items.json"));
            
        
            JSONObject jsonObject = (JSONObject) obj;
 
            Set keys = jsonObject.keySet();
            Iterator a = keys.iterator();
            while(a.hasNext()) {
            	String key = (String)a.next();
                // loop to get the dynamic key
                String value = (String)jsonObject.get(key).toString();
                System.out.println("key : "+key);
                System.out.println(" value :"+value);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Open in new window

Can someone please assist?

Thank you
sample.txt
Book2.xlsx
0
Hello,
I would like to buy some books in different categories, I need your answers to be based on your own experience by what you had read to learn the following:

PHP - Beginners level and Advanced level.
Java - Beginners level and Advanced level.
MVC frameworks or MVC model on how to create an app based on mvc architecture .

Thank you
1
Java Heap Space error being caused by a couple of different report queries in Cold Fusion using SQL script. I'm looking into issues that are causing this. This is early stage research as I'm not familiar w/ Java or this error. Any help is appreciated. From what I've seen its saying the code needs to be written in a more precise manner vs. merely increasing the memory allotment. A sample of the Cold Fusion/SQL query is below. Any suggestions as to where to start? There a total of 6 separate queries w/in the one file. The one provided is the first and "longest".

Thanks in advance.

<CFQUERY name="FPDWins" datasource="#dsn#">
select DocumentID,
    DocumentNum,
    RHRecordID,
	0 WorkitemInstanceID,
    LUFSBatchNum,
    ImageType,
    TransCode,
    LFPSStatus,
    to_char(DateToWINS,'MM/DD/YYYY') DateToWINS,
    to_char(WINSBatchID) winsbatchid,
    WINSRetrievalDate,
    WINSStatus,
    WINSContractNumber,
	to_number(p1.property_value) MarkviewDocID
  from qbd_lufs_wins_documents_v l,
       sf_workitem_property_values_v p1, 
       sf_workitem_property_values_v p2
 WHERE p1.property_name = 'MarkViewDocumentID'
   AND p1.workitem_instance_id = p2.workitem_instance_id
   AND p2.property_name = 'RHRecordID'
   AND p2.property_value = to_char(l.rhrecordid)
   and DocumentType = substr(upper('#DocID#'),1,2)
   and DocumentFiscalYear = substr(upper('#DocID#'),3,2)
   and DocumentNum = substr(upper('#DocID#'),5)
UNION
select cond.dafis_document_id DocumentID,
    

Open in new window

0
Hi,

We are getting this error when using IE. I uninstalled java and reinstalled it. The same error. Any idea?  thanks
Capture.JPG
0
Hi,
I normally work on web applications mainly java side and some js. I was wondering what could i do to rise on career ladder. Some time it seems that the office work itself doesnt offer much to do something important.
Please suggest what course should one take and on what areas should one work upon to rise in software career ?

Several times i hear from manager that one should make oneself more visible. But how ? normally one is occupied with the work that manager has given. what could one do both technically and other stuffs probably help organizations to grow....

Generally there is a requirement for a web application and i finish it and thats it. Nothing more than what they have proposed nothing less.
Please suggest some book or articles etc... to get some new ideas in general and especially on web applications.

Thanks
0

Java

98K

Solutions

32K

Contributors

Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.