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.

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

Sign up to Post

Hi Experts,

I have shell scripts named as a.sh,b.sh ,c.sh and one jar file also.

Have to call these all  files  from a single sh file (main.sh ) by series not parallel.

Any help regarding this would he helpful.
0
Cloud Class® Course: Microsoft Exchange Server
LVL 12
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

I have a Java .jar file (Saxon-HE-9.8.0-7.jar). I want to modify this .jar file.

My first attempt was to add a new class to it. All seemed to go well, until I tested it, and the calling program insisted it could not find the new class.

This was my new class:

package net.sf.saxon;

public class TransformerFactoryImpl2 extends TransformerFactoryImpl
{
	public TransformerFactoryImpl2()
	{
	    this.setAttribute("http://saxon.sf.net/feature/ignoreSAXSourceParser", true);
	}
}

Open in new window


I compiled it at a Windows Command Line using javac.exe

 java.exe -cp Saxon-HE-9.8.0-7.jar TransformerFactoryImpl2.java

Open in new window


This created file TransformerFactoryImpl2.class

Then I added this new class to the .jar file:

jar uf Saxon-HE-9.8.0-7.jar TransformerFactoryImpl2.class

Open in new window


Did I miss a step? Is there a manifest somewhere I need to add this new class to?


Since this approach did not work, my next idea was to modify the original class. I disassembled the original class, modified it, recompiled it using the same technique as above, then updated the jar file using the same technique as above. I then unzipped the resulting jar file, and found I had two copies of file TransformerFactoryImpl.class in two different places: the original class where it belonged in the net\sf\saxon directory, and my new class in the top level directory.


What step am I missing?
0
Dear Expert Community

I am in the process of writing a Java program with a Main Window having a JPanel in which I can open pictures. I open the pictures using the code below.

J7 = new JPanel();
J7.setLayout(new BorderLayout());
image1 = ImageIO.read(new File(ImgFile1));
 img1 = new ScalablePane(image1);
 J7.add(img1, BorderLayout.CENTER);
add(J7, c);                    
 pack();

The program open one picture after the other in this panel  according to user inputs without problems but suddenly when opening one of the pictures, the picture panel and the other panels in the main window focus in and out continuously - kind of blinking. If I then drag the main window a little larger or smaller it stops. Any good ideas to solve this problem?
0
I have USB token and when it plugged in , it installed personal certificate into browser (chrome).
which i confirmed by go to setting -> menage certificates ->personal.

I just want to know is there any method i can show list  (or read public key) of that certificates on my web page?
I read web crypto api but i found it doesn't have any function.
0
How to call vb script function from java?
I have tried below code. nothing worked.

 File file1 = new File("D:\\calbyd.vbs");
        try {
        Process p = Runtime.getRuntime().exec("wscript " + file1.getPath());
        p.waitFor();
int a = p.exitValue() ;
 } catch (Exception e) {
}


Attached vbs file for ref.



Thank you.
0
Hi Experts,

HashSet<TestData> hashset = new HashSet<>();

using select query getting data from Test1 table and adding data in TestData Object, then finally adding it in hashset.
now hashset is haviing 1000 records.

i want to insert this data in Test2 table(different database).

in Test2 table might have the same record if the record is available need to do update the values
if no data available in Test2 table need to do insetion.

Can some suggest me best way to do insert or update in Test2 table using jdbc.
0
I was going through http://www.lambdafaq.org/can-lambda-expressions-be-used-to-define-recursive-functions/ and tried to use the following code in a method but it failed to compile:
UnaryOperator factorial = x -> x == 0 ? 1 : x * factorial.apply(x - 1);

Open in new window

Also, I am not able to understand how to call this recursive method to return the factorial of an integer.
0
Dear Sirs,
I have a quick question.
I need to choose between Vaadin and JavaFx for an urgent app that has to run into a browser.
I would like to get some advices.
I will be mixing the technologies mentioned above with Spring.
On JavaFx, I have a question: can a JavaFX app integrated into Spring run into a browser after being deployed as it does for a normal pure Html/Jsp with Spring? A sample code will be highly appreciated.

