Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java/lang/Object not found #150

Open
bbroken776 opened this issue Oct 10, 2022 · 3 comments
Open

java/lang/Object not found #150

bbroken776 opened this issue Oct 10, 2022 · 3 comments

Comments

@bbroken776
Copy link

Bug Report

Expected Behaviour

Im trying to use the obfuscator and compile a spigot plugin.

+----[ Configuration ]----+
| Input:      bBags.jar   |
| Output:     null        |
| Config:     superconfig |
+-------------------------+
Loading classpath...
Reading input...
Building Hierarchy...
Finishing...
>>> Processing completed. If you found a bug / if the output is invalid please open an issue at https://github.com/superblaubeere27/obfuscator/issues
ERROR: java/lang/Object is missing in the classPath.
me.superblaubeere27.jobf.utils.MissingClassException: java/lang/Object is missing in the classPath.
	at me.superblaubeere27.jobf.JObfImpl.buildHierarchy(JObfImpl.java:103)
	at me.superblaubeere27.jobf.processors.name.NameObfuscation.transformPost(NameObfuscation.java:62)
	at me.superblaubeere27.jobf.JObfImpl.processJar(JObfImpl.java:314)
	at me.superblaubeere27.jobf.JObf.main(JObf.java:231)

Actual Behaviour

Im getting an error for no reason

How to reproduce the behaviour

Have a macbook m1 (apple silicon) that cannot find java libs

Config

Here it is my config in case that i'm doing something wrong.

{
  "input": "",
  "output": "",
  "script": "function isRemappingEnabledForClass(node) {\n    return false;\n}\nfunction isObfuscatorEnabledForClass(node) {\n    return true;\n}",
  "libraries": [
    "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/"
  ],
  "Crasher": {
    "Enabled": false
  },
  "InvokeDynamic": {
    "Enabled": true
  },
  "HWIDPRotection": {
    "Enabled": false,
    "HWID": "B2C48733D3E2D8FFDF1BB08580C046F3"
  },
  "Optimizer": {
    "Enabled": false,
    "Replace String.equals()": false,
    "Replace String.equalsIgnoreCase()": false,
    "Optimize static string calls": false
  },
  "LineNumberRemover": {
    "Enabled": true,
    "Rename local variables": true,
    "Remove Line Numbers": true,
    "Remove Debug Names": true,
    "Add Local Variables": true,
    "New SourceFile Name": ""
  },
  "StringEncryption": {
    "Enabled": true,
    "HideStrings": true,
    "AES": true
  },
  "NumberObfuscation": {
    "Enabled": false,
    "Extract to Array": false,
    "Obfuscate Zero": false,
    "Shift": false,
    "And": false,
    "Multiple Instructions": false
  },
  "ReferenceProxy": {
    "Enabled": false
  },
  "ShuffleMembers": {
    "Enabled": true
  },
  "InnerClassRemover": {
    "Enabled": true,
    "Remap": true,
    "Remove Metadata": true
  },
  "NameObfuscation": {
    "Enabled": true
  },
  "Packager": {
    "Enabled": true,
    "Use MainClass from the JAR manifest": false,
    "Main class": "store.blackcloud.bags.BagsPlugin"
  },
  "FlowObfuscator": {
    "Enabled": true,
    "Mangle Comparisons": true,
    "Replace GOTO": true,
    "Replace If": true,
    "Bad POP": true,
    "Bad Concat": true,
    "Mangle Switches": false,
    "Mangle Return": false,
    "Mangle Local Variables": false
  },
  "HideMembers": {
    "Enabled": true
  },
  "Inlining": {
    "Enabled": false
  }
}
@mikigal
Copy link

mikigal commented Oct 24, 2022

You have to add rj.jar from JDK to libraries

@antipowers
Copy link

@mikigal how does one do that?

@mikigal
Copy link

mikigal commented Oct 25, 2022

rt.jar is located in JDK_HOME/lib/rt.jar
Just add path to it to config in libraries section, same as e. g. Spigot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants