Sponsored Content
Top Forums Programming Not able to execute the method based on OS in JAVA Post 302326672 by cbkihong on Thursday 18th of June 2009 11:51:40 AM
Old 06-18-2009
Please consider taking some time for some readings to consolidate your Java knowledge. You don't use equality (==) for string equality tests. You must use the String.equals() method.

e.g. osName.equals("SunOS")

By using == you were comparing two object references and expectedly the equality is false.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

execute command unix with java:possible or not?

hi everybody, i have a small unix script and i want to use it with java, so how can i executte unix command with java (if it is possible): in fact i want to use some values returned by this script with java swings. is it possible (of course everything is possible) but how can i do? thank you in... (4 Replies)
Discussion started by: mips
4 Replies

2. Programming

execute unix command from java eclips

Hi all, I tried to execute the command by 2 ways : 1) Java Runtime class exec method - but the problem there is that it only can execute scripts without arguments(I need with args) 2) the Jtux classs Uprocess- the problem it is not supported by windows and my eclips platform is on... (0 Replies)
Discussion started by: katzs500
0 Replies

3. Shell Programming and Scripting

How to execute java program from perl

hello all how can i run the java command that can eccept N numbers of args for example : java -cp .;foo.jar myApp 1 "ww" or java -cp .;foo.jar myApp 1 2 3 "ww" or java -cp .;foo.jar myApp "args1" "args2" "args3" Thanks (1 Reply)
Discussion started by: umen
1 Replies

4. Solaris

how to execute java in specified time- urgent

Hi, 1. I want to execute a set of java files(a small appln) at specified time interval in solaris. that java uses documentum DFC calls. 2. How can i do this? from thread i chked ppl suggest to do cron, and so.. pls provide me a details steps hence i am new to solaris.. Any... (1 Reply)
Discussion started by: radhnki
1 Replies

5. Shell Programming and Scripting

Calling Java Method from UNIX using shell script

Hi All, I need to call a java method from a shell script. I know we can use the command java ClassName to call the main method in it. But I need to call another method that is there in the class and pass an email to it. Can I use java ClassName.MethodName(email) Any help will be... (4 Replies)
Discussion started by: RahulK
4 Replies

6. Programming

infinite loop, synchronizing gossip-based method

the following code runs, but it hangs somewhere, i don't know why, #include<iostream> #include<vector> #include<cstdlib> #include<ctime> #include<list> #include<pthread.h> #include<cstring> using namespace std; pthread_mutex_t listlock = PTHREAD_MUTEX_INITIALIZER;... (3 Replies)
Discussion started by: saman_glorious
3 Replies

7. Programming

modifying 2 or more values using method in Java

i wanna make modification in two or more identifiers,using a method in JAVA , but the only way to do this is by returning a value ,then also only one variable value can be modified .. one way 2 do do this is by use of array and passing its name in method ,, please suggest a different way of doing... (2 Replies)
Discussion started by: upvan111
2 Replies

8. Shell Programming and Scripting

how to execute a unix shell script from a java program

Hi All, well , i am facing this problem.. i have tried a few sample codes but there isn't any solution . could anyone please give a sample code as of how to do this... Please see the below details...and read the details carefully. I have written some code, logic is 1)from... (4 Replies)
Discussion started by: aish11
4 Replies

9. Programming

Java Applet: addTextListener method undefined???

Hi friends, I hope everyone is doing fine and well. I am wrtting a small applet in java which listens to changes in text fields. Please have a look at my code, then we will talk about it. import java.awt.*; import java.applet.*; import java.awt.event.TextEvent; import javax.swing.*; import... (0 Replies)
Discussion started by: gabam
0 Replies

10. Shell Programming and Scripting

Different output based on run method

