CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: AlbertGM

Page 1 of 15 1 2 3 4

Search: Search took 0.07 seconds.

  1. Thread: help

    by AlbertGM
    Replies
    3
    Views
    965

    Re: help

    Hi,

    Are you aware this is a Java forum, and your code doesn't look like.

    By the way, could you format your post in a way that we can see what your problem is and what you already tried? It's...
  2. Replies
    2
    Views
    801

    Re: import/package beginner's problems

    Hi,
    It depends on what you are trying to do.

    It seems you want a class Second in one location (./net/sssw/test) and the other HelloDate in another (./).
    In such case it won't work, unless...
  3. Re: How to insert the value inside an array's cell into a char variable?

    Hi,
    You can't switch on char arrays, and if you are using a JRE version prior to Java7 not even on Strings.
    So, you can't do:

    switch (cArray) {[....]}
    Look at this site

    Try something like:
  4. Replies
    3
    Views
    1,191

    Re: serious help needed, java code

    I think you almost get it, just fix syntax in System.out.print, and do it after read all variables, because you can't use a variable before being declared.

    For example, assuming you already read...
  5. Re: Help: Proxy authentication and multiple proxies connection

    Try this... I guess this could work...



    HttpClient httpClient = new HttpClient();

    HostConfiguration config = client.getHostConfiguration();
    config.setProxy(proxyUrl, proxyPort);
    ...
  6. Replies
    3
    Views
    6,046

    Re: Use string contains for multiple checks

    Something like this should work:


    Pattern p = Pattern.compile("[?!]");
    Matcher m = p.matcher(value);

    if (m.find()) {
    System.out.println("value = " + value + " matches");
    }
    else {
  7. Thread: Send_Email

    by AlbertGM
    Replies
    5
    Views
    1,433

    Re: Send_Email

    Hi,

    I have never used that library. I use to work with Java Mail to send e-mails.

    You are right, watching javadoc, it looks like there is no method setSSLOnConnect. Although I know nothing...
  8. Thread: Send_Email

    by AlbertGM
    Replies
    5
    Views
    1,433

    Re: Send_Email

    Hi,

    Eclipse always (almost) gives an explanation about why a program doesn't compile in 'problems' tab. So, first read it.
    If you still don't have a clue, post the error compiler says. With...
  9. Replies
    2
    Views
    629

    Re: Throwing string exception with integers

    This seems homework. Please, read this

    We are here to help, not to do your homework. If we give you the answer, you'll never learn. Tell us what you tried, what you don't understand or where you...
  10. Replies
    2
    Views
    754

    Re: Constructor not being called

    I think you made a perfect explanation.

    Expression
    Num [] x = new Num[7] only tells de JVM to allocate a block of contiguous memory. Num constructor is NOT called.

    Albert.
  11. Re: Printing literal quotes with strings and variables

    System.out.println("Case \"" + caseNum + "\""); Regards,

    Albert.
  12. Replies
    1
    Views
    582

    Re: Responses from UDP Server

    Hi,

    First of all: Please, use code tags properly. Learn how to use here. Click on "preview post" to ensure.

    1) To read port from command line, just read args parameter:
    public static void...
  13. Re: Reversing letters of a words in a sentence keeping the words in the same order

    Hi,


    System.out.println("Reversing the words in the sentence: " + original + ", looks like: " + newSentence );
    newSentence is an array of Strings. It doesn't use toString() method of String...
  14. Replies
    3
    Views
    8,884

    Re: Error: Could not find or load main class

    Hi,
    You are right, this error happens when you try to run a compiled java class using an older JRE. You always can check major and minor version of a compiled java class using "javap -verbose"...
  15. Replies
    3
    Views
    8,884

    Re: Error: Could not find or load main class

    Did it work before cleaning your workspace? Occasionally eclipse gets crazy, so try to restart it.
    It's difficult to say without any other information.
    You can also click on run manager (Button...
  16. Replies
    2
    Views
    6,541

    Re: edit .conf file in /etc linux (java SE)

    Are you talking about an Apache HTTP Server, right?
    To find out where is located you can check using "httpd -V", or "ps auxww | grep httpd", to know where the process is running.
    Config file is...
  17. Replies
    2
    Views
    783

    Re: Polymorphism without inheritance in java

    Can't you be a little more specific?
    I don't want to be rude, but if you know nothing about a concept you should first read a manual or a book and then, ask what you don't understand, don't you...
  18. Replies
    1
    Views
    6,486

    Re: mean, median and mode problem

    Hi,

    You only have to check each value read. For example:
    [...]
    for (int i = 0; i < num.length; i++, size++) {
    System.out.println("Enter a number: ");
    num[i] = nums.nextInt();
    if (num[i]...
  19. Replies
    3
    Views
    2,358

    Re: Socket Programming over the Internet

    Understood.
    I guess it's just a communication problem, which I'm not sure if I can answer.
    Nevertheless, as far as I know, the reason why you can't connect could be:
    The internet route from...
  20. Replies
    3
    Views
    2,358

    Re: Socket Programming over the Internet

    Hi,

    If your server runs on 192.168.1.100, why your client tries to connect to 112.134.190.41?

    s=new Socket("112.134.190.41",9999);

    Albert.
  21. Replies
    0
    Views
    1,547

    Understanding encoding

    Hi all,

    Part of my code have to send an email written in Spanish or Catalan, depending of language selected. Both languages have accents and other non-ASCII (7bit) printable characters. That's why...
  22. Replies
    1
    Views
    3,663

    Re: Jsch invoking multiple unix commands

    I think, I don't get it. Your list has more than 500 commands, right? Each command sleeps 1 sec, right? I takes more than 500 secs. So, what's the problem?

    Post the code.... I guess it's the best...
  23. Replies
    1
    Views
    3,964

    Re: How to use Map

    There are no templates in Java 1.4, which are called 'Generics'. They are part of Java 1.5.

    What do you mean by "What is objects?"? There are thousands of sites to find out how to use a Map. ...
  24. Replies
    2
    Views
    885

    Re: Java Compiling Help

    Hi,
    Did you really download developer (JDK) version? In user version (JRE) there is no 'javac' command.
    javac use to be located in $JAVA_HOME/bin (&#37;JAVA_HOME%/bin in Windows), so you should add...
  25. Replies
    4
    Views
    2,799

    Re: Sign a jar file in JDK 6.0_U32

    Try tools.jar in $JAVA_HOME/lib using JDK_1_5_22. I'm not sure using Java 6.

    Regards,
    Albert.
Results 1 to 25 of 368
Page 1 of 15 1 2 3 4





Click Here to Expand Forum to Full Width

Featured