We help IT Professionals succeed at work.

Java

99K

Solutions

33K

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.

hi table not showing in h2 database
tabletable32
0
Hi Experts,

On our IBMi (aka as/400) I try to run a Qshell command:
/QIBM/ProdData/OS/WebServices/bin/installWebService.sh .....etc

As return I get a message :
001-0014 Command /QOpenSys/QIBM/ProdData/JavaVM/jdk70/32bit/bin/java not found.

which is odd, because I run Java version "1.8.0_171"
So I expect that I should use jdk80.?

Where can ik configure this?

Thanks,
0
With the attached code, I get a new frame with the canvas in the background and with the rgb color as specified. However the graphics from drawoval and filloval commands on lines 24, 25 are not showing in the frame. Can someone see the cause?DrawNotWorking.PNG
0
Hi
in the chessboard Javascript available at https://chessboardjs.com

They use a 'FEN' string to keep track of the board state / piece locations, which looks like this: lower case is black, integers are blank square counts, upper case is white.

'r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R'


For my game, I need to store additional data about each piece in its lifespan.
The String board state would not hold extra info for each piece effectively.

Each piece needs at least a color, type character and an x and y location, and maybe a moveCount, history ..

something like:

struct piece {
 char pieceType;
char color;
int x;
int y;
int moveCount;
Move[] moves;
piece[] capturedPieces;
}

How should I approach this in Javascript for an entire board state? append 32 pieces to a {} structure?
What should this board / piece constructing best look like?

Thanks
0
What is the error in this scenario in Eclipse and how do I resolve it? HelloWorld1.PNG
0
What is mean by Nucleus of the web application?
0
hi,

you all know latest java need to pay but for free version, it seems we can only see java JDK instead of java run time, why is it ?

so for later release of java how can we use it if we only have JDK?

some application on my Windows 10 PC run the JRE instead of JDK.
0
Hi Expoerts,
I know, this may not be an easy one to help. But I would request your help in anyway to debug or enable debugging to identify this issue or closer to the issue please.

curl -X POST --cert ${pemFile} --key ${pemKey} -vvv ${URL}

