Skip to content

Commit

Permalink
set port in windows bundle, open browser accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzido committed Nov 30, 2013
1 parent d052e06 commit 96c1240
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
<cp>tabula.jar</cp>
</classPath>
<jre minVersion="1.6.0" jdkPreference="preferJre" initialHeapSize="256" maxHeapSize="1024">
<opt>-Xms256M -Xmx1024M -Dfile.encoding=utf-8</opt>
<opt>-Dfile.encoding=utf-8</opt>
<opt>-Djetty.port=%TABULA_PORT%</opt>
</jre>
<versionInfo
fileVersion="${full_version}"
Expand Down
5 changes: 3 additions & 2 deletions config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: UTF-8

require_relative './webapp/tabula_settings.rb'
require_relative './webapp/tabula_web.rb'
run Cuba
Expand All @@ -13,8 +14,8 @@ if "#{$PROGRAM_NAME}".include?("tabula.jar") && java.awt.Desktop.isDesktopSuppor
# don't do "java_import java.net.URI" -- it conflicts with Ruby URI and
# makes Cuba/Rack really really upset. just call "java.*" classes
# directly.

url = "http://127.0.0.1:8080"
port = java.lang.Integer.getInteger('jetty.port', 8080)
url = "http://127.0.0.1:#{port}"

puts "\n======================================================"
puts "Launching web browser to #{url}\n\n"
Expand Down

0 comments on commit 96c1240

Please sign in to comment.