command line args not passed correctly in JavaHelioViewerLauncher

Bug #1274184 reported by kenneth bentley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
JHelioviewer
New
Undecided
Unassigned

Bug Description

I was trying to use the command line interface as outlined in:

http://wiki.helioviewer.org/wiki/JHV_Command_Line_Interface

I was using the example command as specified in the wiki:

java -jar JHelioviewer.jar -jhv "[date=2003-10-05T00:00:00Z;imageScale=5000;imageLayers=[SOHO,EIT,EIT,171,1,100],[SOHO,LASCO,C2,white-light,1,100]]"

the result would be java always telling me that "-jhv" is an unrecognized option

so, I looked into it and the problem is located in JavaHelioViewerLauncher. the line, "commandLine.add(mainClass.getName());" should be moved from line 174 to line 168 (before the for-loop).

the difference in the launch code for me is:

java /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -cp build/JHelioviewer.jar:/Users/kenny/Projects/jhelioviewer/build/JHelioviewer.jar -Djava.library.path=/Users/kenny/JHelioviewer/Libs:.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java -Djava.ext.dirs="" -Xdock:name=JHelioviewer -Xdock:icon=/Users/kenny/Projects/jhelioviewer/JHV_icon.icns -Xmx1024m -Dapple.laf.useScreenMenuBar=true org.helioviewer.jhv.JavaHelioViewer -jhv [date=2003-10-05T00:00:00Z;imageScale=5000;imageLayers=[SOHO,EIT,EIT,171,1,100],[SOHO,LASCO,C2,white-light,1,100]]

vs. the incorrect:

java /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -cp build/JHelioviewer.jar:/Users/kenny/Projects/jhelioviewer/build/JHelioviewer.jar -Djava.library.path=/Users/kenny/JHelioviewer/Libs:.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java -Djava.ext.dirs="" -Xdock:name=JHelioviewer -Xdock:icon=/Users/kenny/Projects/jhelioviewer/JHV_icon.icns -Xmx1024m -Dapple.laf.useScreenMenuBar=true -jhv [date=2003-10-05T00:00:00Z;imageScale=5000;imageLayers=[SOHO,EIT,EIT,171,1,100],[SOHO,LASCO,C2,white-light,1,100]] org.helioviewer.jhv.JavaHelioViewer

----------------

it's a simple enough fix, but I don't know how to do a pull request on launchpad, so I post the solution here as a bug report.

thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.