Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (529)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Why do jar files not have icons?  (Read 3332 times)
0 Members and 1 Guest are viewing this topic.
Offline wessles

JGO Wizard


Medals: 64
Projects: 4
Exp: 3 years


Radirius Software Developer


« Posted 2013-06-18 02:53:54 »

I just hate that generic page with a java icon on it icon. How do I get rid of it and place another? Can I? I just do not want to use .exe or make a shortcut. Is there no other way? And lastly on my long list of questions, why would they not let you?

Offline heisenbergman

JGO Coder


Medals: 14


L___ o_ G___ a__ P___


« Reply #1 - Posted 2013-06-18 03:03:52 »

I don't think you change the icon of an individual JAR file. You'll have to change the settings for that file type (*.jar) in your operating system and then all JAR files will be displayed with that icon.

To change the icon of an individual JAR I think you'll need to create a shortcut.

At least that's what I read after Googling "change jar file icon"...

Offline nhydock

Junior Member


Medals: 4
Projects: 2



« Reply #2 - Posted 2013-06-18 03:09:17 »

Jars are just archived files, much like a zip.  Executables can have independent icons because they're defined in the bit specifications for them.  Most other file formats have their icon assigned by the operating system.

You can create native binary executables for each platform and assign the icons within those, much like Eclipse has for itself.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline wessles

JGO Wizard


Medals: 64
Projects: 4
Exp: 3 years


Radirius Software Developer


« Reply #3 - Posted 2013-06-18 03:14:19 »

How would I create a binary executable? WAIT! Is that just fancy smanschy coder nurd talk for .exe? No thank you. That ruins the point of java, to run on anything that runs java. Thanks anyways.
MEDALS +1

Offline ra4king

JGO Kernel


Medals: 336
Projects: 2
Exp: 5 years


I'm the King!


« Reply #4 - Posted 2013-06-18 03:19:21 »

No it doesn't. You distribute your JAR for other platforms, and then wrap the JRE and the JAR in a cute little EXE for Windows. That's how it's done.

Offline wessles

JGO Wizard


Medals: 64
Projects: 4
Exp: 3 years


Radirius Software Developer


« Reply #5 - Posted 2013-06-18 03:20:27 »

But what about macs and linux and stuff? Do they have their own .exe file, or is it universal? And thanks too.

Offline Troncoso

JGO Coder


Medals: 20



« Reply #6 - Posted 2013-06-18 03:25:24 »

Mac has app files that can have a custom icon and Linux has .sh files which I believe can have a custom icon. JarSplicer can make all of these for you, including the .exe.
Offline NegativeZero

JGO Knight


Medals: 30
Projects: 2
Exp: 3 years


Zero but not.


« Reply #7 - Posted 2013-06-18 03:58:37 »

Since you expressed your interest for the game, I believe this is the way MineCraft does it. It still runs with the JVM, but it is opened (wrapped) through a .exe.
Offline wessles

JGO Wizard


Medals: 64
Projects: 4
Exp: 3 years


Radirius Software Developer


« Reply #8 - Posted 2013-06-18 04:00:53 »

Mac has app files that can have a custom icon and Linux has .sh files which I believe can have a custom icon. JarSplicer can make all of these for you, including the .exe.
Thank you, I am sorry for my ignorance. I have only used a windows. Literally, never willingly used a mac/linux.

Since you expressed your interest for the game, I believe this is the way MineCraft does it. It still runs with the JVM, but it is opened (wrapped) through a .exe.
Cross-threads? Awesome! Thank you. Now that I know that minecraft does it...

Offline Agro
« Reply #9 - Posted 2013-06-18 04:01:15 »

Macs use DMG files - they're platform executable. Linux doesn't exactly have one... We're cool. Tongue .SH files are just shell files(scripts). Names don't matter in linux really.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 128
Projects: 4
Exp: 3 years



« Reply #10 - Posted 2013-06-18 04:24:26 »

Yes, always create platform-specific executables for a wora language...sigh why can't consumers be smarter
Offline ReBirth
« Reply #11 - Posted 2013-06-18 04:38:27 »

Linux users need no icon. We know how to execute your game with java -jar.

Offline CodeHead

JGO Coder


Medals: 40


From rags to riches...to rags.


« Reply #12 - Posted 2013-06-18 04:40:52 »

Linux does have .desktop files that let you specify an icon along with various other meta data about the application.

Arthur: Are all men from the future loud-mouthed braggarts?
Ash: Nope. Just me baby...Just me.
Offline wessles

JGO Wizard


Medals: 64
Projects: 4
Exp: 3 years


Radirius Software Developer


« Reply #13 - Posted 2013-06-18 04:54:52 »

So which should I use? For Linux. .sh, or what?

Offline CodeHead

JGO Coder


Medals: 40


From rags to riches...to rags.


« Reply #14 - Posted 2013-06-18 04:58:44 »

The .sh file for most Java applications is akin to a Windows .bat file. It sets up environment variables, and generally passes the full command line to the shell instead of making the user type "java -jar <app name>". The .desktop file is more like the shortcut files for Windows. They contain the icon, the application name, and the file to run (usually the aforementioned .sh file). A complete package would contain both types of files.

Arthur: Are all men from the future loud-mouthed braggarts?
Ash: Nope. Just me baby...Just me.
Offline Troncoso

JGO Coder


Medals: 20



« Reply #15 - Posted 2013-06-18 05:02:50 »

I only specified shell script files because that's what JarSplicer can generate. I'm with Rebirth. When I'm on Linux, I'm using the terminal.
Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 128
Projects: 4
Exp: 3 years



« Reply #16 - Posted 2013-06-18 05:13:09 »

