halfbridge1974 / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

IDE only starts if cwd is its own directory #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. cd ~
2. ~/arduino-0015/arduino

What is the expected output? What do you see instead?
The IDE should start.  Instead, you get:
Exception in thread "main" java.lang.NoClassDefFoundError: processing/app/Base

This is because the script assumes that it is run from it's own directory.
 The attached patch removes this assumption.

Original issue reported on code.google.com by p.d.oli...@gmail.com on 30 Apr 2009 at 9:45

Attachments:

GoogleCodeExporter commented 9 years ago
Hmm, today I find that that didn't work at all.  Here's another try.

Original comment by p.d.oli...@gmail.com on 3 May 2009 at 3:57

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,
about the only solution to this problem is to dynamically detect the absolute 
path to
one of the jar-files in the arduino-directory structure, and then change the 
users
working directory to the appropiate parent-dir of the jarfile location.

This forum thread has some information on the topic
http://www.velocityreviews.com/forums/t147526-how-to-get-jar-file-name.html

Note:
This works only from Java 1.5 and up. As long as the Arduino-IDE is build with 
source- and target-argument 1.4 you can't use this.

Eberhard

Original comment by e.fa...@wayoda.org on 5 May 2009 at 2:16

GoogleCodeExporter commented 9 years ago
What's wrong with the approach of simply cd'ing to the right directory before 
launching the Java application?

Original comment by dmel...@gmail.com on 5 Jun 2009 at 8:25

GoogleCodeExporter commented 9 years ago
Make the launcher a shell script and have it do all the necessary contortions.  
This
is the way most launchers work anyway.

Original comment by clvrm...@gmail.com on 5 Jun 2009 at 9:02

GoogleCodeExporter commented 9 years ago
Hi, 
I agree it's not a big problem, but a bit annoying. 
Most people, including me, don't want to open a console-window simply to start 
their
Arduino-IDE, or write their own shell-script to start the app. The 
Arduino-software
cannot provide a default shell-script that works for everybody, because we 
don't know
the directory into which the user will install the IDE.

Java 1.5 provides a way to solve this, but since there are very few complaints 
about
this, I see this as a low priority issue. 

Original comment by e.fa...@wayoda.org on 6 Jun 2009 at 8:34