File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jobfuscate

 
sri vidhya
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to hide my source code, i used Jobfuscate. I cant see the source code by decompilation. so it is working perfectly. but i couldn't execute the class file. Please help me in this sanerio.
[ October 04, 2007: Message edited by: sri vidhya ]
 
bart zagers
Ranch Hand
Posts: 234
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea what could be going wrong, but wanted to ask what you are trying to achieve with this obfuscation?
Are you aware that it only makes it more difficult for someone else to read your code, but does not actually prevents this (see this thread for a longer explanation).
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

so it is working perfectly.


I guess not?

You can make it easier for people to help you if you tell us what actually happens when you try to run the program - are there error messages? TellTheDetails

My guess would be that you inadvertently obfuscated the name of the class you use to start the application, or the name of its main method.
 
sri vidhya
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please Explain the method to jobfuscate the class file. i need step by step explanation
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which product is it you're talking about - this one? Its instructions seems rather clear on what you need to do in order to run it, and how to exclude certain methods/classes from obfuscation (not that you have told us what exactly the problem is).
 
sri vidhya
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes i used bellow link for obfuscate my class file

http://www.duckware.com/jobfuscate/index.html

Step:1 created java file "example.java"
step:2 compiled that java file, so class file is created("example.class")
step:3 gave the command "jobfuscate example". so it obfuscated the class file.
step:4 then executed the class file by giving command "java example"
stpe:5 I got the error classFormate error.

These are the step i followed

please explain it if i made any mistakes
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

stpe:5 I got the error classFormate error.

That's the kind of thing people need to know in order to help you. What is the exact and complete error message?
[ October 04, 2007: Message edited by: Ulf Dittmer ]
 
sri vidhya
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C:\application>jobfuscate ex > exa.class

C:\application>java exa
Exception in thread "main" java.lang.ClassFormatError: Incompatible magic value
1330526752 in class file exa
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)

please see this method and error i am getting.. give me solution
 
krishnamoorthy kitcha
Ranch Hand
Posts: 96
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi sri vidhya


Check with class file had corrupted or else , using version mismatch in your jdk version.

Check and tell me your exact problem you were facing.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you certain that jobfuscate writes the class to standard output, so that you can pipe it into a file? That would be very strange, and the documentation doesn't mention anything like it. To the contrary, the documentation shows an example where the output is piped to a .log file, indicating that it's not the class itself (which wouldn't work with multiple classes anyway).
 
sri vidhya
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the document, there is no explanation given for how to run the jobfuscate file. Thats why i am asking for how to execute the jobfuscate file.
Please give me step by step method to use jobfuscate.
I am using jdk1.5 version.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the document, there is no explanation given for how to run the jobfuscate file.


Sure there is. The "Using Jobfuscate" section contains several examples of how to run it from the command line, and the "Jobfuscate Command Line Options" section explains the options you can (and need to) use.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic