Cloudslab / cloudsim

CloudSim: A Framework For Modeling And Simulation Of Cloud Computing Infrastructures And Services
http://www.cloudbus.org/cloudsim/
810 stars 492 forks source link

in the windows7 environment, it can not run #99

Open dockerwang opened 7 years ago

dockerwang commented 7 years ago

D:\cloudsim-4.0\cloudsim-4.0\jars>java -classpath cloudsim-4.0.jar;cl oudsim-examples-4.0.jar org.cloudbus.cloudsim.examples.container.ContainerCloudS imExample1 Starting ContainerCloudSimExample1... Initialising... java.lang.NullPointerException at org.cloudbus.cloudsim.examples.container.ContainerCloudSimExample1.cr eateContainerCloudletList(ContainerCloudSimExample1.java:419) at org.cloudbus.cloudsim.examples.container.ContainerCloudSimExample1.ma in(ContainerCloudSimExample1.java:158) Unwanted errors happen

alexander989 commented 6 years ago

The same error for me, It is not related to the OS apparently

alexander989 commented 6 years ago

I found out what was the problem. Apparently you should do the following 1- change the name of the example ( no idea why but if you keep the name the simulation will give you the same output no matter what) 2- go to the method (createContainerCloudletList) 3- the main problem is the path extraction in this line String inputFolderName = ContainerCloudSimExample1.class.getClassLoader().getResource("workload/planetlab").getPath();

since there is a jar file in the path this line gives, it keeps getting null indicating no folder is there, so what i did is I extracted the jar file named cloudsim-examples-4.0.jar, and just put my path written like this String inputFolderName = "/home/alex/Documents/JarsforCloudsim/Cloudsim/cloudsim-examples-4.0/workload/planetlab"; and that fixed the problem

norhan-tarek commented 6 years ago

please if any of you worked on coludsim container, could you please help me ?

Tomcruseal commented 6 years ago

The same problem for me and my environment is windows 10. Thanks a lot @alexander989 , it works for me.

srijan1234 commented 4 years ago

I found out what was the problem. Apparently you should do the following 1- change the name of the example ( no idea why but if you keep the name the simulation will give you the same output no matter what) 2- go to the method (createContainerCloudletList) 3- the main problem is the path extraction in this line String inputFolderName = ContainerCloudSimExample1.class.getClassLoader().getResource("workload/planetlab").getPath();

since there is a jar file in the path this line gives, it keeps getting null indicating no folder is there, so what i did is I extracted the jar file named cloudsim-examples-4.0.jar, and just put my path written like this String inputFolderName = "/home/alex/Documents/JarsforCloudsim/Cloudsim/cloudsim-examples-4.0/workload/planetlab"; and that fixed the problem

Hello alex please explain clearly how to set this path