Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #39148 > unrolled thread

Re: Surprise!

Started byMartin Gregorie <martin@mydomain.invalid>
First post2019-09-19 20:47 +0000
Last post2019-09-20 19:01 -0400
Articles 6 — 4 participants

Back to article view | Back to comp.lang.java.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Surprise! Martin Gregorie <martin@mydomain.invalid> - 2019-09-19 20:47 +0000
    Re: Surprise! Eric Douglas <e.d.programmer@gmail.com> - 2019-09-19 14:01 -0700
      Re: Surprise! Martin Gregorie <martin@mydomain.invalid> - 2019-09-19 23:18 +0000
        Re: Surprise! Knute Johnson <groups@585ranch.com> - 2019-09-19 20:03 -0500
        Re: Surprise! Eric Douglas <e.d.programmer@gmail.com> - 2019-09-20 08:03 -0700
          Re: Surprise! Arne Vajhøj <arne@vajhoej.dk> - 2019-09-20 19:01 -0400

#39148 — Re: Surprise!

FromMartin Gregorie <martin@mydomain.invalid>
Date2019-09-19 20:47 +0000
SubjectRe: Surprise!
Message-ID<qm0pgn$h50$1@dont-email.me>
On Thu, 19 Sep 2019 19:28:50 +0000, Stefan Ram wrote:

> Write this:
> 
> public final class A { public static void main( final java.lang.String[]
> args )
>   { B.hello(); }}
> 
> public final class B { public static void hello()
>   { java.lang.System.out.println( "Hello!" ); }}
> 
>   and save it as "Main.java". Then call:
> 
> java Main.java
> 
>   with a recent JDK. What you have there is a file named "Main.java"
>   that does /not/ contain a class "Main", and it has /two/ public
>   classes. Yet, the above command will happily print,
> 
> Hello!
> 
>
Not with the latest Open JDK 1.8 it doesn't: this just complains the A 
should be on A.java and B should be in B.java

Maybe later Java versions removed the "ClassName == ClassName.java" and 
"public static void main(String[])" requirements to make scripting easier?


-- 
Martin    | martin at
Gregorie  | gregorie dot org

[toc] | [next] | [standalone]


#39149

FromEric Douglas <e.d.programmer@gmail.com>
Date2019-09-19 14:01 -0700
Message-ID<de9d18a6-87b9-4eb1-b320-e5bd01e69c62@googlegroups.com>
In reply to#39148
On Thursday, September 19, 2019 at 4:47:31 PM UTC-4, Martin Gregorie wrote:
> On Thu, 19 Sep 2019 19:28:50 +0000, Stefan Ram wrote:
> 
> > Write this:
> > 
> > public final class A { public static void main( final java.lang.String[]
> > args )
> >   { B.hello(); }}
> > 
> > public final class B { public static void hello()
> >   { java.lang.System.out.println( "Hello!" ); }}
> > 
> >   and save it as "Main.java". Then call:
> > 
> > java Main.java
> > 
> >   with a recent JDK. What you have there is a file named "Main.java"
> >   that does /not/ contain a class "Main", and it has /two/ public
> >   classes. Yet, the above command will happily print,
> > 
> > Hello!
> > 
> >
> Not with the latest Open JDK 1.8 it doesn't: this just complains the A 
> should be on A.java and B should be in B.java
> 
> Maybe later Java versions removed the "ClassName == ClassName.java" and 
> "public static void main(String[])" requirements to make scripting easier?
> 
> 
> -- 
> Martin    | martin at
> Gregorie  | gregorie dot org

That does work on mine, using OpenJDK 11.0.4.11, though Eclipse still complains.

[toc] | [prev] | [next] | [standalone]


#39151

FromMartin Gregorie <martin@mydomain.invalid>
Date2019-09-19 23:18 +0000
Message-ID<qm12bn$2m1$1@dont-email.me>
In reply to#39149
On Thu, 19 Sep 2019 14:01:01 -0700, Eric Douglas wrote:

> 
> That does work on mine, using OpenJDK 11.0.4.11, though Eclipse still
> complains.

Yes, pretty what I thought it might do from Java 9 onward. 

As I said, I'm on the latest version of java-1.8.0-openjdk.x86_64 which
was installed on 31 July 2019.

JDK 11 and 12 are available as, respectively stable and rolling versions, 
so it looks as though Fedora Linux has skipped, or already droped, 9.


-- 
Martin    | martin at
Gregorie  | gregorie dot org

[toc] | [prev] | [next] | [standalone]


#39152

FromKnute Johnson <groups@585ranch.com>
Date2019-09-19 20:03 -0500
Message-ID<qm18hg$2di$1@dont-email.me>
In reply to#39151
On 9/19/2019 6:18 PM, Martin Gregorie wrote:
> On Thu, 19 Sep 2019 14:01:01 -0700, Eric Douglas wrote:
> 
>>
>> That does work on mine, using OpenJDK 11.0.4.11, though Eclipse still
>> complains.
> 
> Yes, pretty what I thought it might do from Java 9 onward.
> 
> As I said, I'm on the latest version of java-1.8.0-openjdk.x86_64 which
> was installed on 31 July 2019.
> 
> JDK 11 and 12 are available as, respectively stable and rolling versions,
> so it looks as though Fedora Linux has skipped, or already droped, 9.
> 
> 

Java 13 is available in the ubuntu repositories, probably will be in 
Fedora soon.

[toc] | [prev] | [next] | [standalone]


#39153

FromEric Douglas <e.d.programmer@gmail.com>
Date2019-09-20 08:03 -0700
Message-ID<750e9b2d-2fad-4763-a86b-429f3e8fcfa2@googlegroups.com>
In reply to#39151
On Thursday, September 19, 2019 at 7:18:25 PM UTC-4, Martin Gregorie wrote:
> 
> JDK 11 and 12 are available as, respectively stable and rolling versions, 
> so it looks as though Fedora Linux has skipped, or already droped, 9.
> 

Nobody likes 9, 9 is dead.  I have an API that was made for 8, tried compiling in 9, got nothing but headaches.  A couple months ago when I heard about 8 officially dying (as no more new 'free for commercial use' versions from the Oracle site) I decided we ought to test 11 (the latest LTS version) and it went pretty smooth.

The new Java map, every 3rd version is supposed to be LTS?  Not sure how long we're going to want 11 then, when exactly we'll want or need a newer one.

[toc] | [prev] | [next] | [standalone]


#39154

FromArne Vajhøj <arne@vajhoej.dk>
Date2019-09-20 19:01 -0400
Message-ID<qm3lnh$1i0d$1@gioia.aioe.org>
In reply to#39153
On 9/20/2019 11:03 AM, Eric Douglas wrote:
> On Thursday, September 19, 2019 at 7:18:25 PM UTC-4, Martin Gregorie wrote:
>>
>> JDK 11 and 12 are available as, respectively stable and rolling versions,
>> so it looks as though Fedora Linux has skipped, or already droped, 9.
>>
> 
> Nobody likes 9, 9 is dead.  I have an API that was made for 8, tried
> compiling in 9, got nothing but headaches.  A couple months ago when
> I heard about 8 officially dying (as no more new 'free for commercial
> use' versions from the Oracle site) I decided we ought to test 11
> (the latest LTS version) and it went pretty smooth. >
> The new Java map, every 3rd version is supposed to be LTS?  Not sure
> how long we're going to want 11 then, when exactly we'll want or need
> a newer one.
Only LTS versions are relevant for most users.

I believe that the original statement was that every third
release would be LTS aka every 18 months.

But current statement seems to be that LTS is every 3 years
aka every 6th release.

If I understood that correct then 11 LTS will be followed by 17 LTS
in September 2021.

An honestly - looking at new features list in recent new versions
of Java, the waiting 6 releases for a LTS somewhat make sense as
3 releases would simply have too little new stuff.

Arne

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web