all 20 comments

[–][deleted] 3 insightful - 2 fun3 insightful - 1 fun4 insightful - 2 fun -  (8 children)

Are you satisfied with this answer? https://stackoverflow.com/a/69135668

[–]fschmidt[S] 4 insightful - 2 fun4 insightful - 1 fun5 insightful - 2 fun -  (0 children)

Also worth noting is that the question is rated -2. I guess to get high rating from modern scum, one should ask a question like "How can I kiss Satan's ass?".

[–]fschmidt[S] 3 insightful - 2 fun3 insightful - 1 fun4 insightful - 2 fun -  (6 children)

No, the call to canAccess() itself produces a warning.

import java.lang.reflect.*;
import javax.net.SocketFactory;
import javax.net.ssl.SSLSocketFactory;

public class R {
    public static void main(String[] args) throws Exception {
        //System.out.println(sun.security.ssl.SSLSocketFactoryImpl.class); // doesn't work
        SocketFactory sf = SSLSocketFactory.getDefault();
        SSLSocketFactory.class.getMethod("getDefaultCipherSuites").invoke(sf);
        Class cls = sf.getClass();
        System.out.println(cls);
        System.out.println(Modifier.isPublic(cls.getModifiers()));
        Method m = cls.getMethod("getDefaultCipherSuites");
        System.out.println(m);
        System.out.println("isPublic "+Modifier.isPublic(m.getModifiers()));
        System.out.println("canAccess "+m.canAccess(sf));
        m.invoke(sf);  // here is the issue
        System.out.println("done");
    }
}

produces:

class sun.security.ssl.SSLSocketFactoryImpl
true
public java.lang.String[] sun.security.ssl.SSLSocketFactoryImpl.getDefaultCipherSuites()
isPublic true
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by R (file:/Users/fschmidt/tmp/java/) to method sun.security.ssl.SSLSocketFactoryImpl.getDefaultCipherSuites()
WARNING: Please consider reporting this to the maintainers of R
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
canAccess true
done

And canAccess() returns the wrong value.

[–][deleted] 3 insightful - 2 fun3 insightful - 1 fun4 insightful - 2 fun -  (5 children)

Well this is all sounding pretty fucked. Even if there is a clean way to do this in Java 9+ or whatever, it's sad that you have to spend so much effort on it. Maybe the Java is a bit over roasted.

[–]fschmidt[S] 3 insightful - 3 fun3 insightful - 2 fun4 insightful - 3 fun -  (4 children)

I don't really care about Java, or even programming. This is just another example illustrating that modern scum break everything they touch. It is only matter of time before the electrical grid and running water stop working. When will you recognize modern scum for what they are and reject modern culture?

[–][deleted] 2 insightful - 2 fun2 insightful - 1 fun3 insightful - 2 fun -  (3 children)

I hereby reject modern culture. Except for sushi.

[–]fschmidt[S] 2 insightful - 3 fun2 insightful - 2 fun3 insightful - 3 fun -  (1 child)

How dare you insult sushi, a traditional Japanese food? Of course modern culture is trying to destroy sushi with such abominations as the "Philadelphia Roll" and "California Roll". Please help defend sushi from modern culture by only frequenting traditional sushi establishments.

[–][deleted] 2 insightful - 2 fun2 insightful - 1 fun3 insightful - 2 fun -  (0 children)

I formally apologize to Japan. This reformed modern scum will be on the lookout for traditional sushi.

[–]PastorJohnny 1 insightful - 2 fun1 insightful - 1 fun2 insightful - 2 fun -  (0 children)

gay slang for pussy is "fish".. just fyi..

[–]filbs111 2 insightful - 2 fun2 insightful - 1 fun3 insightful - 2 fun -  (4 children)

https://www.reddit.com/r/java/ in the page header states: "No programming help, no learning Java", and on the right hand side of the page, states: "NO programming help, NO learning Java related questions"

Reddit leaves something to be desired, both here and generally. However, taking the time to post something to reddit and expecting a useful answer might be considered a foolish exercise.

try: https://www.javaprogrammingforums.com/ https://coderanch.com/c/java

[–]fschmidt[S] 3 insightful - 2 fun3 insightful - 1 fun4 insightful - 2 fun -  (3 children)

StackOverflow answered my question well enough in the follow-up comments. The conclusion is that the warnings don't even match the required behavior. In other words, I will stick with Java 8 since modern scum totally ruined later versions of Java.

[–]MONKEYBALLS 3 insightful - 3 fun3 insightful - 2 fun4 insightful - 3 fun -  (2 children)

i coded a few java applications and a few applets.

as a c language programmer with thirty years of experience, i found the language to be promising but i also found it to be riddled with problems.

[–]fschmidt[S] 2 insightful - 2 fun2 insightful - 1 fun3 insightful - 2 fun -  (1 child)

I thought you blocked me?

Anyway, what problems did you find with Java?

[–]MONKEYBALLS 2 insightful - 3 fun2 insightful - 2 fun3 insightful - 3 fun -  (0 children)

hey, reality check.. why would anybody want to block anybody? it makes no sense at all.. even people that i find to be really offensive, i would never block them, because i enjoy reading their bullshit even tho i do think that i cant agree with them..

no offense was intended, i see that you are really fond of your java... i am a c coder since 1991 and have been coding since 1983.. java has some very nice capabilities, but i dont think it is a language that is going to hang for much longer.. but what do i know? i dont know shit..

i only hope you are having a good time.

[–][deleted]  (1 child)

[removed]

    [–]fschmidt[S] 1 insightful - 2 fun1 insightful - 1 fun2 insightful - 2 fun -  (0 children)

    The ruling class will cull the 99% by using abortion, suicide, starvation, war, and concentration camps.

    Thank God

    [–]PastorJohnny 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (3 children)

    solve all of your java headaches: https://www.codeblocks.org/

    [–]fschmidt[S] 2 insightful - 2 fun2 insightful - 1 fun3 insightful - 2 fun -  (2 children)

    I see how this works. Using it would drive me to suicide, thereby eliminating all of my headaches.

    [–]andrewblanchard 2 insightful - 2 fun2 insightful - 1 fun3 insightful - 2 fun -  (0 children)

    You are doing fine with java.

    [–]PastorJohnny 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (0 children)

    stick with your java and dont commit suicide.