Configure TCP/IP system properties with java
I'm looking to do is to be able to set my TCP/IP properties using java every time I switch physical networks so that it is configured properly. One network automatically gives an IP while the other requires a static one. I'd rather not have to keep typing it in everytime so I'm looking for a way to automatically change it.
I'm thinking that the route to go would be through the java.lang.system to get the system properites but that'll only get me the os name and version stuff.
Any ideas?
I believe this will require native functionality. Each OS handles the specification of TCP/IP information differently. Getting the system properties is not going to help. The only way I can imagine doing this is to create a set of Java classes which provide a platform-independent abstraction for changing TCP/IP information and then use JNI to implement the natvie code for each platform you want to support.
Jitender - [email protected]
Similar Messages
-
Homgeneous System Copy with Java and DB2 with database tools.
Hello,
we have an single java stack (netweaver 2004s) and tried a system copy with database tools.
Source System: DP2, dp2adm, db2dp2, sapdp2db
Target System: SP2, sp2adm, db2sp2, ???
We followed the documentation "System copy for SAP systems based on sap netweaver 2004s SR1 JAVA. We exported the SDM on the source system made a redirected restore with db tools and tried to install a new target system.
During the import in the target system using sapinst we get in the
phase run java migration tool kit the following error message.
Caused by:
com.sap.engine.frame.core.configuration.ConfigurationException: Error
while connecting to DB.
at
com.sap.engine.core.configuration.bootstrap.ConfigurationManagerBootstrapImpl.(ConfigurationManagerBootstrapImpl.java:49)
... 14 more
Caused by: com.ibm.db2.jcc.a.SqlException: Connection authorization
failure occurred. Reason: userid revoked.
What I didn't understand is, that in the documenation it is mentioned, that you have to use the same java database connect user. But during the installation of the target system (SP2) I cannot change the java database connect user to sapdp2db. I'm only allow to enter sapsp2db. That might then cause the connection problem.
Regards
Alexander Türk
IHi Alexander
yes , give it a try , but see note
970518 Hom./Het.System Copy SAP NetWeaver 2004s SR2
and all other related notes , if it matches your environment .
Best regards
dirk -
System control with java, and networking in jave
Hi, just a couple of questions.
Ill start witht the networking query. Ive been making a basic network chat program using sockets. The text is transfered through the sockets as strings read in from text field on the interface
eg
kkSocket = new Socket("xxx.xxx.xxx.xxx", 80);
out = new PrintWriter(kkSocket.getOutputStream(), true);
in = new BufferedReader(new InputStreamReader(kkSocket.getInputStream()));
String fromUser = (ba.text());
out.println(fromUser);
All this works fine, i want to impliment file transfer into the app, but im clueless how to transfer anything other than a basic string over a socket, let alone send it to a specific location on the client computer. Any help / advice would be well recieved.
Also, as i have basic code, that can connect computers, and send messages between them, i was wondering how i control some of the system functions, like executing files, opening / closing cd tray etc through java. As with this, i could create a mini remote control application.
Again, any help on this (or even a pointer to relavent things in the java api) would be fantastic as the more i can understand the more inventive i can be when coding
CheerzYou seem to manage well even though you're posting to New To Java Technology, I've seen far worse questions in ALT even...
All this works fine, i want to impliment file transfer into the app, but im clueless how to transfer anything other than a basic string over a socket, let alone send it to a specific location on the client computer.To send files/binary data, you would use a BufferedInputStream (remember Streams are for binary data, Readers/Writers are for text) in a similar way you're using PrintWriter and BufferedReader now.
It could go a bit like this (invent your own protocol):
User1 sends a String that says: FILE C:\directory\file
User2 receives the String and prepares to save a file to the specified directory.
User1 sends the binary data to User2.
User2 reads the binary data and writes it in the file.
Controlling system functions in Java can be tricky, so you might not get all the functionality in your program that you want. Running programs can be done through System.exec(), but the CD tray might be impossible even. -
STMS Route configuration in Three system Landscape with DEV,QA and PRD
Hi
We have Three system landscape.i.e DEV,Quality and PRD
Before Somebody configured the STMS by selecting standard two system land scape ( Dev and QAS)
We Have Installed Production Server And Added into Existing STMS Configuration
Now Three Systems Showing, In Import Overviw Screen
How Can I Create Route Between Three systems
What I am Asking Is Without Delet Old Roots
Can i Create it are Not
regards
NSNRefer these links:
http://help.sap.com/saphelp_erp2005/helpdata/en/1c/2ddc0901db11d284870000e8a57770/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/44/b4a0137acc11d1899e0000e829fbbd/frameset.htm
Regards,
Ravi -
hi,
i was trying to fetch system related data, like processor usage, through java .. but i couldn't .. i couldn't find any API for the purpose..
finally used some shellscripting...
is there any API for these purpose?
If there are no such APIs then how java.io works?
how it interact with hardware? how it read input from IO devices?If there are no such APIs then how java.io works?
how it interact with hardware? how it read inputfrom IO devices?
can somebody answer these?Java technology includes an abstraction layer called the Java Virtual Machine. This JVM isolates all system dependencies. Once a JVM exists for a platform, pure Java programs (in bytecode form) will run on that platform. -
Using Operating System Routines with JAVA
Please help me i need a method(API)in java to shutdown the system. Explain it to me soon. Thank you
AhmadThere is no such thing in the java API.
You must either use Runtime.exec() to call an OS command or use JNI to call a OS api routine. -
Hi all
i'm developing a swing based application which opens a xml file in notepad upon right click.
here i want to provide a Popup to choose among various options such as notepad, wordpad, MS Word etc.
The problem is to tackle with the platform independence nature of program. on some systems MS Word can be installed and on some systems not. and what if OS is changed from windows to Linux or solaris.
is there any solution so that before populating the popup it searches for the availabel exes/binaries to provided the choices for the user.
or
if i'm looking the problem wrong way please tell. and provide some new path.
- Regards
NehilHi BenSchulz
The solution is working fine. and now i'm working on some modifications. i've some more problems.
1) is it possible to display that window in a JDialog so that it can be set as Modal Type which will block inputs on other frames.
2) if i click once on a file , it should open in default editor. for that i'm using following code
private void openInDefalutEditor(File file)
try
Runtime.getRuntime().exec("cmd " + file.toString());
catch (IOException ex)
ex.printStackTrace();
}Sometimes it work fine but sometimes it does nothing. what could be the bug in this?
Please clarify. -
Having problem setting system property with java -D name = value
I want some clarification. Consider the statement below
java -Djava.rmi.server.codebase=file:/c:\public_html\classes/
-Djava.rmi.server.hostname=xyz.com
-Djava.security.policy=java.policy engine.ComputeEngine
1. Is the syntax right for specifying a file directory as codebase?
-Djava.rmi.server.codebase=file:/c:\public_html\classes/
2. What does this hostname property imply? Does this mean that the program which is started can be accesed by xyz.com?
-Djava.rmi.server.hostname=xyz.comKurt,
I modified some of my directory structure as shown below and tried to execute. But I have got the same error again. Could you tell how to correct this error?
Under c:\home\ann\public_html\classes directory, I have the Following:
Sub-directory compute [Contains Compute.class and Task.class File]
Sub-directory engine [Contains ComputeEngine_Skel.class and ComputeEngine_Stub.class Files]
Sub-directory Meta-inf [Contains Manifest.mf file]
File compute.jar
Under c:\home\ann\src directory, I have the following:
Sub-directory engine [Contains ComputeEngine.java, ComputeEngine.class]
File java.policy
Under c:\home\jones\public_html\classes directory, I have the Following:
Sub-directory client [Contains Pi.class File]
Current working directory is c:\home\ann\src
The output from echo %CLASSPATH% was c:\home\ann\src; c:\home\ann\public_html\classes\compute.jar
When executing the command:
java -Djava.rmi.server.codebase=file:/c:\home\ann\public_html\classes
-Djava.rmi.server.hostname=bwing2
-Djava.security.policy=java.policy engine.ComputeEngine
I am getting the error,
ComputeEngine Exception: Stub class not found: engine.ComputeEngine_Stub; nested exception
is : java.lang.ClassNotFoundException: engine.ComputeEngine_Stub
java.rmi.StubNotFoundException: Stub class not found:
Sridhar -
Properties with special characters are not transfered to system properties
A property which contains a special character like % or � (o with 2 dots above) will not passed to system properties in java 1.5.0_16.
This was working with java 1.5.0_06.
Example
Jnlp:
<property name="test.fail" value="M�ller"/>
<property name="test.works" value="Moller"/>java:
System.getProperty("test.fail") = null
System.getProperty("test.works") = "Moller"The Jnlp is correct encoded in UTF-8
Are there any ideas?
regards<property name="test.fail" value="M%ller"/>
-
Is it possible to provide custom system properties for java stored procedures?
Hi,
Thanks for the reply RS.
I am using xml form builder through which I am trying to update the custom property values with standard property during the creation of xml file in km.
Please let me know how I can include the functionality for xml form builder edit form so that during creation of the file automatically will take the standard property values into custom properties.
Regards,
Rudradev -
SDM still not working with Java v6u15
I keep waiting for Java to work some day with their updates on Cisco SDM. Update 14 at least allowed SDM to open. But the new update 15 still hasn't passed the test of clicking on the Configure button and then the Additional Task button. It just doesn't do anything. If it is something that Cisco can fix, please be aware.
Thanks,
.. Jim ..Hi Jim, you need to downgrade the JAVA version on the computer you want to use SDM.
SDM does not support java after: 6u3.
Cisco SDM requires Sun Java Runtime Environment (JRE). The following versions are supported:
â¢JRE 1.5_09
â¢JRE1.4.2_08
â¢JRE 1.5.0_06
â¢JRE 1.5.0_07
â¢JRE 1.6.0_02
â¢JRE 1.6.0_03
As per the release notes.
http://www.cisco.com/en/US/docs/routers/access/cisco_router_and_security_device_manager/software/release/notes/SDMr25.html
This will resolve your issue.
Cisco does not plan to fix this as SDM is end of life.
The product that replaces SDM is CCP: Cisco Configuration Professional, that one works with JAva 6 update 14, but it's a different product. It's also a freeware you can download from our website. -
How can I develop co-broswing on Windows platform with java language?
How can I develop co-broswing on Windows platform with java language?
The function will be realized
Now I want to develop a co-broswing system with java language on Windows platform.That is to say I will develop
a application run on client to track the present browser.Wheh the URL address of your present if changed(for example
when you click a link or submit a form),the application will capture the new URL address and send it to the other
client that make co-browsing connect with you.The browser on the other client side will catch the new URL and refesh
the page to show the page.
The question I fall across and want to ask you
(1)How to watch system process with java on the Windows platform?Because I want to get the process information of
the present broswer,and then get the URL address of the present broswer.
(2)Develop an application to watch the URL address of the present broswer continuance,If the URL address is changed,
then send the new URL address to the client on the other side,let his broswer to show the new page using the new URL.Paulc, A proxy server is not the right thing.
What our man here is looking for is a solution for two
users to kind of surf the net "in tandem" - when one
user navigates to a different web page, so does the
other user,
These are typically used in call center applications
where the advisor guides a caller through , say
filling in an insurance form or pointing him to the
right product specification pages.
Xing, why are you using Java for this ? You need
something that has better windows integration. If you
look on MSDN.microsoft.com and search for "explorer
bar" you will find solutions to the questions that you
raised.
There are also commercial products on the market that
already do this kind of stuff. there is one from
www.genesyslabs.com which is considered to be the best
of breed.
It is difficult or almost impossible to do this in
Java for a commercial application.
If you are developing this as an academic exercise,
give it a try. Post your email address here, and I
will contact and help you out if you like.my e-mail is below ,I want to contact you and need all of your help.
[email protected] -
Configuration Adapter - CTC Property Sheet System Properties
Hii All
I am about to run the template installer for BI-Java. The values that pops up for back end BI are all not correct and went into the Visualadmin/services/configuratioadapter/CTC/property sheet sytem properties and found the the values in there are wrong and that is the reason it is not picking up in the NWA. I tried chaging the CTC properysheet with correct and restarted the instance but still NWA does not pick up those changed values. I was able to change the all the values in NWA manually and tried executing the template installer, it gave the below error.
Validation Error: Test SLD connection:It was not possible to test the SLD system (SLD_HOST) with the user (SLD_ADMIN) and its password given in the property sheet. Please verify and retype the values in the corresponding fields. You can also go to visual administrator -> "SID" -> Server xx -> Services -> Configuration adaptor -> CTC -> Propertysheet SystemProperties, make sure that the parameters related to SLD are correctly typed and rerun the template.
Though I was able to change all values whiile running the template installer, there was no option for SLD properties and that is there ony in proerty sheet. Please let me know the procedure to change the property sheet and get it reflected in the template installer.
FYI, the CIM test is working fine, and the webdynrpro SLD test is also working fine.
Had any body came across this situation. Please let me know.
Thanks, RajHi raj,
I am also facing same problem
"Validation Error: Test SLD connection:It was not possible to test the SLD system (SLD_HOST) with the user (SLD_ADMIN) and its password given in the property sheet. Please verify and retype the values in the corresponding fields. You can also go to visual administrator -> "SID" -> Server xx -> Services -> Configuration adaptor -> CTC -> Propertysheet SystemProperties, make sure that the parameters related to SLD are correctly typed and rerun the template."
can you help me to solve this problem.
My SLD system is different and my BI server is diffrent in BI visual administrator ;SLD host entry is correct only the SLD_ADMIN user which is in propertysheet of BI visual admin ( SLDDSUSER) has no any role and profile assign.
suggest how carry forword from this situation.
suggest if any one have solution for my problem.
Regards,
Ravi Ghangurde -
Configure CRS2008 to using AD and Kerberos with Java application servers.
Hi All,
I have configure CRS2008 to using AD and Kerberos with Java application servers. Domain Controller is installed on W2K3 Server. In addition, CRS2008 is installed on another W2k3 Server.
I have create service account in domain controller: CMSACC
I have create two user account: CRuser1 and CRuser2
I have create domain group: CRSGroup
After I had run the setspn in domain controller,I got the message at below:
Registered ServicePrincipalNames for CN=CMSACC, OU=TEST, DC=BD, DC=com:
BOBJCentralMS/BDMGTSRV.BD.com
CMC Setting:
AD Administration Name: BD\administrator
Default AD Domain: BD.com
Add AD Group(Domain\Group): secWinAD:CN=CRSGroup,OU=TEST,D=BD,DC=com
Service principal name:BOBJCentralMS/CMSACCatBD.com
I have create a WINNT folder in root directory.Moreover and save bcsLognin.conf and Krb5.ini at here.
bscLogin.conf:
com.businessobjects.security.jgss.initiate {
com.sun.security.auth.module.Krb5LoginModule required;
krb5.ini:
[libdefaults]
default_realm = BD.com
dns_lookup_kdc = true
dns_lookup_realm = true
[realms]
forwardable = true
BD.com = {
default_domain = BD.com
kdc = BDMGTSRV.BD.com
I have tested the Kerberos,using kinit CMSACCatBD.com password, and got error message at below:
Exception: krb_error 41 Message stream modified (41) Message stream modified
KrbException: Message stream modified (41)
at sun.security.krb5.KrbKdcRep.check(KrbKdcRep.java:53)
at sun.security.krb5.KrbAsRep.<init>(KrbAsRep.java:96)
at sun.security.krb5.KrbAsRep.getReply(KrbAsRep.java:486)
at sun.security.krb5.KrbAsRep.getReply(KrbAsRep.java:444)
at sun.security.krb5.internal.tools.Kinit.sendASRequest(Kinit.java:310)
at sun.security.krb5.internal.tools.Kinit.<init>(Kinit.java:259)
at sun.security.krb5.internal.tools.Kinit.main(Kinit.java:106)
My problem is failed to logon CMC and infoview and got error message at below:
Account Information Not Recognized: Active Directory Authentication failed to log you on. Please contact your system administrator to make sure you are a member of a valid mapped group and try again. If you are not a member of the default domain, enter your user name as UserNameatDNS_DomainName, and then try again.
Actually, I am sucessful to logon Business View manager with CRuser1. However, I fail to logon CMC and infoview and got the above error. Have you any suggestion to solve this problem?
Ken.if you can logon with client tools then that should be an indication that the service account running the CMS IS working! Good news.
So the problem is likely with the java portion (krb5/bsclogin or java options)
If the files are in c:\winnt\ (if not copy them there) and perform c:\program files\business objects\javasdk\bin\kinit username
then enter and password/enter again
Probably get the same message. To note in your krb5.ini all domain info must be in CAPS (the .com appears to be in lower case)
kinit works with just the krb5.ini, java SDK and AD (removing BO config and the service account from the picture). Once that works if your java options are specified properly you should be able to login to CMC/infoview.
also 1 last point. Add udp_preference_limit = 1 to the krb5 lib defaults section
libdefaults
default_realm = BD.com
dns_lookup_kdc = true
dns_lookup_realm = true
udp_preference_limit = 1
Regards,
Tim -
Configtool: Java System properties not customizable under Services
Hi SDN'ers,
We have a CE 7.11.5 environment.
When trying to change Java system porperties under Services for example, "com.sap.security.core.ume.service" and property "ume.ldap.access.multidomain.enabled" it is not mofifiable. The custom value can't be changed.
Also via the web interface via SAP NetWeaver Administrator > Configuration Management > Infrastructure and via Java System Properties, then the properties are not modifiable via the web.
The following properties show the same problem:
ume.ldap.access.additional_password.1
ume.ldap.access.additional_password.2
ume.ldap.access.additional_password.3
ume.ldap.access.additional_password.4
ume.ldap.access.additional_password.5
On other CE version's I have seen it is modifiable...
Can someone help?
Regards DriesHi,
These parmaters might be set to "final", Try browsing to the propertysheet via the configtool editor and check if the parameter is set to final.
Kind regards,
Cathal
Maybe you are looking for
-
Time machine backing up a second external hard drive
I currently have time machine backing up my imac to an external hard drive.I now want to back up a second external hard drive which contains all of my photographs to create some space on my imac. Can this be done and if it can how is this done? Thank
-
Flat File to Flat File scenario
Hi all, I have a flat file to flat file scenario. I pick up a file in a specific format and produce a flat file in tab delimited format after some mapping. Everything is ok. All the functionality is working perfectly. However, there is one small erro
-
Where to buy new plastic parts for laptop
Hi everyone, I have my laptop (HP Pavilion DV7 7020ec) for more than two years and because of the everyday use it has significantly scratched plastic parts around the display, on the back page and several other scratches all around its body part. Wha
-
i'm looking for simple example of alv with class (this is OO) and with events thanks
-
How do I turn off autocorrect in Mail?
In Mail, I would like to turn off autocorrect, which makes me say many ridiculous things! How do I do that? I've looked and looked and can't figure it out. Thanks!