Sample Data #cat /mylist.txt /raid/job/123 /raid/job/456 /raid/job/789 # Script #cat /myfind.scr #!/bin/bash touch /nojob.txt touch /job.txt unset dirfolder for dirfolder in `/bin/cat /mylist.txt`;do if then echo $dirfolder >>/job.txt else echo $dirfolder >>/nojob.txt (3 Replies)
Discussion started by: crowman
3 Replies
Net::LDAP::Schema(3)					User Contributed Perl Documentation				      Net::LDAP::Schema(3)

NAME
Net::LDAP::Schema - Load and manipulate an LDAP v3 Schema SYNOPSIS
use Net::LDAP; use Net::LDAP::Schema; # # Read schema from server # $ldap = Net::LDAP->new ( $server ); $ldap->bind ( ); $schema = $ldap->schema ( ); # # Load from LDIF # $schema = Net::LDAP::Schema->new; $schema->parse ( "schema.ldif" ) or die $schema->error; DESCRIPTION
"Net::LDAP::Schema" provides a means to load an LDAP schema and query it for information regarding supported objectclasses, attributes and syntaxes. METHODS
Where a method is stated as taking the 'name or oid' of a schema item (which may be an object class, attribute or syntax) then a case- insensitive name or raw oid (object identifier, in dotted numeric string form, e.g. 2.5.4.0) may be supplied. Each returned item of schema (eg an attribute definition) is returned in a HASH. The keys in the returned HASH are lowercased versions of the keys read from the server. Here's a partial list (not all HASHes define all keys) although note that RFC 4512 permits other keys as well: name desc obsolete sup equality ordering substr syntax single-value collective no-user-modification usage abstract structural auxiliary must may applies aux not oc form all_attributes ( ) all_ditcontentrules ( ) all_ditstructurerules ( ) all_matchingrules ( ) all_matchingruleuses ( ) all_nameforms ( ) all_objectclasses ( ) all_syntaxes ( ) Returns a list of all the requested types in the schema. attribute ( NAME ) ditcontentrule ( NAME ) ditstructurerule ( NAME ) matchingrule ( NAME ) matchingruleuse ( NAME ) nameform ( NAME ) objectclass ( NAME ) syntax ( NAME ) Returns a reference to a hash, or "undef" if the schema item does not exist. "NAME" can be a name or an OID. $attr_href = $schema->attribute( "attrname" ); dump ( ) Dump the raw schema information to standard out. dump ( FILENAME ) Dump the raw schema information to a file. $result = $schema->dump ( "./schema.dump" ); If no schema data is returned from directory server, the method will return undefined. Otherwise a value of 1 is always returned. error ( ) Returns the last error encountered when parsing the schema. may ( OBJECTCLASS ) Given an argument which is the name or oid of a known object class, returns a list of HASHes describing the attributes which are optional in the class. @may = $schema->may ( $oc ); # First optional attr has the name '$may[0]->{name}' must ( OBJECTCLASS ) Given an argument which is the name or oid of a known object class, returns a list of HASHes describing the attributes which are mandatory in the class. @must = $schema->must ( $oc ); parse ( MESG ) parse ( ENTRY ) parse ( FILENAME ) Takes a single argument which can be any of, a message object returned from an LDAP search, a "Net::LDAP::Entry" object or the name of a file containing an LDIF form of the schema. If the argument is a message result from a search, "Net::LDAP::Schema" will parse the schema from the first entry returned. Returns true on success and "undef" on error. superclass ( NAME ) Given an argument which is the name or oid of a known objectclass, returns the list of names of the immediate superclasses. matchingrule_for_attribute ( NAME, RULE ) Given an attribute name and a matching rule ("equality", "substr", etc), return the actual rule taking into account attribute supertypes. SEE ALSO
Net::LDAP, Net::LDAP::RFC AUTHORS
Graham Barr <gbarr@pobox.com> John Berthels <jjb@nexor.co.uk> Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>. COPYRIGHT
Copyright (c) 1998-2004 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.2 2012-09-20 Net::LDAP::Schema(3)
All times are GMT -4. The time now is 09:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy