User Profile

Collapse

Profile Sidebar

Collapse
hsn
hsn
Last Activity: Mar 1 '09, 09:40 AM
Joined: Sep 28 '07
Location: Dubai-UAE
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • hsn
    replied to System Time
    in Java
    hello there
    i have a solution for you
    check out the calender class it will be very useful you can use it to check the date and the time.

    best regards
    hsn
    See more | Go to post

    Leave a comment:


  • hsn
    replied to need help with my senior project
    in Java
    i will respond to what i understood.
    don't include a server name in the program, include its ip address, to make sure that it doesn't change later, set the server to a static IP address.

    A question, are you trying to create a chatting service? if so, use the Socket class and the ServerSocket class to implement your service.

    and read this tutorial, i think it may help.
    Lesson 1: Socket Communications
    ...
    See more | Go to post

    Leave a comment:


  • hsn
    replied to Comparing Elements in an Array
    in Java
    can you at least post you code please or your algorithm. so we could help you
    See more | Go to post

    Leave a comment:


  • hsn
    replied to run "sudo -i" command in java
    in Java
    hello Jos. i have done the foloowing code

    Code:
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.io.OutputStreamWriter;
    
    
    public class tests implements Runnable {
    	
    	private static Process p,p2;
    	private static Runtime rt;
    ...
    See more | Go to post

    Leave a comment:


  • hsn
    replied to run "sudo -i" command in java
    in Java
    first of all, please remove the commented areas the /* and */
    also, what i think the issue is that when you use this code with the sudo -i command the program pauses at line number 16. i checked it out it is not because of the while loop, if you remove the while loop the same issue will stay.

    regards
    hsn
    See more | Go to post

    Leave a comment:


  • hsn
    started a topic run "sudo -i" command in java
    in Java

    run "sudo -i" command in java

    hello everyone. i am trying to run the sudo -i command in my mac.
    here is the code
    Code:
    	   String s = null;
    
    
            try {
                
    	   
                
                p = Runtime.getRuntime().exec(str);
                
                stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));
                stdError = new BufferedReader(new InputStreamReader(p.getErrorStream()));
    ...
    See more | Go to post

  • hsn
    replied to Can't figure out why nothing shows
    in Java
    well, that is common issue with new programmers, your createAndShowGU I() function doesn't call any function. so your main call that function and then stops.

    kind regards
    hsn
    See more | Go to post

    Leave a comment:


  • hsn
    replied to Getting Return Error
    in Java
    there must be a return value outside the if statement. so if the program didn't enter the if statement there is a return .

    regards
    hsn
    See more | Go to post

    Leave a comment:


  • hsn
    replied to Finding Posistion of array elements
    in C
    as vmpstr said.
    when u find your value print its index.
    pretty straight forward.

    hsn
    See more | Go to post

    Leave a comment:


  • hsn
    replied to Confirm email box
    it is a simple function in php with java script. but shouldn't you post your question in a php forum???

    kind regards
    hsn
    See more | Go to post

    Leave a comment:


  • hsn
    replied to java jdk 1.6 for mac
    in Java
    thanks Jos
    do you know the reason which makes mac do that?
    See more | Go to post

    Leave a comment:


  • hsn
    started a topic java jdk 1.6 for mac
    in Java

    java jdk 1.6 for mac

    hello everyone.
    i got really sick of windows vista. so i decided to by a mac os X 1.5.5
    when i started working in it the java version "1.5.0_16" i have been trying for the last day to download jdk 1.6 but i don't know how to do that in mac. it is so easy in windows but not that simple to find it for mac.

    if someone can please point me to the right direction i would be grateful.

    kind regards...
    See more | Go to post

  • hsn
    started a topic registry issue

    registry issue

    hello everyone.
    i am trying to enable or disable the proxy in my vista os.
    i have the command right here.
    reg add HKEY_CURRENT_US ER\Software\Mic rosoft\Windows\ CurrentVersion\ Internet Settings /v ProxyEnable /t REG_DWORD /d 0 /f

    /d 0 /f for enabling the auto proxy
    /d 1 /f for disabling the auto proxy settings.

    the reg key is fine and it is working the problem is when i enter this command...
    See more | Go to post

  • hsn
    replied to system.setproperty problem
    in Java
    thanks Jos. at least now i know how useful are setproperties
    See more | Go to post

    Leave a comment:


  • hsn
    replied to system.setproperty problem
    in Java
    hello Jos.
    i have tried your advice. i was able to use -D and the data was changed.
    but then when i try to run the program again just to make sure that the data were saved, but the proxy was returned to Direct.
    See more | Go to post

    Leave a comment:


  • hsn
    replied to system.setproperty problem
    in Java
    hello Jos.
    i have never used the terminal to run java code. after u posted you reply, i search online and i learned it.
    after compiling the java code i enter this command

    java MainTest -D http.proxyHost= "yahoo.com" -D http.proxyPort= 999

    is this the correct syntax??

    hsn
    See more | Go to post

    Leave a comment:


  • hsn
    replied to system.setproperty problem
    in Java
    if someone else knows who to set the proxy in the computer so it could be used by the browsers in a different way. please help

    hsn
    See more | Go to post

    Leave a comment:


  • hsn
    replied to batch file problem
    i entered this command in a run after
    Code:
    cmd /k
    could that be a reason.

    hsn
    See more | Go to post

    Leave a comment:


  • hsn
    started a topic system.setproperty problem
    in Java

    system.setproperty problem

    hello everyone.
    i am trying to use the system.setprope rty to set the proxy in my computer.

    Code:
    public static void main(String[] args) {
    	
    	// TODO Auto-generated method stub
    	
    	
    		System.setProperty("http.proxyHost","192.222.222.2");
    		System.setProperty("http.proxyPort","808");
    		System.setProperty("http.nonProxyHosts","yahoo.com");
    ...
    See more | Go to post

  • hsn
    started a topic batch file problem

    batch file problem

    hello everyone.
    i am working on some batch files for windows.
    i created a batch file which includes the following command
    Code:
    netsh interface ip set address "Local Area Connection" dhcp
    this command works when i run it in dos, but when i run through the batch file an error appears saying
    Code:
    invalid source parameter <Area>.
    this error is so strange, when i run this...
    See more | Go to post
    Last edited by Nepomuk; Nov 21 '08, 11:12 PM. Reason: Added [CODE] tags
No activity results to display
Show More
Working...