sir4ju1 / stock-portfolio-manager

Automatically exported from code.google.com/p/stock-portfolio-manager
0 stars 0 forks source link

OSX 10.5 launch problematic #44

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. try to launch the software by double clicking on it
2. fail

What is the expected output? What do you see instead?

"The Java JAR file “StockPortfolioLauncher.jar” could not be launched."

What version of the product are you using? On what operating system?

0.15beta, Mac OS X 10.5.8

Please provide any additional information below.

The root of the problem is that on 10.5 the Java on the PATH is java 5. java 6 
is installed on OSX since 10.5.2 but not linked to the /usr/bin/java. I think 
that 10.6 has java 6 by default.

A launcher script could deal with that for 10.5. If you want to support 10.4 
then I'm afraid you'll have to rely only on Java 5 as Java 6 is mac intel only.

Again I can help with the launcher, just let me know.

Original issue reported on code.google.com by olivier....@gmail.com on 21 Jul 2011 at 3:03

GoogleCodeExporter commented 8 years ago
Workaround under 10.5.2+

launch with a terminal:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java -jar 
./StockPortfolio/StockPortfolioLauncher.jar

Original comment by olivier....@gmail.com on 21 Jul 2011 at 3:30

GoogleCodeExporter commented 8 years ago

Original comment by alex.bel...@gmail.com on 22 Jul 2011 at 4:03

GoogleCodeExporter commented 8 years ago
Same problem as #43 regarding executable files.. This makes it even more 
compelling to go with the tarball (.tar.gz) approach.

Original comment by olivier....@gmail.com on 6 Sep 2011 at 4:04

GoogleCodeExporter commented 8 years ago
Here's a new wrapper script that can handle both issue #43 and this one here. 
Again, it must be executable otherwise users will have to make it executable.

Original comment by olivier....@gmail.com on 6 Sep 2011 at 4:39

Attachments:

GoogleCodeExporter commented 8 years ago
Issue 43 has been merged into this issue.

Original comment by alex.bel...@gmail.com on 9 Sep 2011 at 9:09

GoogleCodeExporter commented 8 years ago

Original comment by alex.bel...@gmail.com on 9 Sep 2011 at 9:24

GoogleCodeExporter commented 8 years ago
Turns out a .sh extension is not executable by doucle-click on OSX. A .command 
extension works though. It needed some changes because the cwd is set to the 
User's home by the environment.

It does leave a terminal window open. 

So to recap:
- 10.6+ have Java 6 installed in their PATH so they can double-click on the now 
executable jar and it'll work
- 10.5.2+ is supported as long as you double-click the attached .command 
launcher

I read about the .sh limitation / .command fix in the following article (not 
the actual article but in the comments):
http://hints.macworld.com/article.php?story=20030728055235121

Original comment by olivier....@gmail.com on 21 Sep 2011 at 3:22

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks a lot! I added all this to the build, the next version (0.21) include a 
tar.gz archive for MAC/Linux users with the scripts you provided!

Original comment by alex.bel...@gmail.com on 21 Sep 2011 at 4:06