Correct spelling.
[SquirrelJME.git] / assets / developer-notes / stephanie-gawroriski / 2016 / 01 / 28.mkd
bloba0d872ea60ee450843ad2d3b46201552459842e5
1 # 2016/01/28
3 ***DISCLAIMER***: _These notes are from the defunct k8 project which_
4 _precedes SquirrelJME. The notes for SquirrelJME start on 2016/02/26!_
5 _The k8 project was effectively a Java SE 8 operating system and as such_
6 _all of the notes are in the context of that scope. That project is no_
7 _longer my goal as SquirrelJME is the spiritual successor to it._
9 ## 07:36
11 Looks like classes might not be read properly (their buffers) in the class
12 loader. I was never increasing `at`. I also decided to just add hairball to
13 the default primary `HairballClassLoader`.
15 ## 07:48
17 The class for `BuildFailedException` is being loaded however and the
18 `ClassLoader` returns it but it seems it wants to check a `URLClassLoader`
19 instead after it.
21 ## 09:15
23 It is possible that the `getBinaryContents()` for `PackageStatus` may be
24 incorrect by using old and bad package contents. I should actually check the
25 file date to see if it has changed, if it has then a new contents should be
26 initialized.
28 ## 09:23
30 When a package is freshly built, trying to use it in the class loader fails
31 with being unable to find any classes.
33 ## 09:33
35 When it comes to `PackageContents`, there is duplicated code with times and
36 such. I can really just have another class which can handle such things for me
37 and to reduce said duplicate code. There can also be the potential for
38 better efficiency and stability.
40 ## 09:59
42 Having `HairballClassLoader` use package statuses instead, might be better.
43 That way the binaries can change and it could still find them.
45 ## 12:55
47 Did not know that Debian comes with a netbeans package. However I need to
48 upgrade I believe to support Java 8 anyway. I can use JDB but using a GUI
49 debugger might be a bit easier.
51 ## 13:29
53 i might just have to revert all these changes because I have no idea why this
54 is happening and I am in a situation where it is difficult to use a debugger.
56 ## 13:41
58 It is as if after compilation URLClassLoader just decides to die and be
59 worthless.
61 ## 15:43
63 For `HairballClassLoader` I can modify it so everything is based on resources
64 instead of just names of classes. Then those references to resources can be
65 cached for the most part.
67 ## 15:47
69 Actually `HairballClassLoader` might not even have to cache anything at all
70 when I use the ready and might not even need the ready. It is up to the
71 `loadClass()` method to check if a class is already loaded. So having my
72 own cache is kind of pointless. The only thing that is needed is there has to
73 be a lock on the name. There is `getClassLoadingLock(String)` which goes by
74 the name of a class.
76 ## 16:42
78 So the classloader is much simpler now and I still get the class not found
79 issues. I believe online searches have shown these problems also. I suppose
80 the only remaining alternative is to actually check if the system class loader
81 is a URLClassLoader and then just plop on all the JARs. That may work.
83 ## 17:58
85 That might actually be a bit hacky. It might be best to just modify the
86 bootstrap setup system so that it just does consecutive calls rather than
87 having hairball itself just be launched directly rather than have a large
88 `URLClassLoader` bridge. That would require the execution scripts to do more
89 work though.
91 ## 18:09
93 I will need a script in Java which checks the version and if it is old then a
94 bootstrap is used, otherwise if Java 8 is available just invoke the bootstrap
95 directly. I would need three scripts still though, for UNIX, DOS, and NT. This
96 new hairball would probably not have the class loading issues. It would also
97 probably be much easier to maintain without requiring tons of ugly code.