I am looking forward to hearing from you.

Omer P Ntumba.
0
There is an entity class defined as DepartmentBase.java which has 200 setter methods and 200 private variables declared for the same.

I'm having Department.java which extends the base class DepartmentBase.java which has few fields as well.

Now i want to create Random values for all the fields in Department.java and return Department object.

I'm not sure how to set all the values of setter which exist in Department and in base class.

Please help me.

Thanks.
0
Is any other solution to keep new Java version and have working IBM Notes? Any path or something?


http://www-01.ibm.com/support/docview.wss?uid=swg22012665
0
Cloud Class® Course: CompTIA Healthcare IT Tech
LVL 12
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

1. What are signed Jars ?
2. In some application, after doing java changes, the client is requesting to build the signed jars for the client libraries changed?
3. How to create or build a signed jar?
4. Examples to build a signed jar from scratch?
0
Good day experts,

We are experiencing a weird issue with one of our network computers with regards to capcha not displaying in any web browser such as IE, Firefox, Chrome, etc.

We checked to ensure Java is updated, tried different browsers, changed settings as recommended in some google searches and still no success.  We also checked to make sure Windows updates are up to date.  The operating system is Windows 7 -64 bit.  ss-error.png I have attached a screen shot of the error.  Any guidance you can provide would greatly be appreciated.  

Thank you
0
I have glassfish app on my Linux red hat 6.
I cant start my glassfish node it gives me next error :

There is a process already using the admin port 5858 -- it probably is another instance of a GlassFish server.Command start-domain failed.

But when i run comman in linux " netstat -tulnp | grep 5858 " It shows me:

tcp :::5858 LISTEN 47256/java

Port used by java app. But i cant log in to my glassfish interface.

How can i solve this issue, any expierenced specialist with glassfish maybe can help.
0
I am getting below error


[INFO] Scanning for projects...
Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.example.howtodoinjava:spring-boot-soap-service:0.0.1-SNAPSHOT: Failure to find org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.M4 in http://111.2.222.111:8081/archiva/repository/internal was cached in the local repository, resolution will not be reattempted until the update interval of archiva has elapsed or updates are forced and 'parent.relativePath' points at no local POM @ line 14, column 10
 @
The build could not read 1 project -> [Help 1]
 
  The project com.example.howtodoinjava:spring-boot-soap-service:0.0.1-SNAPSHOT (C:\Users\gmy\tes\spring boot_webservices_soap_rest\spring-boot-soap-service\pom.xml) has 1 error
    Non-resolvable parent POM for com.example.howtodoinjava:spring-boot-soap-service:0.0.1-SNAPSHOT: Failure to find org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.M4 in http://111.2.222.111:8081/archiva/repository/internal was cached in the local repository, resolution will not be reattempted until the update interval of archiva has elapsed or updates are forced and 'parent.relativePath' points at no local POM @ line 14, column 10 -> [Help 2]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

0
spring boot security

how SimplePasswordValidationCallbackHandler dfferent from other implementatons like
SpringCertificateValidationCallbackHandler

SpringDigestPasswordValidationCallbackHandler


what is meaning of call back handler

Please advise
0
apart from the "Elements" at top like GetCourseDetailsRequest, GetCourseDetailsResponse
 why we have Types at bottom like Status and CourseDetails at the bottom
<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://xyz.com/courses" xmlns:tns="http://xyz.com/courses"
	elementFormDefault="qualified">

	<xs:element name="GetCourseDetailsRequest">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="id" type="xs:int" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="GetCourseDetailsResponse">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="CourseDetails" type="tns:CourseDetails" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="GetAllCourseDetailsRequest">
		<xs:complexType>
		</xs:complexType>
	</xs:element>

	<xs:element name="GetAllCourseDetailsResponse">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="CourseDetails" type="tns:CourseDetails"
					maxOccurs="unbounded" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="DeleteCourseDetailsRequest">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="id" type="xs:int" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="DeleteCourseDetailsResponse">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="status" type="tns:Status" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:simpleType name="Status">
		

