Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

23
LINES

< > BotCompany Repo | #1009124 // Add JavaX To Start Menu (Linux, WORKS)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (3080L/18K).

1  
!7
2  
3  
// ...at least when your Linux even HAS a start menu
4  
5  
p {
6  
  File apps_dir = linuxStartMenuApplicationsFolder();
7  
  File file = new File(apps_dir, "javax.desktop");
8  
  File javaxPath = javaxJarPath();
9  
  print("Writing " + file);
10  
  saveTextFile(file,
11  
    "    [Desktop Entry]\n" +
12  
    "    Version=1.0\n" +
13  
    "    Name=JavaX\n" +
14  
    "    Name[en_US]=JavaX\n" +
15  
    "    Comment=JavaX Runner\n" +
16  
    "      Exec=java -jar " + javaxPath.getAbsolutePath() + "\n" +
17  
    "    Icon=\n" +
18  
    "      Terminal=false\n" +
19  
    "    Type=Application\n" +
20  
    "    Encoding=UTF-8\n" +
21  
    "    Categories=Accessories;Development;\n");
22  
  print("Done!");
23  
}

Author comment

Began life as a copy of #1003662

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1009124
Snippet name: Add JavaX To Start Menu (Linux, WORKS)
Eternal ID of this version: #1009124/11
Text MD5: a27f5fe150e60f1244b62288c1d7db46
Transpilation MD5: 1a6b8be015d218a066ea8accaaa14285
Author: stefan
Category: javax / gui
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-05-17 12:40:23
Source code size: 668 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 545 / 1314
Version history: 10 change(s)
Referenced in: [show references]