Strange Brew java - Page 3 - Home Brew Forums
Register Now For Free!

Home Brew Forums > Home Brewing Beer > Brewing Software > Strange Brew java

Reply
 
Thread Tools
Old 02-26-2008, 11:57 PM   #21
Lambo3
Recipes 
 
Feb 2008
Posts: 41
Liked 1 Times on 1 Posts


Quote:
Originally Posted by JimC
It is also, sort of, described in the "Extra help running on Linux" section. This issue should be a lot clearer in the readme. I still intend to remove the applications dependency on a specific directory structure. Unfortunately, that isn't as easy to make platform neutral and still maintain platform specific logic.

Windows: everything goes in program files and changes affect every user on the system.
Linux: application and app data is owned by root in /usr/local and a helper script is put in /usr/local/bin. User data (recipes, config, modified data) goes in ~/.strangebrew. Your data is yours.

I suppose I just need to bite the bullet and make some platform dependent installers and add a command line option or two.
This is my first post here, so hi to HomeBrewTalk, seems to be great site for the homebrewer.

I'm a java developer as well, and figured I'd register and chime in as I've faced these kinds of problems before. My apologies if this is something you've already considered.

If you have a web location you can use to setup deployment, I'd suggest looking int Java Web Start as a way to distribute and launch your app. It turns it into a one click operation for the user on most all platforms. JWS takes care of downloading the latest JAR files, storing them locally, updating them, and starting the application.

For storing local data files, I would use users home directory using code like this below.

Code:
//Set data cache directory
String sUserDir = System.getProperty("user.home") + System.getProperty("file.separator"); 
String sCacheDir = sUserDir + "brew_cache" + System.getProperty("file.separator");
File fileCacheDir = new File(sCacheDir);

if(!fileCacheDir.exists()) {
	try {
		if(fileCacheDir.mkdir()) System.out.println("Created Cache Directory.");
	} catch(Exception ex) {
		System.out.println("Unable to create cache dir.");
		throw ex;
	}
}
This code makes creating a location for data storage platform independent.

If you've never used JWS, and want some assistance drop me a PM and I'll try to point you to a couple examples. Its fairly straight forward.

Anyway, there's a couple ideas from a nOOb.

 
Reply With Quote
Old 02-27-2008, 12:06 AM   #22
z987k
 
z987k's Avatar
Recipes 
 
Feb 2007
Anchorage
Posts: 3,518
Liked 30 Times on 28 Posts


I love it open source and beer, what could be better?!

 
Reply With Quote
Old 02-27-2008, 06:24 PM   #23
Lambo3
Recipes 
 
Feb 2008
Posts: 41
Liked 1 Times on 1 Posts


Quote:
Originally Posted by z987k
I love it open source and beer, what could be better?!


I've tried to mix the two, but strange code tends to surface


So is JimC the main developer on this product???

 
Reply With Quote
Old 03-03-2008, 02:45 PM   #24
JimC
Recipes 
 
Apr 2007
Ottawa, Ontario, Canada
Posts: 294
Liked 2 Times on 2 Posts


Quote:
Originally Posted by Lambo3


I've tried to mix the two, but strange code tends to surface


So is JimC the main developer on this product???
No, Drew is the main developer. I did a chunk of work in Dec/Jan on it but haven't looked at it in a month or so (paying job taking all my brain power).

Thanks for the tips. That should help a lot down the road when I get a chance to spend some more time on it.

 
Reply With Quote
Old 03-06-2008, 04:15 AM   #25
eulipion2
HBT_SUPPORTER.png
 
eulipion2's Avatar
Recipes 
 
Sep 2006
Hawley, PA
Posts: 1,690
Liked 88 Times on 67 Posts


JimC, you mentioned OS-specific as a possible way to go. I was able to turn StrangeBrew into an application bundle on my Mac using the Developer Tools and this link. It's crude but it works. Even got it to use the system menu bar. Now I can click it in the Dock, or if I set a document's "Open with..." attribute, I can click the document and StrangeBrew.app will automatically open.

