Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x

Java

99K

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

I am getting a exception when trying to deploy it on 12.2.1,


<WebLogicServer> <BEA-000360> <The server started in RUNNING mode.>
     [java] WLST-WLS-1516225291084: <Jan 17, 2018, 3:41:43,107 PM CST> <Notice>  <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>
     [java] Server started successfully.
     [java] Connecting to t3://127.0.0.1:7001 with userid wlsboot ...
     [java] WLST-WLS-1516225291084: <Jan 17, 2018, 3:41:45,493 PM CST> <Warning> <JMX> <BEA-149535> <JMX Resiliency Activity Server=admin7001 : Initializing callbacks>
     [java] WLST-WLS-1516225291084: <Jan 17, 2018, 3:41:45,493 PM CST> <Warning> <JMX> <BEA-149535> <JMX Resiliency Activity Server=admin7001 : Added MBeanServerConnection in DomainRuntimeServiceMBean >
     [java] WLST-WLS-1516225291084: <Jan 17, 2018, 3:41:45,509 PM CST> <Warning> <JMX> <BEA-149535> <JMX Resiliency Activity Server=admin7001 : Callback is done>
     [java] WLST-WLS-1516225291084: <Jan 17, 2018, 3:41:45,509 PM CST> <Warning> <JMX> <BEA-149535> <JMX Resiliency Activity Server=admin7001 : Connection already exists for the server. Did not attempt to connect to the server>
     [java] Successfully connected to Admin Server "admin7001" that belongs to domain "erm7001".
     [java]
     [java] Warning: An insecure protocol was used to connect to the server.
     [java] To ensure on-the-wire security, the SSL port or Admin port should be used instead.
     [java]
     [java] Location changed to edit …
0
Concerto Cloud for Software Providers & ISVs
LVL 5
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

I am setting up an Equallogic PS6500, older firmware, version unsure right now. and when i browse to IP i get "Your browser does not seem to have Java support enabled, or it does not have a Java plug-in.

You can download the latest Java plug-in by clicking here."

I have newer firmware equallogics v9 and dont have this problem.  I am trying to hunt down how i can upgrade firmware over db9 or if this is an Java issue.

Help is appreciated.
0
String ( 2 loop based problem)

Given a string, look for a mirror image (backwards) string at both the beginning and end of the given string. In other words, zero or more characters at the very begining of the given string, and at the very end of the string in reverse order (possibly overlapping). For example, the string "abXYZba" has the mirror end "ab".

mirrorEnds("abXYZba") → "ab"
mirrorEnds("abca") → "a"
mirrorEnds("aba") → "aba"
0
Don’ts and Dos in Software Testing
Don’ts and Dos are two important end products of software testing basics and a tester needs to regard both. While the previous set the tone for advance, the last guarantees the software testing process remain streamline, immovable, and does not experience any bottleneck that may affect in general.
0
For example ,If the zip file[1234567890123_p01.zip] is greater than 1 GB, then the zip file needs to split  into multiple ZIP files. Each of these ZIP files would need to be under 1 GB, and would append an underscore and order digits to the end of the file name formula. For example, if the zip has 2.4 GB , their final output might look like this:

1234567890123_p01_01.zip (900 MB)
1234567890123_p01_02.zip (800 MB)
1234567890123_p01_03.zip (700 MB)
0
We are trying to run a .jar file from a network location and we keep getting the error "Error: Unable to access jarfile".  We have tried linux and window shares so it is not a rights issue. We can not copy it over to run it because all the files with it are huge. Here is the command we are trying. I understand that the .jar file is trying to run on the network drive is there a way around this? Thanks!

 java -Xmx768m -jar "\\fs1\groups\bios\program1.jar" -b \\192.168.15.20\Transfer\run.xml

Open in new window


-Windows Pro 10 x64
0
Hi

I have my pygame ready and I'm going to start being a coding-personal-trainer teacher for nearby kids.
No doubt, there are many books for me to gain wisdom on how to proceed? Or, is there a good web-site done?
I asked some previous questions in this sphere, but some additional references/syllabus would be useful.
Thanks
0
Hi All,

My requirement is as follows:

User uploads a file from a web application ( AngularJS )
System need to process the file asynchronously

Note : There could be hundreds of files getting uploaded.

Each files will be processed in different containers with same algorithm

1. Now Do I need a MQ here ?
2. If so Rabbit or Kafka or Tsung
3. Can anybody please help on the same ?

