loose ends in java
I've programmed in java for a few years now, and one thing still remains a mystery.
How do I make a launch icon for my program so i can run it like any other application without having to go through the console or an IDE?
I've programmed in java for a few years now, and one thing still remains a mystery.
How do I make a launch icon for my program so i can run it like any other application without having to go through the console or an IDE?
Make an executable jar file containing all the classes you need and ensure the system you are running it on has the required level of jre installed.
> Or Webstart wich would even provide a desktop icon.
> "Few years"?
That caused me to raise an eyebrow as well (and as anyone who knows me will testify, that type of exercise is unheard of ;) )
the case that I'm in college and haven't ever had to distribute a program, when i try to jar my files and then run the jar, I get a "Failed to load main class manifest attribute form"
> the case that I'm in college and haven't ever had to
> distribute a program, when i try to jar my files and
> then run the jar, I get a "Failed to load main class
> manifest attribute form"
You need to have a manifext.txt file which points the jar to the main executable class.
The file should contain somehting that looks a little like this:
Manifest-Version: 1.0
Main-Class: com.myclass.classes.random.etc.blah.foo
> the case that I'm in college and haven't ever had to
> distribute a program, when i try to jar my files and
> then run the jar, I get a "Failed to load main class
> manifest attribute form"
Well, thats a reasonable enough case I guess. But I'd be getting used to deploying apps outside of your IDE, to be honest. Almost every CV I see from graduates makes some claim to "full product lifecycle" but they've got no idea what that actually means. Deploying something standalone is a step in the right direction, though
Create a link to javaw.exe, then edit it's properties to add the command line arguments to the java command and set the working directory.
This is more flexible than double clicking on an executable jar, because it allows you to add command line switches for extra memory or whatever.