question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Photon] "java: code too large"

See original GitHub issue

Version of Radiance (current development is 3.0-SNAPSHOT)

3.0-SNAPSHOT // 42d17c7

Sub-project (Neon, Trident, Substance, Flamingo, …)

Photon

Version of Java (current minimum is 9)

Java 11

$ gradle --version
Gradle 6.2.2
Kotlin:       1.3.61
Groovy:       2.5.8
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          11.0.6 (Oracle Corporation 11.0.6+10)
OS:           Linux 5.5.10-arch1-1 amd64

Version of OS

Arch Linux

The issue you’re experiencing (expected vs actual, screenshot, stack trace etc)

Running SvgTranscoder on https://commons.wikimedia.org/wiki/File:Openstreetmap_logo.svg results in a huge Java file which cannot be compiled due to “java: code too large”.

Here is the resulting Java file: img_Openstreetmap_logo.java

Ideally, Photon would split the generated code into smaller classes. As a user, I’d like to know which transcoded files will/may cause a problem (check resulting file size and report a warning?).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
kirill-grouchnikovcommented, Mar 27, 2020

Also, at the very top of https://github.com/kirill-grouchnikov/radiance/blob/master/docs/photon/photon.md

The goal of this project is to enable usage of vector-based icons in Swing applications.

Photon does not aim to support arbitrarily complex SVG content.

0reactions
kirill-grouchnikovcommented, Mar 27, 2020

It was never thread-safe. These classes are meant to be used in UI. Everything that is on screen is painted from the same UI thread. If you need more than one instance of the “same” icon, use the static of method that is generated for all resizable icons.

Read more comments on GitHub >

github_iconTop Results From Across the Web

“Code too large” Compilation Error in Java | Baeldung
When a Java method exceeds 65535 bytes, we get the compilation error, “code too large”. In this article, we'll discuss why this error...
Read more >
[Solved]-JavaFX 8 ant build error code too large-eclipse
Methods in Java are restricted to 64k of byte code. Once you exceed the limit the java compiler will throw an error error:...
Read more >
"Code too large" compilation error in Java - Stack Overflow
Is there any maximum size for code in Java? I wrote a function with more than 10,000 lines. Actually, each line assigns a...
Read more >
What's New in Photon (JDT) - IBM
A Java 10 JRE is recognized by Eclipse for launching. It can be added from the Window > Preferences > Java > Installed...
Read more >
Take Your Code to the Next Level with Eclipse Photon
The thirteenth annual simultaneous release of Eclipse projects is a huge accomplishment made possible by the tireless efforts of many committers ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found