* About to connect() to target-server.example.com port 443 (#0)
*   Trying 10.157.59.221...
* Connected to target-server.example.com (10.157.59.221) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* NSS: client certificate from file
* 	subject: E=LIFERAY.Support@example.com,CN=target-server.client.np,OU=LIFERAY,O=Example Limited,xxxxxxxxx
* 	start date: Feb 04 04:36:01 2020 GMT
* 	expire date: Feb 03 04:36:01 2022 GMT
* 	common name: target-server.client.np
* 	issuer: CN=Internal Issuing AD CA - KNOX P01,DC=aur,DC=xxxxxxx
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
* 	subject: E=LIFERAY.Support@example.com,CN=target-server.dev.example.com,OU=LIFERAY,O=Example Limited,xxxxxxxxx
* 	start date: Feb 07 06:42:32 2020 GMT
* 	expire date: Feb 06 06:42:32 2022 GMT
* 	common name: target-server.dev.example.com
* 	issuer: CN=Internal Issuing AD CA - KNOX P01,DC=aur,DC=xxxxxxx
> POST /v1.0/docmgmt/documents/generate HTTP/1.1
> User-Agent: curl/7.29.0
> Host: target-server.example.com
> Accept: */*
>
< HTTP/1.1 403
< Server: nginx/1.17.4
< Date: Sat, 14 Mar 2020 07:22:13 GMT
< Content-Type: 

Open in new window

0
hi am geting observalble error
observalble
0
Hello,
I have a class car and an inner class engine. The inner class shouldn't be visible outside of the class car.
Is there still a way to give a Car an Engine as parameter?
Error: Car.Engine has private access in Car
Here is my code:

public class Main {
    public static void main(String[] args) {
        Car car = new Car("VW", "Red", new Car.Engine("Diesel"));
    }
}

Open in new window


public class Car {
    private String brand;
    private String color;
    private Engine engine;


    public Car(String brand, String color, Engine engine){
        this.brand=brand;
        this.color=color;
        this.engine=engine;
    }

    public Engine getEngineType(){
        return new Engine(engine.getType());
    }


    public void setEngine(Engine engine){
        this.engine=engine;
    }

    private class Engine{
        private String type;

        public Engine(String type){
            this.type=type;
        }

        public String getType() {
            return type;
        }
    }
}

Open in new window

0
Hello,
The program is about playing the next or previous song, replay or remove a song.
If I want to delete a song immediately after starting the program (case 5), I get an "IllegalStateException".
How do I fix the error?
If you see further errors or have improvements to the code, then you can also tell me.


import java.util.LinkedList;
import java.util.ListIterator;
import java.util.Scanner;

public class Songs {

    public static void main(String[] args) {

        LinkedList<String> songs = new LinkedList<>();
        songs.add("Song 1");
        songs.add("Song 2");
        songs.add("Song 3");
        songs.add("Song 4");
        songs.add("Song 5");
        songs.add("Song 6");

        Scanner scanner = new Scanner(System.in);
        boolean quit=false;
        boolean forward=true;
        ListIterator currentSong = songs.listIterator();

        printMenu();
        while(quit==false){
            switch(scanner.nextInt()){
                case 1:
                    printMenu();
                    break;
                case 2:
                    if(!forward){
                        if(currentSong.hasNext()){
                            currentSong.next();
                        }
                        forward=true;
                    }
                    if(currentSong.hasNext()){
                        System.out.println("Now playing " + currentSong.next());
                    }
                    else{
                        

Open in new window

0
I have updated my android studio from a version 2, to the newer version 3.6.1.
When I loaded my existing project into the newer version of Android studio, the gradle would no longer sync correctly. I am getting the error

"Gradle sync failed: Could not find method google() for arguments [] on repository container.
                  Consult IDE log for more details (Help | Show Log) (7 s 47 ms)"

I cannot seem to find a solution that works to resolve this error so that I can continue working on the project? Any help is appreciated.
0
hi am geting the following error

 Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for guru.springframework:pet-clinic-web:jar:0.0.5
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.junit.jupiter:junit-jupiter-api:jar -> version (?) vs 5.5.0-RC1 @ line 97, column 21
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.mockito:mockito-junit-jupiter:jar -> version 2.22.0 vs (?) @ line 107, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] tdm-pet-clinic                                                     [pom]
[INFO] pet-clinic-data                                                    [jar]
[INFO] pet-clinic-web                                                     [jar]
[INFO]
[INFO] ----------------< guru.springframework:tdm-pet-clinic >-----------------
[INFO] Building tdm-pet-clinic 0.0.5                                      [1/3]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] ----------------< guru.springframework:pet-clinic-data
0
hi my wsdl is not loading in spring boot
wsdlstructure
0
Try to run the attached java code with the error below :
Error: Could not find or load main class FixedSizeArrayQueue

Any idea ?

FixedSizeArrayQueue.java
0
Is BitBucket the best choice?

I am starting a project which will involve various developers, some offshore. I need a GIT Repo I can use for source code management and have good memories of BitBucket.

Is it still a great choice?

I saw a difference between Free/Standard/Premium that I dis not understand...

"Build Minutes"...

I do not recall using BitBucket to Build anything. What does this mean? To Build on BitBucket??

This site will have a EJS front end with a JAVA back-end. Does this mean on JAVA code commits, an auto-compilation can be configured? That is probably an option, I presume...it may be a very good option, but I'd like to understand it.

Thanks
0
I want to use another Java class (MyDeque class) defined in another file but it doesn't work. Any idea ?

GenerateDeque.javaDLNode.java
0
What's the way to get :

--illegal-access=<value>

Open in new window

(with 'value' in this case of "permit" )

into the runtime execution - (on the command line, as well as from a .jar file), - of a programme, please guys ?
 
The attempts I've made to use this to mute the WARNINGS that come back haven't worked and still get output to the console. Is there perhaps even another way to suppress runtime warnings ? Thanks again.
0
I want to uninstall JAVA 8 on my PC and NEVER install another JAVA package again, but first want to run some type of LOG for 10 weeks to see what software packages are using JAVA.

How can I create the above LOG ?
0
https://ninite.com/oracle_java and https://www.oracle.com/technetwork/java/javase/overview/oracle-jdk-faqs.html show JAVA on business PCs is NO longer free as of 10 months ago, therefore I plan to switch to a different package since I really don't have any APPS that need Java, but still would like to have installed if needed.

Has anyone switched to Amazon Corretto and AdoptOpenJDK ?

Any other suggestions ?
0
hi am having this error in my spring
spring
0
I have encountered the following error when compiling the java code. Any idea ?

MyStack.java:76: error: non-static variable this cannot be referenced from a static context
        ArrayStack stack = new ArrayStack();MyStack.java
0
Getting this error message :

java.lang.NoSuchMethodException: java.util.prefs.WindowsPreferences.WindowsRegOp
enKey(int,[B,int)
        at java.base/java.lang.Class.getDeclaredMethod(Class.java:2476)
        at CruzerIDD.<clinit>(CruzerIDD.java:52)
java.lang.NullPointerException
        at CruzerIDD.readString(CruzerIDD.java:126)
        at CruzerIDD.getCruzerID(CruzerIDD.java:113)
        at CruzerIDD.verifyCruz(CruzerIDD.java:87)
        at CruzerIDD.main(CruzerIDD.java:40)

Open in new window


when compiling and running under Java version 13.0.2,  but not under my previous version, 1.8.0_66.

Anyone any thoughts or know-how on this please ?
0
Hi Team,

my requirement is like select 1 from drop down it means January so only January should be enable on date picker , other months should be disable . if need more clarification please let me know .
below is my code please help me out where i m doing wrong.



var monthYear=0;
monthYear = $('#mYear').val();; 
		alert(mYear);
		$("#pdate").datepicker
			({
	   			minDate:"dateToday",
	   			dateFormat: 'dd/mm/yy',
	   			changeMonth: true,
	   			numberOfMonths: 1,
	   			onClose: function (selectedDate) {
	 						$("#pdate").datepicker("option", "minDate", selectedDate);
	   								},
	   							//Code to disable dates according to selection
	   							beforeShowDay: filterDate
			});
 var filterDate = function(date) {
     if(monthYear=='0'){
       return [true];
     }else{          
       return [(1+date.getMonth()) == monthYear];
     }
 }
  $(document).ready(function() {  
	 $("#sdata").click(function(evt) {
		evt.preventDefault();
		 if(save()){
			$.ajax({
				url: "Test.jsp",
				type: "post",
				data: {
				pS:$('#pS').val(),
				pType:$('#pT').val(),
				pCode:$('#pC').val(),
				mYear:$('#mYear').val(),
				pDate:$('#pdate').val(),
				ppDate:$('#ppdate').val(),
				bDate:$('#bdate').val()},
				success: function(responseFromServer) {
	            	$.each(responseFromServer, function(resultMessageKey,resultMessageValue) {	
	                    $('#content').html(resultMessageKey);
	                });
	            	getClearDateValues();
	    

Open in new window

0
hi am having this error
doc
0

Java

99K

Solutions

33K

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.