This application will have 1. File Processing 2. Billing 3. Analytic Data and Reports based on that

1. Which will be the right DB for the same ?

Regards
0
I want to  filter my datatable then select row, i do this but the select return null after filter ?!

my xhtml page:
<h:form>
      <p:dataTable id="dt" var="s" value="#{searchBean.tvList}" emptyMessage="No Object found with this id" rowKey="#{s.tag}" >
            <f:facet name="header">SELECT FROM DATABASE</f:facet>
            <p:column headerText="TAG" filterBy="#{s.tag}" filterMatchMode="contains" style="text-align: center">
                  <h:outputText value="#{s.tag}" />
            </p:column>
            <p:column headerText="TEXT" filterBy="#{s.text}" filterMatchMode="contains" style="text-align: center">
                  <h:outputText value="#{s.text}" />
            </p:column>
            <p:column style="text-align: center">
             <h:commandButton value="SELECT" action="#{searchBean.printResult()}">
                <f:setPropertyActionListener value="#{s}" target="#{searchBean.selectedTV}" />
            </h:commandButton>
            </p:column>
      </p:dataTable>
</h:form>

and my managebean:-

@ManagedBean
emphasized text@ViewScoped
public class SearchBean {
      private TV selectedTV;
      private List<TV> tvList;
      
      public TV getSelectedTV() {
            return selectedTV;
      }

      public void setSelectedTV(TV selectedTV) {
            this.selectedTV = selectedTV;
      }
      
      public List<TV> getTvList() {
            return tvList;
      }
      
      @PostConstruct
      public void loadData() {
            tvList = new ArrayList<TV>();
            Operations dao_pojo = new Operations();
            tvList = dao_pojo.get_all_data_TV();
            
      }