Linux users need no icon. We know how to execute your game with java -jar.
Yeah, I suppose that's right.
Offline CodeHead

JGO Coder


Medals: 40


From rags to riches...to rags.


« Reply #17 - Posted 2013-06-18 05:37:53 »

I like the terminal too, but your game's distribution should cater to the lowest common denominator. There are people who are new to Linux who still have no clue about how to do everything/anything through the shell. Providing them with a means to use your application through the GUI without the need to learn about the CLI and java command line invocation isn't a bad idea. Remember, if you're writing games, your target audience most likely isn't other developers, and the fewer barriers you create for the end user, the more likely they are to use/purchase your application. Even if you include a .sh and/or a .desktop file in your distribution, there is nothing to stop an advanced user from running the application from the CLI. The same possibility exists under Windows as well, though it's certainly not geared for it.

If the Linux community wants to attract new users, we as developers have to make things as approachable as possible for end users of every level. Wink

Arthur: Are all men from the future loud-mouthed braggarts?
Ash: Nope. Just me baby...Just me.
Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 128
Projects: 4
Exp: 3 years



« Reply #18 - Posted 2013-06-18 07:30:44 »

If the Linux community wants to attract new users, we as developers have to make things as approachable as possible for end users of every level. Wink
I always thought the appeal of linux was using something that most people wouldn't put up with Smiley
Offline CodeHead

JGO Coder


Medals: 40


From rags to riches...to rags.


« Reply #19 - Posted 2013-06-18 07:41:55 »

I always thought the appeal of linux was using something that most people wouldn't put up with Smiley

Odd. I thought that was the point of using Windows. LOL Joking aside, I do understand the "mystique" of CLI incantations, and having a level of mastery over a system that is a mystery to many. Linux has made leaps and bounds in way of end user experience over the years, even if there are still plenty of rough edges to get cut on. While I don't advocate removing all of those wonderful tricks and applications that endear Linux to power users, there's nothing wrong with trying to add a little polish to the overall package. Grin

Arthur: Are all men from the future loud-mouthed braggarts?
Ash: Nope. Just me baby...Just me.
Offline Agro
« Reply #20 - Posted 2013-06-18 07:46:28 »

Yeah I think the point of Linux is to have things for more advanced users. But I guess as the world advances, people will too, and Linux will become more mainstream(as it has with Ubuntu). Onward to BSD!

Offline Damocles
« Reply #21 - Posted 2013-06-18 12:24:42 »

For Linux ist more important to add a readme.txt than an icon.

Its hard enough for a casual user to run something on linux,
so you should include some small explanations.

even running a *.sh file can get complicated and requires enough knowledge to run it
(chaning the permissions)
Should be mentioned in the readme.txt for the casual user.

Offline Troncoso

JGO Coder


Medals: 20



« Reply #22 - Posted 2013-06-18 14:39:40 »

A person running Linux who doesn't know Linux, is generally not going to continue using it. That being said, I don't think anyone is going to install Linux for the purpose of trying out our Java games, when they don't have enough experience even to figure out how to run them in the first place.

One thing I enjoy is making Windows games work on Linux. It can be challenging as hell, but for whatever reason, it's pretty satisfying when you have the game up and running....and then close it because you don't actually want to play it.
Offline Zhon

Junior Member


Medals: 4



« Reply #23 - Posted 2013-06-18 14:50:40 »

Try launch4j. Creates an universal exe for AFAIK all major plataforms.
Offline Damocles
« Reply #24 - Posted 2013-06-18 15:14:52 »

Quote
A person running Linux who doesn't know Linux, is generally not going to continue using it.

Thats the reason why Linux has maybe 2% market-share on the desktop, and Ubuntu became the
biggest distro after others where on the market for years.
(The reason beeing Linux-freaks who dont grasp the concept of end-user usability)

Offline Troncoso

JGO Coder


Medals: 20



« Reply #25 - Posted 2013-06-18 15:15:36 »

Try launch4j. Creates an universal exe for AFAIK all major plataforms.

A jar file is a universal executable...
Offline Damocles
« Reply #26 - Posted 2013-06-18 15:18:01 »

Hm, how do you manage to put the JVM into the jar?

The jar file is just a container for the application that has to be correctly loaded/executed by the JVM.

If the JVM is not set up propperly, the jar file cant be executed with a simple doubleclick.

Even if it is, the end-user might have an outdated or non-compatable version of Java.
To be shure you should also include the runtime. (in case its a commercial game, not just a hobby demo)

Offline wessles

JGO Wizard


Medals: 64
Projects: 4
Exp: 3 years


Radirius Software Developer


« Reply #27 - Posted 2013-06-18 21:25:05 »

Is it just a matter of who knows to do 'java -jar,' or is there some other factors, i.e. speed, effeciency, etc?

Offline ReBirth
« Reply #28 - Posted 2013-06-19 03:52:06 »

Launch4j has feature to bundle the JVM for you, but it only support windows EXE.

Offline wessles

JGO Wizard


Medals: 64
Projects: 4
Exp: 3 years


Radirius Software Developer


« Reply #29 - Posted 2013-06-19 03:56:35 »

Whatever. This got way overcomplicated... Thanks everyone!

Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (31 views)
2014-07-18 06:55:21

Zero Volt (27 views)
2014-07-17 23:47:54

danieldean (23 views)
2014-07-17 23:41:23

MustardPeter (24 views)
2014-07-16 23:30:00

Cero (39 views)
2014-07-16 00:42:17

Riven (41 views)
2014-07-14 18:02:53

OpenGLShaders (28 views)
2014-07-14 16:23:47

Riven (28 views)
2014-07-14 11:51:35

quew8 (25 views)
2014-07-13 13:57:52

SHC (61 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!