Replace a json value using regex - java

String inputJson = "{\r\n" +
" \"fullName\" : \"Hamo\",\r\n" +
" \"staff\" : false,\r\n" +
" \"supr\" : true,\r\n" +
" \"permissions\" : [ \"Perm1\", \"Perm2\" ],\r\n" +
" \"services\" : [ \"Serv1\", \"Serv2\" ],\r\n" +
" \"authToken\" : \"1234567890abcdefghaijklmnopqrstuvwxyz\",\r\n" +
" \"customerId\" : 12345,\r\n" +
" \"clients\" : [ 1, 3, 8 ],\r\n" +
" \"wts\" : false,\r\n" +
//yyyy-MM-dd
" \"testDate\" : \"1982-09-21\"\r\n" +
"}";
I need to replace authToken value with another string using regex.
This question was edited because it was not asked properly.

Without a JSON class there remains:
inputJson = inputJson.replaceFirst("(\"authToken\"\\s*:\\s*\")[^\"]*\"",
"$1" + authToken + "\"");
This assumes that the authToken does not contain a dollar $.

Apart from using convenient json-editing libraries, you can use regexp:
String inputJson = "{\r\n" +
" \"fullName\" : \"Hamo\",\r\n" +
" \"staff\" : false,\r\n" +
" \"supr\" : true,\r\n" +
" \"permissions\" : [ \"Perm1\", \"Perm2\" ],\r\n" +
" \"services\" : [ \"Serv1\", \"Serv2\" ],\r\n" +
" \"authToken\" : \"1234567890abcdefghaijklmnopqrstuvwxyz\",\r\n" +
" \"customerId\" : 12345,\r\n" +
" \"clients\" : [ 1, 3, 8 ],\r\n" +
" \"wts\" : false,\r\n" +
//yyyy-MM-dd
" \"testDate\" : \"1982-09-21\"\r\n" +
"}";
String desiredAuthToken = "anyAuthTokenYouWant";
inputJson.replaceAll("(\"authToken\"\\s*:\\s*\")\\w*", "$1" + desiredAuthToken);
Here's the explanation:
"(\"authToken\"\\s*:\\s*\")\\w*";
( – start of a first capturing group
\"authToken\" – matches "authToken" string
\\s* – 0 to N whitespaces (including normal spaces, tabulations, etc.)
: – matches a single colon
\\s* – 0 to N whitespaces again
) – end of the capturing group
\\w* – matches 0 to N alphanumeric characters. You may want to replace it with a different regexp, that suits you needs in a better way.
Finally, you are replacing the whole matching expression with "$1" + desiredAuthToken, where $1 is basically the contents of a first capture group. (It is \"authToken\" : \" in this case).

Related

Parse html content for a value

I receive a Http response after a call as Html String and I would like to scrape certain value stored inside the ReportViewer1 variable.
<html>
....................
...........
<script type="text/javascript">
var ReportViewer1 = new ReportViewer('ReportViewer1', 'ReportViewer1_ReportToolbar', 'ReportViewer1_ReportArea_WaitControl', 'ReportViewer1_ReportArea_ReportCell', 'ReportViewer1_ReportArea_PreviewFrame', 'ReportViewer1_ParametersAreaCell', 'ReportViewer1_ReportArea_ErrorControl', 'ReportViewer1_ReportArea_ErrorLabel', 'ReportViewer1_CP', '/app/Telerik.ReportViewer.axd', 'a90a0d41efa6429eadfefa42fc529de1', 'Percent', '100', '', 'ReportViewer1_EditorPlaceholder', 'ReportViewer1_CalendarFrame', 'ReportViewer1_ReportArea_DocumentMapCell', {
CurrentPageToolTip: 'STR_TELERIK_MSG_CUR_PAGE_TOOL_TIP',
ExportButtonText: 'Export',
ExportToolTip: 'Export',
ExportSelectFormatText: 'Export to the selected format',
FirstPageToolTip: 'First page',
LabelOf: 'of',
LastPageToolTip: 'Last Page',
ProcessingReportMessage: 'Generating report...',
NoPageToDisplay: 'No page to display.',
NextPageToolTip: 'Next page',
ParametersToolTip: 'Click to close parameters area|Click to open parameters area',
DocumentMapToolTip: 'Hide document map|Show document map',
PreviousPageToolTip: 'Previous page',
TogglePageLayoutToolTip: 'Switch to interactive view|Switch to print preview',
SessionHasExpiredError: 'Session has expired.',
SessionHasExpiredMessage: 'Please, refresh the page.',
PrintToolTip: 'Print',
RefreshToolTip: 'Refresh',
NavigateBackToolTip: 'Navigate back',
NavigateForwardToolTip: 'Navigate forward',
ReportParametersSelectAllText: '<select all>',
ReportParametersSelectAValueText: '<select a value>',
ReportParametersInvalidValueText: 'Invalid value.',
ReportParametersNoValueText: 'Value required.',
ReportParametersNullText: 'NULL',
ReportParametersPreviewButtonText: 'Preview',
ReportParametersFalseValueLabel: 'False',
ReportParametersInputDataError: 'Missing or invalid parameter value. Please input valid data for all parameters.',
ReportParametersTrueValueLabel: 'True',
MissingReportSource: 'The source of the report definition has not been specified.',
ZoomToPageWidth: 'Page Width',
ZoomToWholePage: 'Full Page'
}, 'ReportViewer1_ReportArea_ReportArea', 'ReportViewer1_ReportArea_SplitterCell', 'ReportViewer1_ReportArea_DocumentMapCell', true, true, 'PDF', 'ReportViewer1_RSID', true);
</script>
...................
...................
</html>
The value is a90a0d41efa6429eadfefa42fc529de1 and this is in the middle of this content:
'/app/Telerik.ReportViewer.axd', 'a90a0d41efa6429eadfefa42fc529de1', 'Percent', '100',
Whats the best way I can parse this value using Java?
Parse the HTML with String class
public class HtmlParser {
public static void main(String args[]){
String result = getValuesProp(html);
System.out.println("Result: "+ result);
}
static String PIVOT = "Telerik.ReportViewer.axd";
public static String getValuesProp(String json) {
String subString;
int i = json.indexOf(PIVOT);
i+= PIVOT.length();
//', chars
i+=2;
subString = json.substring(i);
i = subString.indexOf("'");
i++;
subString = subString.substring(i);
i = subString.indexOf("'");
subString = subString.substring(0,i);
return subString;
}
static String html ="<html>\n" +
"\n" +
"<script type=\"text/javascript\">\n" +
" var ReportViewer1 = new ReportViewer('ReportViewer1', 'ReportViewer1_ReportToolbar', 'ReportViewer1_ReportArea_WaitControl', 'ReportViewer1_ReportArea_ReportCell', 'ReportViewer1_ReportArea_PreviewFrame', 'ReportViewer1_ParametersAreaCell', 'ReportViewer1_ReportArea_ErrorControl', 'ReportViewer1_ReportArea_ErrorLabel', 'ReportViewer1_CP', '/app/Telerik.ReportViewer.axd', 'a90a0d41efa6429eadfefa42fc529de1', 'Percent', '100', '', 'ReportViewer1_EditorPlaceholder', 'ReportViewer1_CalendarFrame', 'ReportViewer1_ReportArea_DocumentMapCell', {\n" +
" CurrentPageToolTip: 'STR_TELERIK_MSG_CUR_PAGE_TOOL_TIP',\n" +
" ExportButtonText: 'Export',\n" +
" ExportToolTip: 'Export',\n" +
" ExportSelectFormatText: 'Export to the selected format',\n" +
" FirstPageToolTip: 'First page',\n" +
" LabelOf: 'of',\n" +
" LastPageToolTip: 'Last Page',\n" +
" ProcessingReportMessage: 'Generating report...',\n" +
" NoPageToDisplay: 'No page to display.',\n" +
" NextPageToolTip: 'Next page',\n" +
" ParametersToolTip: 'Click to close parameters area|Click to open parameters area',\n" +
" DocumentMapToolTip: 'Hide document map|Show document map',\n" +
" PreviousPageToolTip: 'Previous page',\n" +
" TogglePageLayoutToolTip: 'Switch to interactive view|Switch to print preview',\n" +
" SessionHasExpiredError: 'Session has expired.',\n" +
" SessionHasExpiredMessage: 'Please, refresh the page.',\n" +
" PrintToolTip: 'Print',\n" +
" RefreshToolTip: 'Refresh',\n" +
" NavigateBackToolTip: 'Navigate back',\n" +
" NavigateForwardToolTip: 'Navigate forward',\n" +
" ReportParametersSelectAllText: '<select all>',\n" +
" ReportParametersSelectAValueText: '<select a value>',\n" +
" ReportParametersInvalidValueText: 'Invalid value.',\n" +
" ReportParametersNoValueText: 'Value required.',\n" +
" ReportParametersNullText: 'NULL',\n" +
" ReportParametersPreviewButtonText: 'Preview',\n" +
" ReportParametersFalseValueLabel: 'False',\n" +
" ReportParametersInputDataError: 'Missing or invalid parameter value. Please input valid data for all parameters.',\n" +
" ReportParametersTrueValueLabel: 'True',\n" +
" MissingReportSource: 'The source of the report definition has not been specified.',\n" +
" ZoomToPageWidth: 'Page Width',\n" +
" ZoomToWholePage: 'Full Page'\n" +
" }, 'ReportViewer1_ReportArea_ReportArea', 'ReportViewer1_ReportArea_SplitterCell', 'ReportViewer1_ReportArea_DocumentMapCell', true, true, 'PDF', 'ReportViewer1_RSID', true);\n" +
" </script>\n" +
"\n" +
"</html>";
}
I would read the text a line at a time like how most files are read. Because the format will always be the same, you look for a line that begins with the characters "var ReportViewer1." Then you know you have found the line you want. You may need to strip some white space, although it will always be formatted with the same whitespace too (up to you really.)
When you have the line, use the String .split() method to split that line into an array. There are nice delimiters there to split on ... "," or " " or ", " ... again, see what works best for you.
Test the split up line parts for '/app/Telerik.ReportViewer.axd' ... the next member of your split array will be the value you are looking for.
Again, the formatting will always be the same, so you can rely on that to find your variable. Of course, study the html text to make sure it does always follow the same format within the line you are investigating, but looking at it, I assume it probably does.
Again, find your line ... split it on a delimiter ... and use some logic to find the element you are after in the split up line parts.

Extracting Capture Group from Non-Capture Group in Java

I have a string, let's call it output, that's equals the following:
ltm data-group internal str_testclass {
records {
baz {
data "value 1"
}
foobar {
data "value 2"
}
topaz {}
}
type string
}
And I'm trying to extract the substring between the quotes for a given "record" name. So given foobar I want to extract value 2. The substring I want to extract will always come in the form I have prescribed above, after the "record" name, a whitespace, an open bracket, a new line, whitespace, the string data, and then the substring I want to capture is between the quotes from there. The one exception is when there is no value, which will always happen like I have prescribed above with topaz, in which case after the "record" name there will just be an open and closed bracket and I'd just like to get an empty string for this. How could I write a line of Java to capture this? So far I have ......
String myValue = output.replaceAll("(?:foobar\\s{\n\\s*data "([^\"]*)|()})","$1 $2");
But I'm not sure where to go from here.
Let's start extracting "records" structure with following regex ltm\s+data-group\s+internal\s+str_testclass\s*\{\s*records\s*\{\s*(?<records>([^\s}]+\s*\{\s*(data\s*"[^"]*")?\s*\}\s*)*)\}\s*type\s*string\s*\}
Then from "records" group, just find for sucessive match against [^\s}]+\s*\{\s*(?:data\s*"(?<data>[^"]*)")?\s*\}\s*. The "data" group contains what's you're looking for and will be null in "topaz" case.
Java strings:
"ltm\\s+data-group\\s+internal\\s+str_testclass\\s*\\{\\s*records\\s*\\{\\s*(?<records>([^\\s}]+\\s*\\{\\s*(data\\s*\"[^\"]*\")?\\s*\\}\\s*)*)\\}\\s*type\\s*string\\s*\\}"
"[^\\s}]+\\s*\\{\\s*(?:data\\s*\"(?<data>[^\"]*)\")?\\s*\\}\\s*"
Demo:
String input =
"ltm data-group internal str_testclass {\n" +
" records {\n" +
" baz {\n" +
" data \"value 1\"\n" +
" }\n" +
" foobar {\n" +
" data \"value 2\"\n" +
" }\n" +
" topaz {}\n" +
" empty { data \"\"}\n" +
" }\n" +
" type string\n" +
"}";
Pattern language = Pattern.compile("ltm\\s+data-group\\s+internal\\s+str_testclass\\s*\\{\\s*records\\s*\\{\\s*(?<records>([^\\s}]+\\s*\\{\\s*(data\\s*\"[^\"]*\")?\\s*\\}\\s*)*)\\}\\s*type\\s*string\\s*\\}");
Pattern record = Pattern.compile("(?<name>[^\\s}]+)\\s*\\{\\s*(?:data\\s*\"(?<data>[^\"]*)\")?\\s*\\}\\s*");
Matcher lgMatcher = language.matcher(input);
if (lgMatcher.matches()) {
String records = lgMatcher.group();
Matcher rdMatcher = record.matcher(records);
while (rdMatcher.find()) {
System.out.printf("%s:%s%n", rdMatcher.group("name"), rdMatcher.group("data"));
}
} else {
System.err.println("Language not recognized");
}
Output:
baz:value 1
foobar:value 2
topaz:null
empty:
Alernatives: As your parsing a custom language, you can give a try to write an ANTLR grammar or create Groovy DSL.
Your regex shouldn't even compile, because you are not escaping the " inside your regex String, so it is ending your String at the first " inside your regex.
Instead, try this regex:
String regex = key + "\\s\\{\\s*\\n\\s*data\\s*\"([^\"]*)\"";
You can check out how it works here on regex101.
Try something like this getRecord() method where key is the record 'name' you're searching for, e.g. foobar, and the input is the string you want to search through.
public static void main(String[] args) {
String input = "ltm data-group internal str_testclass { \n" +
" records { \n" +
" baz { \n" +
" data \"value 1\" \n" +
" } \n" +
" foobar { \n" +
" data \"value 2\" \n" +
" }\n" +
" topaz {}\n" +
" } \n" +
" type string \n" +
"}";
String bazValue = getRecord("baz", input);
String foobarValue = getRecord("foobar", input);
String topazValue = getRecord("topaz", input);
System.out.println("Record data value for 'baz' is '" + bazValue + "'");
System.out.println("Record data value for 'foobar' is '" + foobarValue + "'");
System.out.println("Record data value for 'topaz' is '" + topazValue + "'");
}
private static String getRecord(String key, String input) {
String regex = key + "\\s\\{\\s*\\n\\s*data\\s*\"([^\"]*)\"";
final Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(input);
if (matcher.find()) {
//if we find a record with data return it
return matcher.group(1);
} else {
//else see if the key exists with empty {}
final Pattern keyPattern = Pattern.compile(key);
Matcher keyMatcher = keyPattern.matcher(input);
if (keyMatcher.find()) {
//return empty string if key exists with empty {}
return "";
} else {
//else handle error, throw exception, etc.
System.err.println("Record not found for key: " + key);
throw new RuntimeException("Record not found for key: " + key);
}
}
}
Output:
Record data value for 'baz' is 'value 1'
Record data value for 'foobar' is 'value 2'
Record data value for 'topaz' is ''
You could try
(?:foobar\s{\s*data "(.*)")
I think the replaceAll() isn't necessary here. Would something like this work:
String var1 = "foobar";
String regex = '(?:' + var1 + '\s{\n\s*data "([^"]*)")';
You can then use this as your regex to pass into your pattern and matcher to find the substring.
You can simple transform this into a function so that you can pass variables into it for your search string:
public static void SearchString(String str)
{
String regex = '(?:' + str + '\s{\n\s*data "([^"]*)")';
}

select all text within ""(inclusive) after : but not including :

aa: {
one: "hello",
two: "good",
three: "bye",
four: "tomorrow",
},
"bb": {
"1": "a quick fox",
"2": "a slow bird",
"3": "a smart dog",
"4": "a wilf flowert",
my data look something like above
What i want to select is all the text within "" that is on the right side of the : and that is including the "" marks
what i get is
: ("(.*?)")
but it select the : also which isn't what i want.
If you must use a regular expression, you can try the Matcher.group() method as found here.
public class TestClass {
public static void main(String[] args) {
String input = "aa: {\n" +
" one: \"hello\",\n" +
" two: \"good\",\n" +
" three: \"bye\",\n" +
" four: \"tomorrow\",\n" +
" },\n" +
" \"bb\": {\n" +
" \"1\": \"a quick fox\",\n" +
" \"2\": \"a slow bird\",\n" +
" \"3\": \"a smart dog\",\n" +
" \"4\": \"a wilf flowert\",\n";
// the actual code you need
Pattern pattern = Pattern.compile("(: )(\".+\")");
Matcher match = pattern.matcher(input);
while (match.find()) {
// here you go, only the value without the :
String value = match.group(2);
System.out.println("Found one = " + value);
}
}
}
This results in the following for me:
Found one = "hello"
Found one = "good"
Found one = "bye"
Found one = "tomorrow"
Found one = "a quick fox"
Found one = "a slow bird"
Found one = "a smart dog"
Found one = "a wilf flowert"
Try this:
String p = "(?<=:\\s{0,10})\"[^\"]*\"";
Pattern pat = Pattern.compile(p);
String s =
"aa: {\n" +
" one: \"hello\",\n" +
" two: \"good\",\n" +
" three: \"bye\",\n" +
" four: \"tomorrow\",\n" +
"" +
" },\n" +
" \"bb\": {\n" +
" \"1\": \"a quick fox\",\n" +
" \"2\": \"a slow bird\",\n" +
" \"3\": \"a smart dog\",\n" +
" \"4\": \"a wilf flowert\",\n";
Matcher m = pat.matcher(s);
while (m.find())
System.out.println(m.group());
result:
"hello"
"good"
"bye"
"tomorrow"
"a quick fox"
"a slow bird"
"a smart dog"
"a wilf flowert"
One possible regex is:
(?<=\: )\"*.*\",
(?<=\: ) checks that there is a colon before the prospective string, but does not select it in the regex selection. The rest selects the quotes and the string they surround.
String testData = "test: \"Hello\"";
Pattern p = Pattern.compile("(?<=\\: )\\\"*.*\\\"");
Matcher m = p.matcher(testData);
while (m.find()) {
System.out.println(testData.substring(m.start(), m.end()));
}
I strongly recommend using a JSON parser opposed to a regex, as suggested by fge.
Even though your code is not technically valid JSON, it would be much more efficient and you would avoid reinventing the wheel.

`rtserver-id` turns to `rtserver - id` in java string

I have this code:
public void foo (){
String script =
"var aLocation = {};" +
"var aOffer = {};" +
"var aAdData = " +
"{ " +
"location: aLocation, " +
"offer: aOffer " +
" };" +
"var aClientEnv = " +
" { " +
" sessionid: \"\", " +
" cookie: \"\", " +
" rtserver-id: 1, " +
" lon: 34.847, " +
" lat: 32.123, " +
" venue: \"\", " +
" venue_context: \"\", " +
" source: \"\"," + // One of the following (string) values: ADS_PIN_INFO,
// ADS_0SPEED_INFO, ADS_LINE_SEARCH_INFO,
// ADS_ARROW_NEARBY_INFO, ADS_CATEGORY_AUTOCOMPLETE_INFO,
// ADS_HISTORY_LIST_INFO
// (this field is also called "channel")
" locale: \"\"" + // ISO639-1 language code (2-5 characters), supported formats:
" };" +
"W.setOffer(aAdData, aClientEnv);";
javascriptExecutor.executeScript(script);
}
I have two q:
when I debug and copy script value I see a member rtserver - id instead of rtserver-id
how can it be? the code throws an exception because of this.
Even if i remove this rtserver-id member (and there is not exception thrown)
I evaluate aLocation in this browser console and get "variable not defined". How can this be?
rtserver-id isn't a valid identifier - so if you want it as a field/property name, you need to quote it. You can see this in a Chrome Javascript console, with no need for any Java involved:
> var aClientEnv = { sessionId: "", rtserver-id: 1 };
Uncaught SyntaxError: Unexpected token -
> var aClientEnv = { sessionId: "", "rtserver-id": 1 };
undefined
> aClientEnv
Object {sessionId: "", rtserver-id: 1}
Basically I don't think anything's adding spaces - you've just got an invalid script. You can easily add the quotes in your Java code:
" \"rtserver-id\": 1, " +

vb.net how to launch Minecraft?

Okay, I have a problem, I'm creating a launcher for Minecraft. My problem: I get this error messege, when I try launch Minecraft: Error: Could not find or load main class net.minecraft.client.main.Main
My code, I writted this, but not works:
The Detail of code:
Logger as module, my program using this to write information to console.
JavaPaht as string, the Java path is stored in this.
GameLibraries as string too, the libraries stored in this.
MinMemAlloc as string, the minimal allocated memory for java.
MaxMemAlloc as string, the maximal allocated memory for java.
Root as string, this is the root directory of Minecraft.
Here is the full sub to launch game:
Private Sub LaunchGame()
If Not File.Exists(Root + "\versions\" + SelectedGameVersion + "\" + SelectedGameVersion + ".jar") Then
MsgBox("File not found: " + SelectedGameVersion + ".jar")
Else
Logger.Write("Launching Game...")
Logger.SetScrollDown()
Dim Gamelibraries As String = Nothing
For i = 0 To FileList.Count - 1
Gamelibraries += FileList.Item(i) + ";" +
Environment.NewLine()
Next
Logger.WriteWithJumpDown("Libraries loaded: " & Gamelibraries.ToString())
Logger.SetScrollDown()
Logger.Write("Building Process...")
Logger.Write("Received data: ")
Logger.SetScrollDown()
Dim p As New Process()
p.StartInfo.FileName = JavaPath
p.StartInfo.Arguments = " -Xms" + MinMemAlloc + "M -Xmx" + MaxMemAlloc + "M " +
"-Djava.library.path=" + Root + "\versions\" + SelectedGameVersion + "\" + SelectedGameVersion + "-natives -cp " +
Gamelibraries.ToString() +
Root + "\versions\" + SelectedGameVersion + "\" + SelectedGameVersion + ".jar " + mainClass +
" --username=" + UserID +
" --version " + SelectedGameVersion +
" --gameDir " + Root +
" --assetsDir " + Root + "\assets" +
" --assetIndex " + assets +
" --accessToken null" +
" --userProperties {}" +
" --userType mojang" +
" --uuid (Default)"
p.StartInfo.WorkingDirectory = Root
p.StartInfo.CreateNoWindow = False
p.StartInfo.UseShellExecute = False
p.EnableRaisingEvents = True
Application.DoEvents()
p.StartInfo.RedirectStandardError = True
p.StartInfo.RedirectStandardOutput = True
AddHandler p.ErrorDataReceived, AddressOf p_OutputDataReceived
AddHandler p.OutputDataReceived, AddressOf p_OutputDataReceived
p.Start()
p.BeginErrorReadLine()
p.BeginOutputReadLine()
Logger.SetScrollDown()
Button1.Text = "Play"
Button1.Enabled = True
Button2.Enabled = True
Button3.Enabled = True
Button4.Enabled = True
Button5.Enabled = True
End If
End Sub
And my program writing the output into my console, so I write here the output:
[14:34:41 INFO ] Libraries loaded: C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\java3d\vecmath\1.5.2\vecmath-1.5.2.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\com\ibm\icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\net\sf\jopt-simple\jopt-simple\4.6\jopt-simple-4.6.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\com\paulscode\codecjorbis\20101023\codecjorbis-20101023.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\com\paulscode\codecwav\20101023\codecwav-20101023.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\com\paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\com\paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\com\paulscode\soundsystem\20120107\soundsystem-20120107.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\io\netty\netty-all\4.0.15.Final\netty-all-4.0.15.Final.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\com\google\guava\guava\17.0\guava-17.0.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\org\apache\commons\commons-lang3\3.3.2\commons-lang3-3.3.2.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\commons-codec\commons-codec\1.9\commons-codec-1.9.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\net\java\jutils\jutils\1.0.0\jutils-1.0.0.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\com\mojang\authlib\1.5.16\authlib-1.5.16.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\com\mojang\realms\1.5\realms-1.5.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\org\apache\commons\commons-compress\1.8.1\commons-compress-1.8.1.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\org\apache\httpcomponents\httpclient\4.3.3\httpclient-4.3.3.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\org\apache\httpcomponents\httpcore\4.3.2\httpcore-4.3.2.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\org\apache\logging\log4j\log4j-api\2.0-beta9\log4j-api-2.0-beta9.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\org\apache\logging\log4j\log4j-core\2.0-beta9\log4j-core-2.0-beta9.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\org\lwjgl\lwjgl\lwjgl\2.9.1\lwjgl-2.9.1.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\org\lwjgl\lwjgl\lwjgl_util\2.9.1\lwjgl_util-2.9.1.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\org\lwjgl\lwjgl\lwjgl-platform\2.9.1\lwjgl-platform-2.9.1-natives-windows.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\net\java\jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\tv\twitch\twitch\6.5\twitch-6.5.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\tv\twitch\twitch-platform\6.5\twitch-platform-6.5-natives-windows-64.jar;
C:\Users\ProGamer\AppData\Roaming\.elcplatform\libraries\tv\twitch\twitch-external-platform\4.5\twitch-external-platform-4.5-natives-windows-64.jar;
[14:34:41 INFO ] Building Process...
[14:34:41 INFO ] Received data:
[14:34:41 INFO ]
[14:34:41 INFO ] Error: Could not find or load main class net.minecraft.client.main.Main
[14:34:41 INFO ]
Thanks for help!
You need to have the main class on the path after the jars are included "net.minecraft.client.main.Main" unless mainClass means that already, then I don't know.

Categories

Resources