I have no experience with java or development or any of that fancy stuff. I'm sure those of you who know what you're doing could do wonders with better integration and utilization of system resources! Maybe even give it a nice icon.
__________________
Primary:
Kegged: Bohemian Pilsner; Cream Ale; Cherry Cider; Dry Stout
Bottled: Witbier; Belgian Golden Strong; Quad; Saison; Norwegian Farmhouse Ale; Mosaic Session Brett; Saison Americain; Session Saison

 
Reply With Quote
Old 09-11-2008, 05:11 PM   #26
KiltLifter
Recipes 
 
Jan 2008
Lafayette, CO
Posts: 171
Liked 11 Times on 4 Posts


Any updates on the planned Pro features like inventory, etc?

 
Reply With Quote
Old 09-13-2008, 12:20 AM   #27
JimC
Recipes 
 
Apr 2007
Ottawa, Ontario, Canada
Posts: 294
Liked 2 Times on 2 Posts


I haven't been active in a long time. Kid, life, etc. All the problems with Open Source software. Not sure what Drew has been doing with it. I keep meaning to get back to polishing up whats there but there is always so escuse like brewing.. or drinking at the cottage.

In short, not to my knowledge yet.

 
Reply With Quote
Old 06-16-2011, 03:59 PM   #28
atch3000
Recipes 
 
May 2011
wavre, belgium
Posts: 1

Quote:
Originally Posted by JimC View Post
Your current working directory must be the same one which the jar file is in. The app is picky about pathing.. something I plan to resolve so the app can be untied from its strict directory structure. But there are a few other things I want to fix first, like the annoying way Swing handles combo boxes inside tables.

i can launch strangebrew (on ubuntu) by right-click and select "open with sun java 6.0 runtime" but in this case i dont have any data (malts, hops, etc). if i open it from a terminal i get this strange log and the process never ends...heres what it looks like :

Quote:
[email protected]:~/Documents/denis/creation brasserie/recette biere/StrangeBrew$ java -jar strangebrew.jar
LOCATOR
SYS ID: file:/home/denis/Documents/denis/creation%20brasserie/recette%20biere/StrangeBrew/src/ca/strangebrew/data/styleguide.xmlLOCATOR
SYS ID: file:/home/denis/Documents/denis/creation%20brasserie/recette%20biere/StrangeBrew/src/ca/strangebrew/data/styleguide.xmlException in thread "main" java.lang.NullPointerException
at java.awt.GridBagLayout.GetLayoutInfo(GridBagLayout .java:1095)
at java.awt.GridBagLayout.getLayoutInfo(GridBagLayout .java:893)
at java.awt.GridBagLayout.ArrangeGrid(GridBagLayout.j ava:2048)
at java.awt.GridBagLayout.arrangeGrid(GridBagLayout.j ava:2008)
at java.awt.GridBagLayout.layoutContainer(GridBagLayo ut.java:789)
at java.awt.Container.layout(Container.java:1421)
at java.awt.Container.doLayout(Container.java:1410)
at java.awt.Container.validateTree(Container.java:150 7)
at java.awt.Container.validateTree(Container.java:151 3)
at java.awt.Container.validateTree(Container.java:151 3)
at java.awt.Container.validateTree(Container.java:151 3)
at java.awt.Container.validateTree(Container.java:151 3)
at java.awt.Container.validateTree(Container.java:151 3)
at java.awt.Container.validateTree(Container.java:151 3)
at java.awt.Container.validate(Container.java:1480)
at java.awt.Window.show(Window.java:861)
at java.awt.Component.show(Component.java:1585)
at java.awt.Component.setVisible(Component.java:1537)
at java.awt.Window.setVisible(Window.java:842)
at ca.strangebrew.ui.swing.StrangeSwing.main(StrangeS wing.java:414)