      public void printResult() {
            if(selectedTV == null) …
0
Hi,

I have a requirement to make a manual work to automation. Here is the complete details about the automation plan.

1. Need to prepare a Java script by combining the SQL db as back end. These JavaScript can be scheduled in a 15 minutes once.
Once this Job got scheduled, it will run the java script and get the details from the SQL database(Select script which is ready with me!)
2. My condition in the java code should if the customer Which we are passing having any values in that time frame, it should pick and prepare a spreadsheet if there is no transactions it can be ignored for that run.
3. Also another requirement is to pull the logs from the servers based on the customer ID passed in the code. If there is a way to do that. We can implement the same.

Please share your thoughts and suggestions if any.

Thanks
Venkatesh.
0
Technology Partners: We Want Your Opinion!
Technology Partners: 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!

I've been thinking to migrate my erp(java currently) from rdbms(firebird currently) to nosql (mongoDB likely) and i trying to antecipate some issues. I'm trying to make a "failproof" inventory control which never let a qty's item be smaller than 0. Offcourse i still get "ACID bias" which i need to left in order to complete this task. The goal is update inventory qty of all order's items when approve the order. For that, 2 problems can occur which currently are resolved with a trigger.

1.problem: order gets 2 items (ball = qty 2 and chair = qty 1) and there is no enough qty in inventory (ball = qty 1 and chair = qty 0) to complete the order. Once i trigger the command do complete the order, a loop is executed to decrease qty in inventory and fails on the second item cause there is no enough qty. Consequently rollback operation is trigged and everybody go home happy.

2.problem: in one word, concurrency. suppose there is no trigger controling this operation but only "selects and if". User 1 query inventory qtys, see enough qty (ball = 2, chair = 1) e system allow complete the order. While the transaction is running user 2 query same invetory qtys but because first transaction is not complete yet second query see "old" qty (ball = 2, chair = 1) e system also lets complete order. Consequently, 1 qty of chair is descreased twice, but shold be descreased only once and fail on the second. Result: i got negative qty.

I saw some workarrounds with inventory reservation but i …
0
Please see below some java code which I am trying to compile and run. I am fully aware that the code has an error. I also know how to fix it (as you can see from the comment I added just below: while (true){). What I don't however know is what this code is actually doing. Is it looping infinitely? Does it stop abruptly? What is the exact reason behind why I get a compile error (Unable to execute program; could not compile!)?

I am thinking, if the while condition is not met because it is false, should the code not ignore the while block and jump to the next line of code outside the while block - 'System.out.println("out of loop");' - and run it once and then stop?

import java.util.Random;

public class PartA {

        //loop until i is equal to j
		private static void loop6(){
			Random r = new Random();
			int i = 0;
			int j = 10;
			while (false){
          	        //while (true){
				i = r.nextInt(10);
				j = r.nextInt(1000);
				System.out.println("i = "+i+" and j = "+j);
				if (i==j)break;
			}
			System.out.println("out of loop");
		}

        private static void runLoops() {
		loop6();
		System.out.println();
	}


	public static void main(String[] args) {
		runLoops();
	}

}

Open in new window


thanks in advance
0
I have this java class:

import java.util.Random;
import java.util.Scanner;

public class CustomerVerifier {
    private static int[] pins = new int[]{1234, 1111, 4321, 5555, 7777, 1010, 9876};
    private static String[] customers = new String[]{"Bob", "Rob", "Tim", "Jim", "Sam", "Jon", "Tom"};
    private static String[] memorableWords= new String[]{"fishing", "Mittens", "Arsenal", "6packYeah", "Porsche911", "puppies", "CSI4Ever"};
    private static Scanner scanner = new Scanner(System.in);


    private static boolean askUserToContinue() {
        String input = getUserInput("Verify another customer? ");
        return input.trim().toLowerCase().startsWith("y"); //see the String API for documentation of the trim() method
    }

    private static String getCustomerFromUser() {
        return getUserInput("Enter customer name: ");
    }

    private static int getPinFromUser() {
        String input = getUserInput("Enter PIN: ");
        return Integer.parseInt(input);  //see the subject guide volume 1 section 9.6 for more on the parseInt(String) method
    }

    private static String getUserInput(String msg) {
        System.out.print(msg);
        return scanner.nextLine();
    }

    private static boolean isValidPin(String customer, int pin) {
        int customerIndex = -1;
        for (int i = 0; i < customers.length; i++) {
            if (customer.equals((customers[i]))) {  //see the String API for documentation of the equals(Object) method
               

Open in new window

0
I have this java class:

import java.util.Random;
import java.util.Scanner;

public class CustomerVerifier {
    private static int[] pins = new int[]{1234, 1111, 4321, 5555, 7777, 1010, 9876};
    private static String[] customers = new String[]{"Bob", "Rob", "Tim", "Jim", "Sam", "Jon", "Tom"};
    private static String[] memorableWords= new String[]{"fishing", "Mittens", "Arsenal", "6packYeah", "Porsche911", "puppies", "CSI4Ever"};
    private static Scanner scanner = new Scanner(System.in);


    private static boolean askUserToContinue() {
        String input = getUserInput("Verify another customer? ");
        return input.trim().toLowerCase().startsWith("y"); //see the String API for documentation of the trim() method
    }

    private static String getCustomerFromUser() {
        return getUserInput("Enter customer name: ");
    }

    private static int getPinFromUser() {
        String input = getUserInput("Enter PIN: ");
        return Integer.parseInt(input);  //see the subject guide volume 1 section 9.6 for more on the parseInt(String) method
    }

    private static String getUserInput(String msg) {
        System.out.print(msg);
        return scanner.nextLine();
    }

    private static boolean isValidPin(String customer, int pin) {
        int customerIndex = -1;
        for (int i = 0; i < customers.length; i++) {
            if (customer.equals((customers[i]))) {  //see the String API for documentation of the equals(Object) method
               

Open in new window

0
Hi, so I've got an Ionic 3 app which has a native camera plugin and onesignal plugin as well for notifications.

The native camera plugin works fine in Ionic View or DevApp, and onesignal works when build it to an APK and run it natively on my Android phone.

However, when I use an emulator to run it, even on IOS, it comes up with cordova_not_available. And even the cameras don't work. i run the command

ionic cordova run android or ionic cordova run ios

Emulator shows up but the issue is that cordova doesn't seem to be compiled in. Thus causing cordova plugins to fail.

What can possible be the issue? I've removed all the plugins and android/ios platform, re-installed an still the same.

It's kind of difficult to develop the OneSignal notification when I can't run it with the emulator.

Anyone who has come across this, please advice.
0
HSSFSheet sheet = wb.getSheetAt(0);
            HSSFRow row;
            for(int i=1; i<=sheet.getLastRowNum(); i++){
                row =  sheet.getRow(i);
                int id = (int) row.getCell(0).getNumericCellValue();
                String name = row.getCell(1).getStringCellValue();
                String address = row.getCell(2).getStringCellValue();
                String sql = "INSERT INTO test VALUES('"+id+"','"+name+"','"+address+"')";
                pstm = (PreparedStatement) con.prepareStatement(sql);
                pstm.execute();
                System.out.println("Import rows "+i);
            }
i got error in declarating id, name and address
0
Please see below some java code which I am trying to compile and run. I am fully aware that the code has an error. I also know how to fix it (as you can see from the comment just below). What I don't however know is what this code is actually doing.
Is it looping infinitely? Does it stop abruptly? What is the exact reason behind why I get a compile error (unreachable statement in line 13)?

import java.util.Random;

public class PartA {

	//loop 5 times
	private static void loop4() {
		int i = 5;
	        while(5 < 10) {
		//while(i < 10) {
	        	System.out.println("In loop i = "+i);
	            	i++;
	        }
	        System.out.println("Out of loop");
	}

        private static void runLoops() {
		loop4();
		System.out.println();
	}


	public static void main(String[] args) {
		runLoops();
	}

}

Open in new window


thanks in advance
0
Please see below some java code which I am trying to compile and run. I am fully aware that the code has an error. I also know how to fix it (as you can see from the comment just below). What I don't however know is what this code is actually doing.
Is it looping infinitely? Does it stop abruptly? What is the exact reason behind why I get a compile error (interrupted because taking more than 5 secs to run)?

import java.util.Random;

public class PartA {

	//loop 10 times
	private static void loop3() {
		int i = 0;
		do {
			System.out.println("In loop "+i);
              		//i++;
			} while(i < 10);
			System.out.println("Out of loop");
		}

        private static void runLoops() {
		loop3();
		System.out.println();
	}


	public static void main(String[] args) {
		runLoops();
	}

}

Open in new window


thanks in advance
0
Please see below some java code which I am trying to compile and run. I am fully aware that the code has an error. I also know how to fix it (as you can see from the comment just below). What I don't however know is what this code is actually doing.
Is it looping infinitely? Does it stop abruptly? What is the exact reason behind why I get a compile error?

import java.util.Random;

public class PartA {

    //loop 10 times
    private static void loop2() {
        for(;;) System.out.println("In loop");
        //for(int i = 0; i < 10; i++) System.out.println("In loop");
        System.out.println("Out of loop");
    }

        private static void runLoops() {
		loop2();
		System.out.println();
	}


	public static void main(String[] args) {
		runLoops();
	}

}

Open in new window


thanks in advance
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE
LVL 5
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.

I am using portecle to generate a java store cert for JIRA. I created the keystore, create the key pair, generated the CSR, processed the CSR using third party CA. I then imported the root cert into Portecle. When I import the CA response I get "could not establish trust for the CA reply. The import cannot proceed.
Why is this happening as everything appears correct.
0
I have an application which has a token set to officially expire after 30 minutes. If inactive at the 20- minute mark, it looks back 5 minutes for activity. If none exists, it kills the session. The majority of the users do work in the first 10 minutes and usually tend to other tasks. They are frustrated with our settings and are asking us to check back farther than 5 minutes and the 20-minute mark.

What makes sense to do here in accordance with best practice?
0
When I enter the name of the person..
it has to display the person's date of birth...

The program has to have search button and textfield to enter the person's name.
one search button.
and calendar.

when i enter the person's name ..
after i click the search button ..
the calender has to show the date of birth of that person

It has to be in j2me midlet program using eclipse IDE
0
Did you know that Android App developers have a high earning potential? Add this skill to your resume to increase your future earnings. Enroll in January’s Course of the Month today!
0
hi,

what is difference between control shift L and call hierarchy(control+alt+H)  in eclipse debugging the code.
what are best debugging techniques or tips

please advise
0
I seem to be having some brain cramps today. What I thought would be a very simple task is driving me crazy. I have a folder with about 30 text files and each file has anywhere from 100 to 2000 lines. Additionally, each file has an ending section with a variable number of lines. What I'm trying to do is copy each file back to its original name eliminating all of the lines of the ending section, of which the beginning can be determined by a key word. If, for (a simple) example, a file named TEST1.txt is in the folder and contained the following:
This is line1
This is line2

This is line3
This is the beginning of the end (contains the String "Auxilliary")
This is the first auxiliary line
This is the second auxiliary line
This is the last auxiliary line.

I want a new file named TEST1.txt that looks like this -
This is line1
This is line2

This is line3
- by not writing anything after finding the line containing the word "Auxilliary"

This would be repeated for each file in the folder.
As always, your help is greatly appreciated.
0

Java

99K

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.