From: Marcos D. de A. <mar...@gm...> - 2009-10-15 14:19:35
|
Hi Dalibor, thanks for pointing out that problem. The problem is that the file does not exist in the jar; that is, the ant build.xml file was not including the gui.properties file in the jar. Please use the build.xml that is attached to this e-mail to generate the jars again. After that, the example should work by invoking: java -cp $GRIDSIM/gridsim.jar:. parallel.agressive.ExampleEASY01 $GRIDSIM/examples/parallel/sdsc_blue_01.txt Regards, Marcos Dalibor Klusacek wrote: > Hi, > > I've been trying to run the visualization but I am still getting an > Exception: > > Exception in thread "main" java.lang.ExceptionInInitializerError > at gridsim.GridSim.startGridSimulation(Unknown Source) > at traceexample.Main.main(Main.java:124) > Caused by: java.lang.NullPointerException > at java.util.Properties$LineReader.readLine(Properties.java:418) > at java.util.Properties.load0(Properties.java:337) > at java.util.Properties.load(Properties.java:325) > at > gridsim.parallel.gui.GUISettings.loadDefaultProperties(Unknown Source) > at gridsim.parallel.gui.GUISettings.<init>(Unknown Source) > at gridsim.parallel.gui.GUISettings.getInstance(Unknown Source) > at gridsim.parallel.gui.AbstractVisualizer.<clinit>(Unknown Source) > ... 2 more > Java Result: 1 > > Clearly the GUISettings class cannot load the "gui.properties" file > properly. > I am not quite sure where to put this gui.properties file. Since it is > expected to be at: DEF_PATH = "gridsim/parallel/gui/gui.properties" > I tried to create such directory in my project folder, but it did not > work. Weird thing is that if I tried to open it via FileReader on my > own, everything went just fine, so I suppose wrong path was not the problem. > I am using gridsim as a .jar library, which I include into my (Netbeans) > project. > > The visualization is invoked through GridSim.startGridSimulation(true); > command and by using AggressiveBackfill alloc policy. > > I think that my problem will be solved by moving the gui.properties file > somewhere else - please tell me where? > Or the best solution would be - show me a simple code that runs the > visualization :-) > > Thanks, > > Dalibor > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Gridsim-users mailing list > Gri...@li... > https://lists.sourceforge.net/lists/listinfo/gridsim-users > |