Help Required In Java Collections.
Hi Techi's
Can U please Solve my problem.
The Problem ..
I have a array
tempentries[entryinc]=entryValue.length();this array after getting all the length for the entryValue length,
i am trying to save the information of tempentries into some Collections like Vector...
in the format.
first element of tempentries in first Vector,
second element of tempentries in second Vector,
but i could not create a array of Vectors .
if u r getting a idea about this please tell me.
thnx for ur reply..
i am sorry for not explaining my problem properly.
i have certain Strings(There Can Be Any No. Of Strings)..
<table>
<row>
<entry>dsad</entry>
<entry>dasdasd</entry>
<entry>bfdgsfg</entry>
<entry>gsdfgaerg</entry>
</row>
<row>
<entry>argeragav</entry>
<entry>agaergvdf</entry>
<entry>adgagaads</entry>
<entry>vaferv ev</entry>
</row>
</table>
This is the file. for each row there is 4 <entry> so i will be creating int array of size 4.
Here There Are 2 rows but four columns.
I need To Find a column width.So I Decided To store the first row's First entry in one vect and second entry in second ..and similarly i add for to the same respective vector for the next row..
did u get it ..
is there any other way to capture or read by columns of the table.
Similar Messages
-
Help required on java.lang.StackOverFlowError and static initializer
I wanted to create an instance of a class that contains another instance of the same class. So I wrote:
class A {
A z = new A ();
void display () {
System.out.println ("Hello World");
public static void main (String [] args) {
A y = new A();
y.display ();
}During execution I got java.lang.StackOverFlowError. But if I put a static initializer, it works fine. Here is the code using static initializer.
class A {
static{
A z = new A ();
void display () {
System.out.println ("Hello World");
public static void main (String [] args) {
A y = new A();
y.display ();
}Could anyone please help me to understand the logic why "java.lang.StackOverFlowError" is happening here and how the same program runs fine by putting a static initializer ?
Regards,
ShambhuCould anyone please help me to understand the logic
why "java.lang.StackOverFlowError" is happening hereWhen you instantiate an A object with A y = new A () then A z = new A () also gets executed inside the A class, which in it's turn executes A z = new A () again, and again, and again...
and how the same program runs fine by putting a
static initializer ?Because the static block gets executed only once.
The use of class- and instance variables is explained in more detail here:
http://java.sun.com/docs/books/tutorial/java/javaOO/classvars.html -
Help required for ---- Java Client -- XI -- R/3
Hello,
*My Java Client is on Server A. My XI is on server B. I had wsdl (webservice) with me .*
How to call wsdl (webservice) from Java Client that is on Server A to XI that is on server B.
Pls help
RegardsGood Morning Prateek,
I have tested with Altoval XML spy . It is working fine.
Altoval XML spy (on my local machine) -- XI -- R/3.
Now instead of xml spy I want java client -- XI -- R/3 with scanerio that javal client is on server A and XI on server B.
2. For that request parameter (O/B Interface) I have made wsdl (webservice) through XI .
After making wsdl it ask to save that wsdl.I have saved that wsdl currently
in my local machine.
3.How to call this wsdl (webservice) from Java Client that is on Server A to XI that is on server B.
Pls explain me the all the steps in detail and also send me links/docs for it.
Regards -
As far as I know the variables that are used inside java script program are declared using var keyword.
Suppose I assign in the following manner,
var str="Hello";
Is there any way I can using the String functions that java.lang supports . I want to do validaition at the client side. Therefore I assume there is no mandatory requirement , that the client has anything java on his system.Javascript already supports many of the java.lang functions, eg, substring(start, stop), length, splice, split, etc.
Just remember your using Javascript so there may be variations with methods and signatures.
Have a look at either Netscapes or Microsofts Javascript reference.
Anthony -
Hai
I am using java cvs for my application.First i created the pserver
connection its work well in stand alone code but when I am using this code in jsf (Using Sun Studio Creator ) . the code below take my application in a non stoping loop on browser ,where browser is waitting for reply .....and the progress bar is rotating continuesly ....pls help me
Thnx in advance
Here is my Source Code
try{
PServerConnection c =new PServerConnection();
PServerConnection connection = c;
Scrambler scrambler = StandardScrambler.getInstance();
c.setUserName("username ");
c.setHostName("host name ");
c.setRepository("/repository name ");
c.setEncodedPassword(scrambler.scramble("password "));
c.open(); // this code is not running properly
System.out.println("connection created");
catch(Exception e)
System.out.println("connection not created");
e.printStackTrace();
Regards
Raviraj GangradePlease check online help:
http://developers.sun.com/prodtech/javatools/jscreator/reference/docs/help/2update1/vcs-nb/vcs_cvs.html
and
Source Code Control Features in the Sun Java Studio Creator 2 IDE
http://developers.sun.com/prodtech/javatools/jscreator/reference/fi/2/source-code-control.html -
Help Required in java mapping using XI
Does any body worked on java Mapping in XI
where do u find the com.sap.aii.*;
thank's in advance
swamyHi,
To access the mapping API, you must include the Jar file aii_map_api.jar in your class path. The Jar file is located in the following directory:
<SAP_install_dir>/<system_name>/<instance_name>/j2ee/cluster/server<number>/apps/sap.com/com.sap.xi.services/
To include the three J2EE standard libraries in the class path of the NetWeaver Developer Workplace, call the Set Additional Libraries... function in your Eclipse project by calling the context menu and selecting the libraries
com.sap.tc.Logging,
com.sap.mw.jco
sapxmltoolkit.
Hope this solves your problem.
Regards,
Siva Maranani.
Message was edited by: siva maranani -
Java Mail,SMTP server not starting,help required urgently
Hi i have been working on java mail .Yesterday it was working ok but today suddenely i am getting this thing.its not starting the smtp server i guess,just exiting and get the command prompt ..dont know what to do.help required how to go about this error
am pasting the debug information.please check and let me know
the compilation ,smtp server and others are all valid
thanks
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Pavan>cd C:\Program Files\Java\jdk1.5.0_07\bin
C:\Program Files\Java\jdk1.5.0_07\bin>javac jdbcExample3.java
C:\Program Files\Java\jdk1.5.0_07\bin>java jdbcExample3 smtpserver address
DEBUG: JavaMail version 1.4ea
DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jdk1.5.0_07\jre\lib\
javamail.providers (The system cannot find the file specified)
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.providers
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax
.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsyste
ms, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com
.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLSt
ore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsyst
ems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.su
n.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=jav
ax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc],
com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP
3Store,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.
sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STOR
E,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Prov
ider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc],
pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems
, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.S
MTPTransport,Sun Microsystems, Inc]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.address.map
DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jdk1.5.0_07\jre\lib\
javamail.address.map (The system cannot find the file specified)
C:\Program Files\Java\jdk1.5.0_07\bin>The debug output doesn't show an obvious problem. You're
going to have to actually debug your program. A debugger
might be helpful. -
Hi SDNers,
I have a requirement to write UDF, can anybody help me in acheiving the code.
Requirement:-
If I am getting 5 as my input to UDF, I need to generate five 001's to my output of UDF.
I tried to loop the input and used result.addValue("001"); but not working.
Please help in getting java logic for this udf.
Thanks
Jayaram.GHi Luis,
Thanks for your quick response.
I am using context in my udf.
My code is like this.
for(int i=0;i<var1.length;i++)
result.addValue("001");
As I am getting 5 as input and I am using Var1.length, the udf is generating only one 001. But I need five 001.
Regards,
Jayaram.G -
In my requirement I have a table for which a search help needs to be designed. The product hierarchy has 8 levels. To identify the correct product hierarchy, search help will be used by the user to select the level of product hierarchy and to navigate to next level of product hierarchy.
Please give me some idea to design this.Hi,
You have to use collective search help.
A collective search help describes an input help process in which the
user can choose one of several alternative search paths. Each
alternative search path corresponds to an elementary search help, i.e. a
collective search help contains several elementary search helps.
Both elementary search helps and other collective search helps can be
included in a collective search help. if a collective search help
contains other collective search helps, they are resolved down to the
level of the elementary search helps when the input help is called.
Like an elementary search help, a collective search help has an
interface of import and export parameters. The data is exchanged between
the screen template and the parameters of the elementary search helps
contained in it using this interface. The parameters of the search helps
included in a collective search help must be assigned to the parameters
of the collective search help.
During the input help process, the collective search help only controls
the user's selection of the required search path. The rest of the dialog
and data collection is controlled by the selected elementary search
help. If selection of the required elementary search help should be made
flexible (e.g. with context-specific definition of the set of available
search paths), the collective search help must be assigned a search help
exit.
Hope now you can design accordingly and i think this helps you.
Regards,
Rama Chary.Pammi. -
XSLT mapping Help Required.
XSLT mapping Help Required.
Hi Experts,
I am New to XSLT Mapping. I am practising the below Example:
InputXML File:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="Persons111.xsl"?>
<ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
<Person>
<FirstName>Anshul</FirstName>
<LastName>Chowdhary</LastName>
<Gender>Male</Gender>
<Address>
<Street>2nd Main</Street>
<Houseno>83/b</Houseno>
<City>Mysore</City>
</Address> </Person>
</ns0:MT_XSLT_Source>
XSL StyleSheet File:
<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/Gen"
Xmlns:ns1=”http://XYZ.com/Test”>
<xsl:template match="/">
<ns1:MT_XSLT_Target>
<Title> <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender"/> </Title>
<Name> <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)"/>
</Name>
<Street> <xsl:value-of select="concat(concat(ns0:Mt_XSLT_Source/Person/Address/Houseno,' '),
ns0:Mt_XSLT_Source/Person/Address/Street)"/> </Street>
<City> <xsl:value-of select="ns0:Mt_XSLT_Source/Person/Address/City"/> </City>
</ns1:MT_XSLT_Target>
</xsl:template>
</xsl:stylesheet>
The Desired Output shuold be:
<?xml version="1.0" encoding="UTF-8"?>
<ns1:MT_XSLT_Target xmlns:ns1="http://XYZ.com/Test">
<Title>Male</Title>
<Name>Anshul Chowdhary</Name>
<Street>83/b 2nd Main</Street>
<City>Mysore</City>
</ns1:MT_XSLT_Target>
I have refered the xsl in xml and i am getting the below Oupt in a Single line like this:
Anshul Chowdhary Male 2nd Main 83/b Mysore
I am Unable to display in Target XML Fomrat as shown above. Please check and do the needful.
Regards,
GIRIDHARHi,
I have used below for testing.
Input xml:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="Persons111.xsl"?>
<ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
<Person>
<FirstName>Anshul</FirstName>
<LastName>Chowdhary</LastName>
<Gender>Male</Gender>
<Address>
<Street>2nd Main</Street>
<Houseno>83/b</Houseno>
<City>Mysore</City>
</Address> </Person>
</ns0:MT_XSLT_Source>
xsl code:
<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/gen"
xmlns:ns1="http://XYZ.com/Test">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<ns1:MT_XSLT_Target>
<Title> <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender"/> </Title>
<Name> <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)"/>
</Name>
<Street> <xsl:value-of select="concat(concat(/ns0:MT_XSLT_Source/Person/Address/Houseno,' '),
/ns0:MT_XSLT_Source/Person/Address/Street)"/> </Street>
<City> <xsl:value-of select="/ns0:MT_XSLT_Source/Person/Address/City"/> </City>
</ns1:MT_XSLT_Target>
</xsl:template>
</xsl:stylesheet>
For testing in PI ,change the extension from .txt to .xsl and zip it and upload into PI as an imported archive .
Regards
Venkat -
Urgent help required: Query regarding LC Variables
Hi All
Sometime earlier I was working on a performance issue raised by a customer. It was shell script that was taking almost 8-9 hrs to complete. During my research I came across a fact that there were some variables which were not set, the LC variables were impacting the sort funnel operations because of which the script was taking a long time to execute.
I asked them to export the following commands, after which the program went on smoothly and finished in a couple of mins:
export LC_COLLATE=en_US.ISO8859-1
export LC_MESSAGES=C
export LC_MONETARY=en_US.ISO8859-1
export LC_MONETARY=en_US.ISO8859-1
export HZ=100
export LC_CTYPE=en_US.ISO8859-1
export LANG=en_US.UTF-8
Later I did recover that setting the LC_COLLATE to C, is not helping and the program was again taking a lot of time. Few questions that I want to ask are:
1. Can someone please tell me, what each of these variable mean and how these values make a difference.
2. When I exported LC_COLLATE=en_US.ISO8859-1, it worked fine, but when i tried with the defalut value LC_COLLATE=C, then why the program didnt work.
As this issue is still going on, hence I would request All to provide their valuable inputs and let me know as much as possible.
Appreciate your help in this regard.
Thanks
Amit
Hi All
A new development in this regard. The customer has send us a screen shot in which they were trying to export the locale variable using the commands which I have pasted above. I can see in the screen shot that while exporting LC_COLLATE and LC_TYPE, they get a message that ""ksh: export: couldn't set locale correctly"".
Request everyone to please give their inputs as it's a bit urgent.
Thanks for all the help in advance.
Thanks
Amit
Some help required please...
Edited by: amitsinhaengg on Jul 22, 2009 2:03 AM
Edited by: amitsinhaengg on Jul 22, 2009 2:06 AMLC_CTYPE
Controls the behavior of character handling functions.
LC_TIME
Specifies date and time formats, including month names, days of the week, and common full and abbreviated representations.
LC_MONETARY
Specifies monetary formats, including the currency symbol for the locale, thousands separator, sign position, the number of fractional digits, and so forth.
LC_NUMERIC
Specifies the decimal delimiter (or radix character), the thousands separator, and the grouping.
LC_COLLATE
Specifies a collation order and regular expression definition for the locale.
LC_MESSAGES
Specifies the language in which the localized messages are written, and affirmative and negative responses of the locale (yes and no strings and expressions).
You can use command
# locale -k LC_CTYPE
to see more detail about each type. -
Help required - Sales order item is partially delivered but the item grayed
I have a sales order 123 having say item10 with qty 1, item20 with qty 10 , item 30 qty 12
Item 1 confirmed qty 1 and delivered qty is 1
Item 2 confirmed qty 10 and delivered qty 10
Item 3 confirmed qty 1 and delivered qty is 1
Now the item3 still has open requirements of 11 to be delivered. But the item is GRAYED OUT already.
even if I do ATP the qty is not confirming for the remaining 11 pieces.
Why is that? How to make that item out from GRAY.
How to confirm the remaining 11 qty for that item.
Help required as early as possible.
Appreciate ur help guys
Radhahi Radha, how are you ?
---the partial deliveries in master data must have not been mentioned.
---the deliveries should be upto target quantity.
---check order type, item category and schedule line category.
---check unrestricted stock availability.
thank you
regards
Khera. -
One to many relationship using java collections
I am facing issue on how to store and then retrieve data . In my program which is simple java class i am retrieving data at 3 places from an xml. i need to store this temporarly in particular fashion as data is related and needed to be used later on at end program to generate report.
first data i am retireving is employee names eg Tom , Reggie, Martha.
Second data is department (Each employee belongs to 1 or many department ) so in this case
Tom : Billing
Reggie : Admin , HR
Martha : IT
Third data is Department number (This has 1 : 1 relationship with Department )
Billing :01
Admin :02
HR:03
IT:04
So when i am parsing xml first i am getting employee data, then department and lastly department number. I need to store it in collection in such way later on i can retireve and link data and use it.....
Which java collections i should use....
Any hints or guidance ....Well, the simplest approach is to initially load the employees objects into a List<Employee>. Initially they store the department number only. Then load the departments, probably into a Map<Integer, Department>. Having popluated such a map you then loop through the Employee list, connecting looking up the deparment number in the map and connecting Employee to Department as you wish. (An Employee would probably had a reference to the Department, the Department might contain a List<Employee>).
The implementations to use depend on how you'll use them. HashMaps are faster than TreeMaps, but a TreeMap orders. LinkedLists are faster to process in sequence than ArrayList, slower to process at random. -
Search Help with in a serach help required in SRM 4.0
Hi,
Requirement: Search help required for Product Category field in the Search help for Product(BBPH_PRODUCT) in SRM portal.
This search help is used in Create shopping Cart transaction. The hyper link on Internal Goods/Services leads to the search help BBPH_PRODUCT.
My analysis:
The field Product Category (CATEGORY_ID) has search help(COM_CAT_HIER) attached to its data element. When I single test the search help BBPH_PRODUCT in SAP GUI,I can see the search help for field product category in the selection dialogue box. However the same does not appear on the corresponding screen in HTML.
Please let me know whether I need to do some thing to make the search help appear on the HTML screen?
With Regards,
Prakash KamathHi Prakash,
I have the same problem but with another field. Unloading point. Could you please tell me how did you solve this problem with displaying F4 help on html/ SRM portal?
Thank you very much.
Best regards,
Danijela ZIvanovic -
can someone pls help me with java on my macbook pro because after i download the mountain lion java has died and i need java to see streaming quotes from stock market
Java is no longer included in Mac OS X by default. If you want Java, you will have to install it.
However, note that you should think twice before installing Java for such a trivial need as looking at stock market quotes. There are other ways to get that information that don't involve Java, and using Java in your web browser is a HUGE security risk right now. Java has been vulnerable to attack almost constantly for the last year, and has become a very popular, frequently used method for getting malware installed via "drive-by downloads." You really, truly don't want to be using it. See:
Java is vulnerable… Again?!
http://java-0day.com
Maybe you are looking for
-
How do I access "Camera Roll"?
Hello, This might seem like a really dumb question, but I am totally stumped. I would like to look at the photos in my iPhone under the heading of "Camera Roll". When I tap on the icon for "Photos", it then opens up all of the photos in my phone. The
-
Help with ORBER BY in my query when negative numbers are involved
hi, I have SELECT * FROM my_table WHERE age = 5 ORDER BY photoSmall DESC my_table looks like this: key | age | photoSmall 1 25 2 2 25 3 3 25 1 4 25 -1 now, i would expect my results to be ordered as follows: firstly record 2 (because it has the highe
-
STO delivery with zero quantity
Hi Gurus, We are facing a problem in STO scenario. We are in ECC 6.0. We have settings for WM (Warehouse Management) are in place. STO is created. When trying to create a delivery the system is creating the delivery document but it is
-
Processing batch files to JPEG
I am trying to batch process multiple files (8-bit TIFF) to JPEG using PSE 8. After PSE opens all the photos, I get an error massage and the log says, for each file; Error: The parameters for command "Save" are not currently valid. (-25923) I can do
-
Capturing the history of Quatation
Dear SD Experts, We have some doubts on the comparative statements of previous quotes submitted to a customer, The scenario is like this, 1. We have submitted a quote to a customer and we go for negotiation, but during negotiation, the prices are ch