i hope this can be easily solved because strangebrew looks solid!
i really hope to use it instead of beersmith!

all the best, thank you for making this!

 
Reply With Quote
Old 07-21-2011, 07:09 PM   #29
PerkHouse
Junior Member
HBT_LIFETIMESUPPORTER.png
Recipes 
 
Dec 2009
Luanda, Angola (Africa, not Indiana), Luanda Sul
Posts: 15

Jim, Drew, et al...

I just dl'd StrangeBrew 2.0.1 and it looks pretty sweet. (And I teach Java.) My only problem is that I can't import a BeerXML file (below) that I dl'd from here. I'll be honest tho, I haven't tried any others yet.

I'm running it on Mac OSX 10.4.11
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- BeerXML Format Generated by BrewBlogger, http://www.brewblogger.net -->
<RECIPES>
	<RECIPE>
		<NAME>Eisbock</NAME>
		<VERSION>1</VERSION>
		<TYPE>All Grain</TYPE>
		<BREWER>  </BREWER>
		<BATCH_SIZE>20.818</BATCH_SIZE>
		<BOIL_SIZE></BOIL_SIZE>
		<BOIL_TIME></BOIL_TIME>
		<NOTES></NOTES>
		<STYLE>
			<NAME>Eisbock</NAME>
			<VERSION>1</VERSION>
			<CATEGORY>Bock</CATEGORY>
			<CATEGORY_NUMBER>05</CATEGORY_NUMBER>
			<STYLE_LETTER>D</STYLE_LETTER>
			<STYLE_GUIDE>BJCP</STYLE_GUIDE>
			<TYPE>Ale</TYPE>
			<OG_MIN>1.078</OG_MIN>
			<OG_MAX>1.120</OG_MAX>
			<FG_MIN>1.035</FG_MIN>
			<FG_MAX>1.020</FG_MAX>
			<IBU_MIN>25</IBU_MIN>
			<IBU_MAX>35</IBU_MAX>
			<COLOR_MIN>18</COLOR_MIN>
			<COLOR_MAX>30</COLOR_MAX>
			<ABV_MIN>9.0</ABV_MIN>
			<ABV_MAX>14.0</ABV_MAX>
		</STYLE>
		<HOPS>
			<HOP>
				<NAME>Magnum</NAME>
				<VERSION>1</VERSION>
				<ALPHA>13</ALPHA>
				<AMOUNT>0.015025</AMOUNT>
				<USE>Boil</USE>
				<TIME>60</TIME>
				<TYPE>Bittering</TYPE>
				<FORM>Pellets</FORM>
			</HOP>
			<HOP>
				<NAME>Hallertauer Gold</NAME>
				<VERSION>1</VERSION>
				<ALPHA>4</ALPHA>
				<AMOUNT>0.014175</AMOUNT>
				<TIME>30</TIME>
				<USE>Boil</USE>
				<TIME>30</TIME>
				<TYPE>Both</TYPE>
				<FORM>Pellets</FORM>
			</HOP>
		</HOPS>
		<FERMENTABLES>
			<FERMENTABLE>
				<NAME>German Pilsen Malt (2-Row)</NAME>
				<TYPE>Grain</TYPE>
				<AMOUNT>5.26</AMOUNT>
			</FERMENTABLE>
			<FERMENTABLE>
				<NAME>German Light Munich Malt</NAME>
				<TYPE>Grain</TYPE>
				<AMOUNT>3.63</AMOUNT>
			</FERMENTABLE>
		</FERMENTABLES>
		<YEASTS>
			<YEAST>
				<NAME>WLP830 German Lager</NAME>
				<VERSION>1</VERSION>
				<TYPE>Lager</TYPE>
				<FORM>Liquid</FORM>
				<AMOUNT>Slurry from a 2.5 gal sta</AMOUNT>
				<LABORATORY>White Labs</LABORATORY>
			</YEAST>
		</YEASTS>
		<MISCS>
			<MISC>
				<NAME>Irish Moss</NAME>
				<VERSION>1</VERSION>
				<TYPE>Fining</TYPE>
				<USE>Boil</USE>
				<TIME>15</TIME>
				<AMOUNT>1 tsp</AMOUNT>
			</MISC>
		</MISCS>
		<WATERS>
			<WATER>
				<NAME></NAME>
				<VERSION>1</VERSION>
				<AMOUNT></AMOUNT>
				<CALCIUM></CALCIUM>
				<BICARBONATE></BICARBONATE>
				<SULFATE></SULFATE>
				<CHLORIDE></CHLORIDE>
				<SODIUM></SODIUM>
				<MAGNESIUM></MAGNESIUM>
				<PH></PH>
				<NOTES></NOTES>
			</WATER>
		</WATERS>
		<MASH>
			<NAME></NAME>
			<VERSION>1</VERSION>
			<GRAIN_TEMP></GRAIN_TEMP>
				<MASH_STEPS>
				</MASH_STEPS>
			<TUN_TEMP></TUN_TEMP>
			<SPARGE_TEMP></SPARGE_TEMP>
			<PH></PH>
			<EQUIP_ADJUST></EQUIP_ADJUST>
		</MASH>
		<TASTE_NOTES></TASTE_NOTES>
		<OG>1.109</OG>
		<FG>1.03</FG>
		<EST_OG>1.109</EST_OG>
		<EST_FG>1.03</EST_FG>
		<DISPLAY_OG>1.109</DISPLAY_OG>
		<DISPLAY_FG>1.03</DISPLAY_FG>
		<PRIMARY_AGE></PRIMARY_AGE>
		<PRIMARY_TEMP></PRIMARY_TEMP>
		<DISPLAY_PRIMARY_TEMP></DISPLAY_PRIMARY_TEMP>
		<SECONDARY_AGE></SECONDARY_AGE>
		<SECONDARY_TEMP></SECONDARY_TEMP>
		<DISPLAY_SECONDARY_TEMP></DISPLAY_SECONDARY_TEMP>
		<TERTIARY_AGE></TERTIARY_AGE>
		<TERTIARY_TEMP></TERTIARY_TEMP>
		<DISPLAY_TERTIARY_TEMP></DISPLAY_TERTIARY_TEMP>
		<AGE></AGE>
		<AGE_TEMP>-18</AGE_TEMP>
		<DISPLAY_AGE_TEMP>-18</DISPLAY_AGE_TEMP>
		<EST_COLOR>13</EST_COLOR>
		<IBU>27</IBU>
	</RECIPE>
</RECIPES>

 
Reply With Quote
Old 05-29-2013, 06:06 PM   #30
johngaltsmotor
Recipes 
 
Dec 2010
Toledo, Ohio
Posts: 879
Liked 197 Times on 130 Posts


okay, before I go emailing Doug directly, anybody want to help a noob?

I just downloaded StrangeBrew 2.1.0 today to replace Hopville (BOOO Brewtoad!!) So far it's quite nice. I can edit the grains and hops to add what I need. But I can't edit the database to add other water salts.

I'm not a programmer, but an engineer so I can normally work my way around. But in all of the StrangeBrew folders the only database file is sb_ingredients. But Excel won't open it (it wants a username and password) and Notepad brings it up as programming code, not a simple csv.

Suggestions?

 
Reply With Quote
Reply
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the wildest brew you have brewed - or what is a 'Strange Brew' to you? Slatetank General Beer Discussion 30 10-07-2012 04:43 AM
strange brew jlinton Beginners Beer Brewing Forum 15 09-20-2009 11:50 PM
A very strange brew allphoto Extract Brewing 1 08-04-2007 10:02 AM
Strange First Brew ??? jeffreyice1 Beginners Beer Brewing Forum 8 05-09-2007 11:44 AM


Forum Jump