File tree 2 files changed +23
-3
lines changed
src/us/deathmarine/luyten
2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 1
1
package us .deathmarine .luyten ;
2
2
3
+ import java .io .BufferedReader ;
3
4
import java .io .File ;
5
+ import java .io .InputStreamReader ;
4
6
import javax .swing .SwingUtilities ;
5
7
import javax .swing .UIManager ;
6
8
10
12
public class Luyten {
11
13
12
14
public static void main (String [] args ) {
15
+
13
16
try {
14
17
UIManager .setLookAndFeel (UIManager .getSystemLookAndFeelClassName ());
15
18
} catch (Exception e ) {
@@ -42,4 +45,21 @@ public static File getFileFromCommandLine(String[] args) {
42
45
}
43
46
return fileFromCommandLine ;
44
47
}
48
+
49
+ public static String getVersion (){
50
+ String result = "" ;
51
+ try {
52
+ String line ;
53
+ BufferedReader br = new BufferedReader (new InputStreamReader (ClassLoader .getSystemResourceAsStream ("META-INF/maven/us.deathmarine/luyten/pom.properties" )));
54
+ while ((line = br .readLine ())!= null ){
55
+ if (line .contains ("version" ))
56
+ result = line .split ("=" )[1 ];
57
+ }
58
+ br .close ();
59
+ } catch (Exception e ) {
60
+ return result ;
61
+ }
62
+ return result ;
63
+
64
+ }
45
65
}
Original file line number Diff line number Diff line change @@ -461,9 +461,9 @@ public void actionPerformed(ActionEvent e) {
461
461
@ Override
462
462
public void actionPerformed (ActionEvent event ) {
463
463
JOptionPane .showMessageDialog (null ,
464
- "Luyten Gui \n " +
465
- "by Deathmarine, Zerdei\n \n " +
466
- "Powered By\n Procyon " +Procyon .version ()+
464
+ "Luyten " + Luyten . getVersion () +
465
+ "\n by Deathmarine, Zerdei\n \n " +
466
+ "Powered By\n Procyon " + Procyon .version ()+
467
467
"\n (c) 2015 Mike Strobel\n \n " +
468
468
"RSyntaxTextArea\n " +
469
469
"(c) 2012 Robert Futrell\n " +
You can’t perform that action at this time.
0 commit comments