Open in new window

0
<wsdl:portType name="CoursePort">...</wsdl:portType>
<wsdl:binding name="CoursePortSoap11" type="tns:CoursePort">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetAllCourseDetails">


Similar to above SOAP over http


any examples on below

<wsdl:portType name="CoursePort">...</wsdl:portType>
<wsdl:binding name="CoursePortSoap11" type="tns:CoursePort">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/mq"/>
<wsdl:operation name="GetAllCourseDetails">


basically i am looking for examples on soap over mq not soap over http
what are advantages, disadvantages, practical uses of SOAP over MQ vs SOAP over http
Please advise
0
hi,
while working with the SOAP web service i gave below as request from wizdler.

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
   
   
    <Body>
        <GetCourseDetailsRequest xmlns="http://xyz.com/courses">
            <id>123</id>
        </GetCourseDetailsRequest>
    </Body>
</Envelope>

i am getting below response when i click go button with POST method selected from drop down

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
        <SOAP-ENV:Fault>
            <faultcode>SOAP-ENV:Client</faultcode>
            <faultstring xml:lang="en">com.sun.xml.wss.XWSSecurityException: Message does not conform to configured policy [ AuthenticationTokenPolicy(S) ]:  No Security Header found; nested exception is com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: Message does not conform to configured policy [ AuthenticationTokenPolicy(S) ]:  No Security Header found</faultstring>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


can you please advise how to resolve this
whizler1.png
0
while executing spring boot soap example keep getting error like below

Description:

The Tomcat connector configured to listen on port 8081 failed to start. The port may already be in use or the connector may be misconfigured.

Action:

Verify the connector's configuration, identify and stop any process that's listening on port 8081, or configure this application to listen on another port.


I tried 8080 as well in application.properties even that did not work


how to find what ports are free on my windows 10 laptop to use that ?

please advise
0
Cloud Class® Course: Ruby Fundamentals
LVL 12
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

what are differences between project explorer and package explorer in eclipse.

how to open package explorer by default when opening eclipse

Please advise
0
Are SOAP web services are state-full

I read REST ones are stateless

https://www.tutorialspoint.com/restful/restful_statelessness.htm

Please advise
0
Hello everyone!. I am currently using wildfly 12 (on centos 7) in domain mode. I was wondering how to configure it so that the controller runs independently from the nodes. I need this because it has happened to me that for instance node1 failed but it happens to be the controller too and so I don't know how to restart that node without shutting down the entire cluster.
Is there any recommended configuration for this?.
0
hi, i need to write a flames code in java using string manipulation.
and dont need to give inputs using scanner.i would like to do in a method to use that in anywer in the code.

anyone help me please.
0
hi,

Wonder why screen 2 approach better than screen 1 approach.
Please advise
screen2.png
screen1.png
0
I'm upgrading from an older (5.1) version of Jasper Reports in my java project.  I've re-compiled a report in the new Tibco Reports Designer.  When I try to run it, or any other report, I get no output.  I downloaded and compiled the jasperreports 6.0.2 source and am using it for debugging the problem. screen shot of last executed statement  I've included a screen shot of the last statement that tries to execute.  It's line 823 in JasperCompileManager in function getCompiler.

This is a working app and I believe I've updated all the required libraries.

I don't catch any exceptions (at least not any I'm expecting) and the program returns to my finally statement after trying to run the jasper report.  The only other thing I can add is that if I hover over the JRCompiler  item in the previous sentence it says, JRCompiler is not a known variable in the current context.  Not sure if that helps.  It also doesn't hit the catch (Exception e) statement it just fails.  Not sure how to progress from here.
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.